feat: add QueryActiveTrustAnchorCount (#431)

* feat: add QueryActiveTrustAnchorCount
---------

Signed-off-by: Lorenz Herzberger <lorenzherzberger@gmail.com>
This commit is contained in:
Lorenz Herzberger 2024-07-24 09:44:07 +02:00 committed by GitHub
parent 4c8427c3b1
commit c2ef2b5924
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
11 changed files with 580 additions and 51 deletions

View File

@ -47538,6 +47538,39 @@ paths:
additionalProperties: {}
tags:
- Query
/planetmint/machine/active_trust_anchor_count:
get:
summary: Queries a list of ActiveTrustAnchorCount items.
operationId: PlanetmintgoMachineActiveTrustAnchorCount
responses:
'200':
description: A successful response.
schema:
type: object
properties:
count:
type: string
format: uint64
default:
description: An unexpected error response.
schema:
type: object
properties:
code:
type: integer
format: int32
message:
type: string
details:
type: array
items:
type: object
properties:
'@type':
type: string
additionalProperties: {}
tags:
- Query
/planetmint/machine/address/{address}:
get:
summary: Queries a list of GetMachineByAddress items.
@ -77236,6 +77269,12 @@ definitions:
count:
type: string
format: uint64
planetmintgo.machine.QueryActiveTrustAnchorCountResponse:
type: object
properties:
count:
type: string
format: uint64
planetmintgo.machine.QueryGetLiquidAssetsByMachineidResponse:
type: object
properties:

View File

@ -10,6 +10,7 @@ import (
type MQTTMonitorClientI interface {
AddParticipant(address string, lastSeenTS int64) (err error)
SelectPoPParticipantsOutOfActiveActors() (challenger string, challengee string, err error)
GetActiveActorCount() (count uint64)
Start() (err error)
}
@ -62,3 +63,9 @@ func AddParticipant(address string, lastSeenTS int64) (err error) {
monitorMutex.RUnlock()
return
}
func GetActiveActorCount() (count uint64) {
monitorMutex.RLock()
defer monitorMutex.RUnlock()
return mqttMonitorInstance.GetActiveActorCount()
}

View File

@ -27,6 +27,10 @@ func (m *MockMQTTMonitorClientI) SelectPoPParticipantsOutOfActiveActors() (strin
return challenger, challengee, nil
}
func (m *MockMQTTMonitorClientI) GetActiveActorCount() (count uint64) {
return uint64(len(m.myStringList))
}
// Start mocks base method.
func (m *MockMQTTMonitorClientI) Start() error {
return nil

View File

@ -180,6 +180,11 @@ func (mms *MqttMonitor) SelectPoPParticipantsOutOfActiveActors() (challenger str
return
}
func (mms *MqttMonitor) GetActiveActorCount() (count uint64) {
count = uint64(mms.getNumDBElements())
return
}
func (mms *MqttMonitor) MqttMsgHandler(_ mqtt.Client, msg mqtt.Message) {
if mms.IsTerminated() {
return

View File

@ -106,3 +106,25 @@ func TestIsLegitMachineAddress(t *testing.T) {
assert.NoError(t, err)
assert.Equal(t, active, true)
}
func TestGetActiveActorCount(t *testing.T) {
cfg := config.GetConfig()
db, err := leveldb.Open(storage.NewMemStorage(), nil)
assert.NoError(t, err)
defer db.Close()
mqttMonitor := monitor.NewMqttMonitorService(db, *cfg)
err = mqttMonitor.Start()
assert.NoError(t, err)
currentTime := time.Now()
unixTime := currentTime.Unix()
err = mqttMonitor.AddParticipant(challengerInput, unixTime)
assert.NoError(t, err)
err = mqttMonitor.AddParticipant(challengeeInput, unixTime)
assert.NoError(t, err)
mqttMonitor.CleanupDB()
count := mqttMonitor.GetActiveActorCount()
assert.Equal(t, uint64(2), count)
}

View File

@ -44,6 +44,11 @@ service Query {
}
// Queries a list of ActiveTrustAnchorCount items.
rpc ActiveTrustAnchorCount (QueryActiveTrustAnchorCountRequest) returns (QueryActiveTrustAnchorCountResponse) {
option (google.api.http).get = "/planetmint/machine/active_trust_anchor_count";
}
// Queries a list of ActivatedTrustAnchorCount items.
rpc ActivatedTrustAnchorCount (QueryActivatedTrustAnchorCountRequest) returns (QueryActivatedTrustAnchorCountResponse) {
option (google.api.http).get = "/planetmint/machine/activated_trust_anchor_count";
@ -93,6 +98,12 @@ message QueryGetLiquidAssetsByMachineidResponse {
LiquidAsset liquidAssetEntry = 1;
}
message QueryActiveTrustAnchorCountRequest {}
message QueryActiveTrustAnchorCountResponse {
uint64 count = 1;
}
message QueryActivatedTrustAnchorCountRequest {}
message QueryActivatedTrustAnchorCountResponse {

View File

@ -32,6 +32,7 @@ func GetQueryCmd(_ string) *cobra.Command {
cmd.AddCommand(CmdGetLiquidAssetsByMachineid())
cmd.AddCommand(CmdActiveTrustAnchorCount())
cmd.AddCommand(CmdActivatedTrustAnchorCount())
// this line is used by starport scaffolding # 1

View File

@ -0,0 +1,41 @@
package cli
import (
"strconv"
"github.com/cosmos/cosmos-sdk/client"
"github.com/cosmos/cosmos-sdk/client/flags"
"github.com/planetmint/planetmint-go/x/machine/types"
"github.com/spf13/cobra"
)
var _ = strconv.Itoa(0)
func CmdActiveTrustAnchorCount() *cobra.Command {
cmd := &cobra.Command{
Use: "active-trust-anchor-count",
Short: "Query active-trust-anchor-count",
Args: cobra.ExactArgs(0),
RunE: func(cmd *cobra.Command, args []string) (err error) {
clientCtx, err := client.GetClientQueryContext(cmd)
if err != nil {
return err
}
queryClient := types.NewQueryClient(clientCtx)
params := &types.QueryActiveTrustAnchorCountRequest{}
res, err := queryClient.ActiveTrustAnchorCount(cmd.Context(), params)
if err != nil {
return err
}
return clientCtx.PrintProto(res)
},
}
flags.AddQueryFlagsToCmd(cmd)
return cmd
}

View File

@ -0,0 +1,20 @@
package keeper
import (
"context"
"github.com/planetmint/planetmint-go/monitor"
"github.com/planetmint/planetmint-go/x/machine/types"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
)
func (k Keeper) ActiveTrustAnchorCount(_ context.Context, req *types.QueryActiveTrustAnchorCountRequest) (*types.QueryActiveTrustAnchorCountResponse, error) {
if req == nil {
return nil, status.Error(codes.InvalidArgument, "invalid request")
}
count := monitor.GetActiveActorCount()
return &types.QueryActiveTrustAnchorCountResponse{Count: count}, nil
}

View File

@ -477,6 +477,86 @@ func (m *QueryGetLiquidAssetsByMachineidResponse) GetLiquidAssetEntry() *LiquidA
return nil
}
type QueryActiveTrustAnchorCountRequest struct {
}
func (m *QueryActiveTrustAnchorCountRequest) Reset() { *m = QueryActiveTrustAnchorCountRequest{} }
func (m *QueryActiveTrustAnchorCountRequest) String() string { return proto.CompactTextString(m) }
func (*QueryActiveTrustAnchorCountRequest) ProtoMessage() {}
func (*QueryActiveTrustAnchorCountRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_bf7841d43d757203, []int{10}
}
func (m *QueryActiveTrustAnchorCountRequest) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *QueryActiveTrustAnchorCountRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_QueryActiveTrustAnchorCountRequest.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (m *QueryActiveTrustAnchorCountRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_QueryActiveTrustAnchorCountRequest.Merge(m, src)
}
func (m *QueryActiveTrustAnchorCountRequest) XXX_Size() int {
return m.Size()
}
func (m *QueryActiveTrustAnchorCountRequest) XXX_DiscardUnknown() {
xxx_messageInfo_QueryActiveTrustAnchorCountRequest.DiscardUnknown(m)
}
var xxx_messageInfo_QueryActiveTrustAnchorCountRequest proto.InternalMessageInfo
type QueryActiveTrustAnchorCountResponse struct {
Count uint64 `protobuf:"varint,1,opt,name=count,proto3" json:"count,omitempty"`
}
func (m *QueryActiveTrustAnchorCountResponse) Reset() { *m = QueryActiveTrustAnchorCountResponse{} }
func (m *QueryActiveTrustAnchorCountResponse) String() string { return proto.CompactTextString(m) }
func (*QueryActiveTrustAnchorCountResponse) ProtoMessage() {}
func (*QueryActiveTrustAnchorCountResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_bf7841d43d757203, []int{11}
}
func (m *QueryActiveTrustAnchorCountResponse) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *QueryActiveTrustAnchorCountResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_QueryActiveTrustAnchorCountResponse.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (m *QueryActiveTrustAnchorCountResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_QueryActiveTrustAnchorCountResponse.Merge(m, src)
}
func (m *QueryActiveTrustAnchorCountResponse) XXX_Size() int {
return m.Size()
}
func (m *QueryActiveTrustAnchorCountResponse) XXX_DiscardUnknown() {
xxx_messageInfo_QueryActiveTrustAnchorCountResponse.DiscardUnknown(m)
}
var xxx_messageInfo_QueryActiveTrustAnchorCountResponse proto.InternalMessageInfo
func (m *QueryActiveTrustAnchorCountResponse) GetCount() uint64 {
if m != nil {
return m.Count
}
return 0
}
type QueryActivatedTrustAnchorCountRequest struct {
}
@ -484,7 +564,7 @@ func (m *QueryActivatedTrustAnchorCountRequest) Reset() { *m = QueryActi
func (m *QueryActivatedTrustAnchorCountRequest) String() string { return proto.CompactTextString(m) }
func (*QueryActivatedTrustAnchorCountRequest) ProtoMessage() {}
func (*QueryActivatedTrustAnchorCountRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_bf7841d43d757203, []int{10}
return fileDescriptor_bf7841d43d757203, []int{12}
}
func (m *QueryActivatedTrustAnchorCountRequest) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@ -523,7 +603,7 @@ func (m *QueryActivatedTrustAnchorCountResponse) Reset() {
func (m *QueryActivatedTrustAnchorCountResponse) String() string { return proto.CompactTextString(m) }
func (*QueryActivatedTrustAnchorCountResponse) ProtoMessage() {}
func (*QueryActivatedTrustAnchorCountResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_bf7841d43d757203, []int{11}
return fileDescriptor_bf7841d43d757203, []int{13}
}
func (m *QueryActivatedTrustAnchorCountResponse) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@ -570,6 +650,8 @@ func init() {
proto.RegisterType((*QueryGetMachineByAddressResponse)(nil), "planetmintgo.machine.QueryGetMachineByAddressResponse")
proto.RegisterType((*QueryGetLiquidAssetsByMachineidRequest)(nil), "planetmintgo.machine.QueryGetLiquidAssetsByMachineidRequest")
proto.RegisterType((*QueryGetLiquidAssetsByMachineidResponse)(nil), "planetmintgo.machine.QueryGetLiquidAssetsByMachineidResponse")
proto.RegisterType((*QueryActiveTrustAnchorCountRequest)(nil), "planetmintgo.machine.QueryActiveTrustAnchorCountRequest")
proto.RegisterType((*QueryActiveTrustAnchorCountResponse)(nil), "planetmintgo.machine.QueryActiveTrustAnchorCountResponse")
proto.RegisterType((*QueryActivatedTrustAnchorCountRequest)(nil), "planetmintgo.machine.QueryActivatedTrustAnchorCountRequest")
proto.RegisterType((*QueryActivatedTrustAnchorCountResponse)(nil), "planetmintgo.machine.QueryActivatedTrustAnchorCountResponse")
}
@ -577,55 +659,58 @@ func init() {
func init() { proto.RegisterFile("planetmintgo/machine/query.proto", fileDescriptor_bf7841d43d757203) }
var fileDescriptor_bf7841d43d757203 = []byte{
// 759 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x56, 0x4f, 0x4f, 0x13, 0x4f,
0x18, 0xee, 0x12, 0xfe, 0x0e, 0x97, 0x5f, 0x86, 0xfe, 0x12, 0xdc, 0xd4, 0x52, 0x26, 0xc1, 0x22,
0x91, 0x8e, 0x94, 0xf0, 0x27, 0x82, 0xc6, 0x56, 0xd4, 0x10, 0x6d, 0x02, 0xd5, 0x93, 0xc6, 0x34,
0xd3, 0xed, 0x64, 0xd9, 0xd8, 0xee, 0x2c, 0x9d, 0x59, 0x42, 0x43, 0x38, 0xe8, 0x27, 0x30, 0xf1,
0xa3, 0x78, 0xf7, 0xe4, 0x81, 0x23, 0x89, 0x17, 0x4f, 0xc6, 0x80, 0x77, 0xbf, 0x82, 0xe9, 0xec,
0x6c, 0x77, 0xa1, 0xc3, 0xf2, 0xc7, 0x53, 0x77, 0xdf, 0x3e, 0xcf, 0xfb, 0x3e, 0xcf, 0x3b, 0xf3,
0xbe, 0x2d, 0xc8, 0x79, 0x4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 0x1d,
0xc4, 0xe6, 0x86, 0xb4, 0x74, 0xeb, 0xc2, 0xd1, 0x86, 0x6b, 0x09, 0x9a, 0x2e, 0xdb, 0x1c, 0xe6,
0xfa, 0xcd, 0xc8, 0xca, 0xcf, 0xaa, 0xf4, 0x53, 0x84, 0xf7, 0xb5, 0x47, 0x13, 0xd2, 0x6b, 0xf1,
0x8b, 0x56, 0x93, 0x1b, 0xa7, 0x5c, 0x39, 0x3a, 0xc9, 0x1a, 0xc7, 0x27, 0x59, 0xe3, 0xd7, 0x49,
0xd6, 0xf8, 0x74, 0x9a, 0x4d, 0x1d, 0x9f, 0x66, 0x53, 0x3f, 0x4e, 0xb3, 0xa9, 0x37, 0x8b, 0xb6,
0x23, 0x76, 0xfc, 0x7a, 0xc1, 0x62, 0xad, 0x78, 0xd6, 0xe8, 0x71, 0xde, 0x66, 0x78, 0x3f, 0xba,
0xc4, 0x1d, 0x8f, 0xf2, 0xfa, 0xb0, 0xfc, 0xfb, 0xb0, 0xf8, 0x37, 0x00, 0x00, 0xff, 0xff, 0x84,
0x0f, 0x24, 0xf7, 0x48, 0x09, 0x00, 0x00,
// 803 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x56, 0x4d, 0x6f, 0xd3, 0x48,
0x18, 0x8e, 0xab, 0x7e, 0x6c, 0xa7, 0x97, 0xd5, 0x34, 0xbb, 0xea, 0x5a, 0xd9, 0x34, 0xf5, 0x6e,
0x49, 0xa9, 0x68, 0x86, 0xa6, 0xea, 0x07, 0xa4, 0x20, 0x12, 0x0a, 0xa8, 0x82, 0x48, 0x6d, 0xe0,
0x04, 0x42, 0xd1, 0xc4, 0x19, 0xb9, 0x16, 0x89, 0xc7, 0xcd, 0x8c, 0xab, 0x46, 0x55, 0x0f, 0xf0,
0x0b, 0x90, 0xf8, 0x29, 0x48, 0x1c, 0x39, 0x71, 0xe8, 0xb1, 0x12, 0x17, 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, 0xd2, 0xa4, 0x87, 0x05, 0xe1, 0x21, 0x0f, 0x67, 0x55, 0x1e,
0x64, 0x58, 0xa1, 0x03, 0xf9, 0x70, 0x08, 0x8f, 0x35, 0xa0, 0x0f, 0x4e, 0x03, 0xb8, 0x9e, 0xac,
0x22, 0x39, 0x8c, 0xf4, 0x7b, 0xd7, 0x64, 0x4b, 0x2b, 0xcb, 0xc2, 0x0a, 0x82, 0x0b, 0x2a, 0x2b,
0xf1, 0x2f, 0x6e, 0xb4, 0x11, 0x9b, 0x1b, 0xe2, 0x3c, 0xfd, 0xad, 0x0e, 0x10, 0x98, 0x74, 0xb0,
0x13, 0x93, 0x49, 0xbf, 0x73, 0x0d, 0xe6, 0x65, 0x6c, 0x88, 0xaf, 0x0f, 0xa9, 0xc7, 0x0f, 0x57,
0x5d, 0xa4, 0x8c, 0xbf, 0x33, 0xff, 0x0c, 0x4c, 0x28, 0x58, 0xba, 0x48, 0x4f, 0x42, 0x00, 0xea,
0xeb, 0xd7, 0x23, 0x4b, 0x3f, 0x6b, 0xc2, 0x4f, 0x11, 0xde, 0x1e, 0xe8, 0xc7, 0xa7, 0x2b, 0x2c,
0x55, 0xaa, 0x47, 0x27, 0x59, 0xed, 0xf8, 0x24, 0xab, 0xfd, 0x38, 0xc9, 0x6a, 0xef, 0x4f, 0xb3,
0xa9, 0xe3, 0xd3, 0x6c, 0xea, 0xdb, 0x69, 0x36, 0xf5, 0x72, 0xc9, 0xb2, 0xf9, 0x8e, 0xd7, 0x28,
0x98, 0xb4, 0x1d, 0xaf, 0x1a, 0x3d, 0x2e, 0x58, 0x14, 0xed, 0x47, 0x77, 0xb1, 0xeb, 0x12, 0xd6,
0x18, 0x15, 0x3f, 0xb4, 0x96, 0x7e, 0x05, 0x00, 0x00, 0xff, 0xff, 0xc1, 0xb3, 0x94, 0x4b, 0x72,
0x0a, 0x00, 0x00,
}
// Reference imports to suppress errors if they are not otherwise used.
@ -650,6 +735,8 @@ type QueryClient interface {
GetMachineByAddress(ctx context.Context, in *QueryGetMachineByAddressRequest, opts ...grpc.CallOption) (*QueryGetMachineByAddressResponse, error)
// Queries a list of GetLiquidAssetsByMachineid items.
GetLiquidAssetsByMachineid(ctx context.Context, in *QueryGetLiquidAssetsByMachineidRequest, opts ...grpc.CallOption) (*QueryGetLiquidAssetsByMachineidResponse, error)
// Queries a list of ActiveTrustAnchorCount items.
ActiveTrustAnchorCount(ctx context.Context, in *QueryActiveTrustAnchorCountRequest, opts ...grpc.CallOption) (*QueryActiveTrustAnchorCountResponse, error)
// Queries a list of ActivatedTrustAnchorCount items.
ActivatedTrustAnchorCount(ctx context.Context, in *QueryActivatedTrustAnchorCountRequest, opts ...grpc.CallOption) (*QueryActivatedTrustAnchorCountResponse, error)
}
@ -707,6 +794,15 @@ func (c *queryClient) GetLiquidAssetsByMachineid(ctx context.Context, in *QueryG
return out, nil
}
func (c *queryClient) ActiveTrustAnchorCount(ctx context.Context, in *QueryActiveTrustAnchorCountRequest, opts ...grpc.CallOption) (*QueryActiveTrustAnchorCountResponse, error) {
out := new(QueryActiveTrustAnchorCountResponse)
err := c.cc.Invoke(ctx, "/planetmintgo.machine.Query/ActiveTrustAnchorCount", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *queryClient) ActivatedTrustAnchorCount(ctx context.Context, in *QueryActivatedTrustAnchorCountRequest, opts ...grpc.CallOption) (*QueryActivatedTrustAnchorCountResponse, error) {
out := new(QueryActivatedTrustAnchorCountResponse)
err := c.cc.Invoke(ctx, "/planetmintgo.machine.Query/ActivatedTrustAnchorCount", in, out, opts...)
@ -728,6 +824,8 @@ type QueryServer interface {
GetMachineByAddress(context.Context, *QueryGetMachineByAddressRequest) (*QueryGetMachineByAddressResponse, error)
// Queries a list of GetLiquidAssetsByMachineid items.
GetLiquidAssetsByMachineid(context.Context, *QueryGetLiquidAssetsByMachineidRequest) (*QueryGetLiquidAssetsByMachineidResponse, error)
// Queries a list of ActiveTrustAnchorCount items.
ActiveTrustAnchorCount(context.Context, *QueryActiveTrustAnchorCountRequest) (*QueryActiveTrustAnchorCountResponse, error)
// Queries a list of ActivatedTrustAnchorCount items.
ActivatedTrustAnchorCount(context.Context, *QueryActivatedTrustAnchorCountRequest) (*QueryActivatedTrustAnchorCountResponse, error)
}
@ -751,6 +849,9 @@ func (*UnimplementedQueryServer) GetMachineByAddress(ctx context.Context, req *Q
func (*UnimplementedQueryServer) GetLiquidAssetsByMachineid(ctx context.Context, req *QueryGetLiquidAssetsByMachineidRequest) (*QueryGetLiquidAssetsByMachineidResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetLiquidAssetsByMachineid not implemented")
}
func (*UnimplementedQueryServer) ActiveTrustAnchorCount(ctx context.Context, req *QueryActiveTrustAnchorCountRequest) (*QueryActiveTrustAnchorCountResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ActiveTrustAnchorCount not implemented")
}
func (*UnimplementedQueryServer) ActivatedTrustAnchorCount(ctx context.Context, req *QueryActivatedTrustAnchorCountRequest) (*QueryActivatedTrustAnchorCountResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ActivatedTrustAnchorCount not implemented")
}
@ -849,6 +950,24 @@ func _Query_GetLiquidAssetsByMachineid_Handler(srv interface{}, ctx context.Cont
return interceptor(ctx, in, info, handler)
}
func _Query_ActiveTrustAnchorCount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(QueryActiveTrustAnchorCountRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(QueryServer).ActiveTrustAnchorCount(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/planetmintgo.machine.Query/ActiveTrustAnchorCount",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(QueryServer).ActiveTrustAnchorCount(ctx, req.(*QueryActiveTrustAnchorCountRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Query_ActivatedTrustAnchorCount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(QueryActivatedTrustAnchorCountRequest)
if err := dec(in); err != nil {
@ -891,6 +1010,10 @@ var _Query_serviceDesc = grpc.ServiceDesc{
MethodName: "GetLiquidAssetsByMachineid",
Handler: _Query_GetLiquidAssetsByMachineid_Handler,
},
{
MethodName: "ActiveTrustAnchorCount",
Handler: _Query_ActiveTrustAnchorCount_Handler,
},
{
MethodName: "ActivatedTrustAnchorCount",
Handler: _Query_ActivatedTrustAnchorCount_Handler,
@ -1221,6 +1344,57 @@ func (m *QueryGetLiquidAssetsByMachineidResponse) MarshalToSizedBuffer(dAtA []by
return len(dAtA) - i, nil
}
func (m *QueryActiveTrustAnchorCountRequest) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalToSizedBuffer(dAtA[:size])
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *QueryActiveTrustAnchorCountRequest) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *QueryActiveTrustAnchorCountRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
return len(dAtA) - i, nil
}
func (m *QueryActiveTrustAnchorCountResponse) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalToSizedBuffer(dAtA[:size])
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *QueryActiveTrustAnchorCountResponse) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *QueryActiveTrustAnchorCountResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if m.Count != 0 {
i = encodeVarintQuery(dAtA, i, uint64(m.Count))
i--
dAtA[i] = 0x8
}
return len(dAtA) - i, nil
}
func (m *QueryActivatedTrustAnchorCountRequest) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
@ -1410,6 +1584,27 @@ func (m *QueryGetLiquidAssetsByMachineidResponse) Size() (n int) {
return n
}
func (m *QueryActiveTrustAnchorCountRequest) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
return n
}
func (m *QueryActiveTrustAnchorCountResponse) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
if m.Count != 0 {
n += 1 + sovQuery(uint64(m.Count))
}
return n
}
func (m *QueryActivatedTrustAnchorCountRequest) Size() (n int) {
if m == nil {
return 0
@ -2258,6 +2453,125 @@ func (m *QueryGetLiquidAssetsByMachineidResponse) Unmarshal(dAtA []byte) error {
}
return nil
}
func (m *QueryActiveTrustAnchorCountRequest) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowQuery
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: QueryActiveTrustAnchorCountRequest: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: QueryActiveTrustAnchorCountRequest: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
default:
iNdEx = preIndex
skippy, err := skipQuery(dAtA[iNdEx:])
if err != nil {
return err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthQuery
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *QueryActiveTrustAnchorCountResponse) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowQuery
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: QueryActiveTrustAnchorCountResponse: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: QueryActiveTrustAnchorCountResponse: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field Count", wireType)
}
m.Count = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowQuery
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.Count |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
default:
iNdEx = preIndex
skippy, err := skipQuery(dAtA[iNdEx:])
if err != nil {
return err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthQuery
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *QueryActivatedTrustAnchorCountRequest) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0

View File

@ -267,6 +267,24 @@ func local_request_Query_GetLiquidAssetsByMachineid_0(ctx context.Context, marsh
}
func request_Query_ActiveTrustAnchorCount_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq QueryActiveTrustAnchorCountRequest
var metadata runtime.ServerMetadata
msg, err := client.ActiveTrustAnchorCount(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err
}
func local_request_Query_ActiveTrustAnchorCount_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq QueryActiveTrustAnchorCountRequest
var metadata runtime.ServerMetadata
msg, err := server.ActiveTrustAnchorCount(ctx, &protoReq)
return msg, metadata, err
}
func request_Query_ActivatedTrustAnchorCount_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq QueryActivatedTrustAnchorCountRequest
var metadata runtime.ServerMetadata
@ -406,6 +424,29 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv
})
mux.Handle("GET", pattern_Query_ActiveTrustAnchorCount_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := local_request_Query_ActiveTrustAnchorCount_0(rctx, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_Query_ActiveTrustAnchorCount_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("GET", pattern_Query_ActivatedTrustAnchorCount_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
@ -570,6 +611,26 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie
})
mux.Handle("GET", pattern_Query_ActiveTrustAnchorCount_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateContext(ctx, mux, req)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := request_Query_ActiveTrustAnchorCount_0(rctx, inboundMarshaler, client, req, pathParams)
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_Query_ActiveTrustAnchorCount_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("GET", pattern_Query_ActivatedTrustAnchorCount_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
@ -604,6 +665,8 @@ var (
pattern_Query_GetLiquidAssetsByMachineid_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"planetmint", "machine", "liquid_assets", "machineID"}, "", runtime.AssumeColonVerbOpt(true)))
pattern_Query_ActiveTrustAnchorCount_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"planetmint", "machine", "active_trust_anchor_count"}, "", runtime.AssumeColonVerbOpt(true)))
pattern_Query_ActivatedTrustAnchorCount_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"planetmint", "machine", "activated_trust_anchor_count"}, "", runtime.AssumeColonVerbOpt(true)))
)
@ -618,5 +681,7 @@ var (
forward_Query_GetLiquidAssetsByMachineid_0 = runtime.ForwardResponseMessage
forward_Query_ActiveTrustAnchorCount_0 = runtime.ForwardResponseMessage
forward_Query_ActivatedTrustAnchorCount_0 = runtime.ForwardResponseMessage
)