Documentation ¶
Overview ¶
Package config contains
- chaincode methods names {service_name}Chaincode_{method_name}
- chaincode interface definition {service_name}Chaincode
- chaincode gateway definition {service_name}}Gateway
- chaincode service to cckit router registration func
Package config is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Constants
- Variables
- func CreateDefaultToken(ctx router.Context, configSvc ConfigServiceChaincode, ...) ([]string, error)
- func Event(ctx router.Context) state.Event
- func RegisterConfigServiceChaincode(r *cckit_router.Group, cc ConfigServiceChaincode) error
- func RegisterConfigServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterConfigServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ConfigServiceClient) error
- func RegisterConfigServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterConfigServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ConfigServiceServer) error
- func RegisterConfigServiceServer(s *grpc.Server, srv ConfigServiceServer)
- func State(ctx router.Context) m.MappedState
- func TokenByTypeGroup(tokenType *TokenType, tokenGroup *TokenGroup) []string
- type Config
- func (*Config) Descriptor() ([]byte, []int)deprecated
- func (x *Config) GetDefaultToken() []string
- func (x *Config) GetMaxTokenGroupsNum() int32
- func (x *Config) GetMaxTokenTypesNum() int32
- func (*Config) ProtoMessage()
- func (x *Config) ProtoReflect() protoreflect.Message
- func (x *Config) Reset()
- func (x *Config) String() string
- func (this *Config) Validate() error
- type ConfigServiceChaincode
- type ConfigServiceChaincodeLocalResolver
- type ConfigServiceChaincodeLocatorResolver
- type ConfigServiceChaincodeResolver
- type ConfigServiceChaincodeStubInvoker
- func (c *ConfigServiceChaincodeStubInvoker) CreateTokenGroup(ctx cckit_router.Context, in *CreateTokenGroupRequest) (*TokenGroup, error)
- func (c *ConfigServiceChaincodeStubInvoker) CreateTokenType(ctx cckit_router.Context, in *CreateTokenTypeRequest) (*TokenType, error)
- func (c *ConfigServiceChaincodeStubInvoker) DeleteTokenGroup(ctx cckit_router.Context, in *TokenGroupId) (*Token, error)
- func (c *ConfigServiceChaincodeStubInvoker) DeleteTokenType(ctx cckit_router.Context, in *TokenTypeId) (*TokenType, error)
- func (c *ConfigServiceChaincodeStubInvoker) GetConfig(ctx cckit_router.Context, in *emptypb.Empty) (*Config, error)
- func (c *ConfigServiceChaincodeStubInvoker) GetDefaultToken(ctx cckit_router.Context, in *emptypb.Empty) (*Token, error)
- func (c *ConfigServiceChaincodeStubInvoker) GetToken(ctx cckit_router.Context, in *TokenId) (*Token, error)
- func (c *ConfigServiceChaincodeStubInvoker) GetTokenGroup(ctx cckit_router.Context, in *TokenGroupId) (*TokenGroup, error)
- func (c *ConfigServiceChaincodeStubInvoker) GetTokenGroups(ctx cckit_router.Context, in *TokenTypeId) (*TokenGroups, error)
- func (c *ConfigServiceChaincodeStubInvoker) GetTokenType(ctx cckit_router.Context, in *TokenTypeId) (*TokenType, error)
- func (c *ConfigServiceChaincodeStubInvoker) ListTokenTypes(ctx cckit_router.Context, in *emptypb.Empty) (*TokenTypes, error)
- func (c *ConfigServiceChaincodeStubInvoker) SetConfig(ctx cckit_router.Context, in *Config) (*Config, error)
- func (c *ConfigServiceChaincodeStubInvoker) UpdateTokenType(ctx cckit_router.Context, in *UpdateTokenTypeRequest) (*TokenType, error)
- type ConfigServiceClient
- type ConfigServiceGateway
- func (c *ConfigServiceGateway) CreateTokenGroup(ctx context.Context, in *CreateTokenGroupRequest) (*TokenGroup, error)
- func (c *ConfigServiceGateway) CreateTokenType(ctx context.Context, in *CreateTokenTypeRequest) (*TokenType, error)
- func (c *ConfigServiceGateway) DeleteTokenGroup(ctx context.Context, in *TokenGroupId) (*Token, error)
- func (c *ConfigServiceGateway) DeleteTokenType(ctx context.Context, in *TokenTypeId) (*TokenType, error)
- func (c *ConfigServiceGateway) GetConfig(ctx context.Context, in *emptypb.Empty) (*Config, error)
- func (c *ConfigServiceGateway) GetDefaultToken(ctx context.Context, in *emptypb.Empty) (*Token, error)
- func (c *ConfigServiceGateway) GetToken(ctx context.Context, in *TokenId) (*Token, error)
- func (c *ConfigServiceGateway) GetTokenGroup(ctx context.Context, in *TokenGroupId) (*TokenGroup, error)
- func (c *ConfigServiceGateway) GetTokenGroups(ctx context.Context, in *TokenTypeId) (*TokenGroups, error)
- func (c *ConfigServiceGateway) GetTokenType(ctx context.Context, in *TokenTypeId) (*TokenType, error)
- func (c *ConfigServiceGateway) Invoker() cckit_gateway.ChaincodeInstanceInvoker
- func (c *ConfigServiceGateway) ListTokenTypes(ctx context.Context, in *emptypb.Empty) (*TokenTypes, error)
- func (c *ConfigServiceGateway) ServiceDef() cckit_gateway.ServiceDef
- func (c *ConfigServiceGateway) SetConfig(ctx context.Context, in *Config) (*Config, error)
- func (c *ConfigServiceGateway) UpdateTokenType(ctx context.Context, in *UpdateTokenTypeRequest) (*TokenType, error)
- type ConfigServiceServer
- type CreateTokenGroupRequest
- func (*CreateTokenGroupRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CreateTokenGroupRequest) GetMeta() []*TokenMetaRequest
- func (x *CreateTokenGroupRequest) GetName() []string
- func (x *CreateTokenGroupRequest) GetTokenType() string
- func (x *CreateTokenGroupRequest) GetTotalSupply() uint64
- func (*CreateTokenGroupRequest) ProtoMessage()
- func (x *CreateTokenGroupRequest) ProtoReflect() protoreflect.Message
- func (x *CreateTokenGroupRequest) Reset()
- func (x *CreateTokenGroupRequest) String() string
- func (this *CreateTokenGroupRequest) Validate() error
- type CreateTokenTypeRequest
- func (*CreateTokenTypeRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CreateTokenTypeRequest) GetDecimals() uint32
- func (x *CreateTokenTypeRequest) GetGroupType() TokenGroupType
- func (x *CreateTokenTypeRequest) GetMeta() []*TokenMetaRequest
- func (x *CreateTokenTypeRequest) GetName() string
- func (x *CreateTokenTypeRequest) GetSymbol() string
- func (x *CreateTokenTypeRequest) GetTotalSupply() uint64
- func (*CreateTokenTypeRequest) ProtoMessage()
- func (x *CreateTokenTypeRequest) ProtoReflect() protoreflect.Message
- func (x *CreateTokenTypeRequest) Reset()
- func (x *CreateTokenTypeRequest) String() string
- func (this *CreateTokenTypeRequest) Validate() error
- type StateService
- func (s *StateService) CreateTokenGroup(ctx router.Context, req *CreateTokenGroupRequest) (*TokenGroup, error)
- func (s *StateService) CreateTokenType(ctx router.Context, req *CreateTokenTypeRequest) (*TokenType, error)
- func (s *StateService) DeleteTokenGroup(ctx router.Context, id *TokenGroupId) (*Token, error)
- func (s *StateService) DeleteTokenType(ctx router.Context, id *TokenTypeId) (*TokenType, error)
- func (s *StateService) GetConfig(ctx router.Context, _ *emptypb.Empty) (*Config, error)
- func (s *StateService) GetDefaultToken(ctx router.Context, _ *emptypb.Empty) (*Token, error)
- func (s *StateService) GetToken(ctx router.Context, id *TokenId) (*Token, error)
- func (s *StateService) GetTokenGroup(ctx router.Context, id *TokenGroupId) (*TokenGroup, error)
- func (s *StateService) GetTokenGroups(ctx router.Context, id *TokenTypeId) (*TokenGroups, error)
- func (s *StateService) GetTokenType(ctx router.Context, id *TokenTypeId) (*TokenType, error)
- func (s *StateService) ListTokenTypes(ctx router.Context, _ *emptypb.Empty) (*TokenTypes, error)
- func (s *StateService) SetConfig(ctx router.Context, config *Config) (*Config, error)
- func (s *StateService) UpdateTokenType(ctx router.Context, request *UpdateTokenTypeRequest) (*TokenType, error)
- type Token
- func (*Token) Descriptor() ([]byte, []int)deprecated
- func (x *Token) GetGroup() *TokenGroup
- func (x *Token) GetToken() []string
- func (x *Token) GetType() *TokenType
- func (*Token) ProtoMessage()
- func (x *Token) ProtoReflect() protoreflect.Message
- func (x *Token) Reset()
- func (x *Token) String() string
- func (this *Token) Validate() error
- type TokenGetter
- type TokenGroup
- func (*TokenGroup) Descriptor() ([]byte, []int)deprecated
- func (x *TokenGroup) GetMeta() []*TokenMeta
- func (x *TokenGroup) GetName() []string
- func (x *TokenGroup) GetTokenType() string
- func (x *TokenGroup) GetTotalSupply() uint64
- func (*TokenGroup) ProtoMessage()
- func (x *TokenGroup) ProtoReflect() protoreflect.Message
- func (x *TokenGroup) Reset()
- func (x *TokenGroup) String() string
- func (this *TokenGroup) Validate() error
- type TokenGroupCreated
- func (*TokenGroupCreated) Descriptor() ([]byte, []int)deprecated
- func (x *TokenGroupCreated) GetName() []string
- func (x *TokenGroupCreated) GetTokenType() string
- func (*TokenGroupCreated) ProtoMessage()
- func (x *TokenGroupCreated) ProtoReflect() protoreflect.Message
- func (x *TokenGroupCreated) Reset()
- func (x *TokenGroupCreated) String() string
- func (this *TokenGroupCreated) Validate() error
- type TokenGroupId
- func (*TokenGroupId) Descriptor() ([]byte, []int)deprecated
- func (x *TokenGroupId) GetName() []string
- func (x *TokenGroupId) GetTokenName() string
- func (*TokenGroupId) ProtoMessage()
- func (x *TokenGroupId) ProtoReflect() protoreflect.Message
- func (x *TokenGroupId) Reset()
- func (x *TokenGroupId) String() string
- func (this *TokenGroupId) Validate() error
- type TokenGroupType
- func (TokenGroupType) Descriptor() protoreflect.EnumDescriptor
- func (x TokenGroupType) Enum() *TokenGroupType
- func (TokenGroupType) EnumDescriptor() ([]byte, []int)deprecated
- func (x TokenGroupType) Number() protoreflect.EnumNumber
- func (x TokenGroupType) String() string
- func (TokenGroupType) Type() protoreflect.EnumType
- type TokenGroups
- func (*TokenGroups) Descriptor() ([]byte, []int)deprecated
- func (x *TokenGroups) GetGroups() []*TokenGroup
- func (*TokenGroups) ProtoMessage()
- func (x *TokenGroups) ProtoReflect() protoreflect.Message
- func (x *TokenGroups) Reset()
- func (x *TokenGroups) String() string
- func (this *TokenGroups) Validate() error
- type TokenId
- type TokenMeta
- func (*TokenMeta) Descriptor() ([]byte, []int)deprecated
- func (x *TokenMeta) GetKey() string
- func (x *TokenMeta) GetValue() string
- func (*TokenMeta) ProtoMessage()
- func (x *TokenMeta) ProtoReflect() protoreflect.Message
- func (x *TokenMeta) Reset()
- func (x *TokenMeta) String() string
- func (this *TokenMeta) Validate() error
- type TokenMetaRequest
- func (*TokenMetaRequest) Descriptor() ([]byte, []int)deprecated
- func (x *TokenMetaRequest) GetKey() string
- func (x *TokenMetaRequest) GetValue() string
- func (*TokenMetaRequest) ProtoMessage()
- func (x *TokenMetaRequest) ProtoReflect() protoreflect.Message
- func (x *TokenMetaRequest) Reset()
- func (x *TokenMetaRequest) String() string
- func (this *TokenMetaRequest) Validate() error
- type TokenType
- func (*TokenType) Descriptor() ([]byte, []int)deprecated
- func (x *TokenType) GetDecimals() uint32
- func (x *TokenType) GetGroupType() TokenGroupType
- func (x *TokenType) GetMeta() []*TokenMeta
- func (x *TokenType) GetName() string
- func (x *TokenType) GetSymbol() string
- func (x *TokenType) GetTotalSupply() uint64
- func (*TokenType) ProtoMessage()
- func (x *TokenType) ProtoReflect() protoreflect.Message
- func (x *TokenType) Reset()
- func (x *TokenType) String() string
- func (this *TokenType) Validate() error
- type TokenTypeCreated
- func (*TokenTypeCreated) Descriptor() ([]byte, []int)deprecated
- func (x *TokenTypeCreated) GetName() string
- func (x *TokenTypeCreated) GetSymbol() string
- func (*TokenTypeCreated) ProtoMessage()
- func (x *TokenTypeCreated) ProtoReflect() protoreflect.Message
- func (x *TokenTypeCreated) Reset()
- func (x *TokenTypeCreated) String() string
- func (this *TokenTypeCreated) Validate() error
- type TokenTypeId
- func (*TokenTypeId) Descriptor() ([]byte, []int)deprecated
- func (x *TokenTypeId) GetName() string
- func (*TokenTypeId) ProtoMessage()
- func (x *TokenTypeId) ProtoReflect() protoreflect.Message
- func (x *TokenTypeId) Reset()
- func (x *TokenTypeId) String() string
- func (this *TokenTypeId) Validate() error
- type TokenTypes
- func (*TokenTypes) Descriptor() ([]byte, []int)deprecated
- func (x *TokenTypes) GetTypes() []*TokenType
- func (*TokenTypes) ProtoMessage()
- func (x *TokenTypes) ProtoReflect() protoreflect.Message
- func (x *TokenTypes) Reset()
- func (x *TokenTypes) String() string
- func (this *TokenTypes) Validate() error
- type UnimplementedConfigServiceServer
- func (*UnimplementedConfigServiceServer) CreateTokenGroup(context.Context, *CreateTokenGroupRequest) (*TokenGroup, error)
- func (*UnimplementedConfigServiceServer) CreateTokenType(context.Context, *CreateTokenTypeRequest) (*TokenType, error)
- func (*UnimplementedConfigServiceServer) DeleteTokenGroup(context.Context, *TokenGroupId) (*Token, error)
- func (*UnimplementedConfigServiceServer) DeleteTokenType(context.Context, *TokenTypeId) (*TokenType, error)
- func (*UnimplementedConfigServiceServer) GetConfig(context.Context, *emptypb.Empty) (*Config, error)
- func (*UnimplementedConfigServiceServer) GetDefaultToken(context.Context, *emptypb.Empty) (*Token, error)
- func (*UnimplementedConfigServiceServer) GetToken(context.Context, *TokenId) (*Token, error)
- func (*UnimplementedConfigServiceServer) GetTokenGroup(context.Context, *TokenGroupId) (*TokenGroup, error)
- func (*UnimplementedConfigServiceServer) GetTokenGroups(context.Context, *TokenTypeId) (*TokenGroups, error)
- func (*UnimplementedConfigServiceServer) GetTokenType(context.Context, *TokenTypeId) (*TokenType, error)
- func (*UnimplementedConfigServiceServer) ListTokenTypes(context.Context, *emptypb.Empty) (*TokenTypes, error)
- func (*UnimplementedConfigServiceServer) SetConfig(context.Context, *Config) (*Config, error)
- func (*UnimplementedConfigServiceServer) UpdateTokenType(context.Context, *UpdateTokenTypeRequest) (*TokenType, error)
- type UpdateTokenTypeRequest
- func (*UpdateTokenTypeRequest) Descriptor() ([]byte, []int)deprecated
- func (x *UpdateTokenTypeRequest) GetMeta() []*TokenMetaRequest
- func (x *UpdateTokenTypeRequest) GetName() string
- func (x *UpdateTokenTypeRequest) GetSymbol() string
- func (x *UpdateTokenTypeRequest) GetTotalSupply() uint64
- func (*UpdateTokenTypeRequest) ProtoMessage()
- func (x *UpdateTokenTypeRequest) ProtoReflect() protoreflect.Message
- func (x *UpdateTokenTypeRequest) Reset()
- func (x *UpdateTokenTypeRequest) String() string
- func (this *UpdateTokenTypeRequest) Validate() error
Constants ¶
const ( // ConfigServiceChaincodeMethodPrefix allows to use multiple services with same method names in one chaincode ConfigServiceChaincodeMethodPrefix = "" ConfigServiceChaincode_GetConfig = ConfigServiceChaincodeMethodPrefix + "GetConfig" ConfigServiceChaincode_SetConfig = ConfigServiceChaincodeMethodPrefix + "SetConfig" ConfigServiceChaincode_GetToken = ConfigServiceChaincodeMethodPrefix + "GetToken" ConfigServiceChaincode_GetDefaultToken = ConfigServiceChaincodeMethodPrefix + "GetDefaultToken" ConfigServiceChaincode_CreateTokenType = ConfigServiceChaincodeMethodPrefix + "CreateTokenType" ConfigServiceChaincode_GetTokenType = ConfigServiceChaincodeMethodPrefix + "GetTokenType" ConfigServiceChaincode_ListTokenTypes = ConfigServiceChaincodeMethodPrefix + "ListTokenTypes" ConfigServiceChaincode_UpdateTokenType = ConfigServiceChaincodeMethodPrefix + "UpdateTokenType" ConfigServiceChaincode_DeleteTokenType = ConfigServiceChaincodeMethodPrefix + "DeleteTokenType" ConfigServiceChaincode_GetTokenGroups = ConfigServiceChaincodeMethodPrefix + "GetTokenGroups" ConfigServiceChaincode_CreateTokenGroup = ConfigServiceChaincodeMethodPrefix + "CreateTokenGroup" ConfigServiceChaincode_GetTokenGroup = ConfigServiceChaincodeMethodPrefix + "GetTokenGroup" ConfigServiceChaincode_DeleteTokenGroup = ConfigServiceChaincodeMethodPrefix + "DeleteTokenGroup" )
ConfigServiceChaincode method names
Variables ¶
var ( TokenGroupType_name = map[int32]string{ 0: "OPTIONAL", 1: "REQUIRED", 3: "NOT_ALLOWED", } TokenGroupType_value = map[string]int32{ "OPTIONAL": 0, "REQUIRED": 1, "NOT_ALLOWED": 3, } )
Enum value maps for TokenGroupType.
var ( StateMappings = m.StateMappings{}. Add(&TokenType{}, m.PKeySchema(&TokenTypeId{}), m.List(&TokenTypes{})). Add(&TokenGroup{}, m.PKeySchema(&TokenGroupId{}), m.List(&TokenGroups{})). Add(&Config{}, m.WithConstPKey()) EventMappings = m.EventMappings{}. Add(&TokenTypeCreated{}). Add(&TokenGroupCreated{}) )
var ConfigServiceSwagger []byte
var (
ErrTokenAlreadyExists = errors.New(`token already exists`)
)
var File_token_service_config_config_proto protoreflect.FileDescriptor
Functions ¶
func CreateDefaultToken ¶
func CreateDefaultToken( ctx router.Context, configSvc ConfigServiceChaincode, createToken *CreateTokenTypeRequest) ([]string, error)
func RegisterConfigServiceChaincode ¶
func RegisterConfigServiceChaincode(r *cckit_router.Group, cc ConfigServiceChaincode) error
RegisterConfigServiceChaincode registers service methods as chaincode router handlers
func RegisterConfigServiceHandler ¶
func RegisterConfigServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterConfigServiceHandler registers the http handlers for service ConfigService to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterConfigServiceHandlerClient ¶
func RegisterConfigServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ConfigServiceClient) error
RegisterConfigServiceHandlerClient registers the http handlers for service ConfigService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "ConfigServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "ConfigServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "ConfigServiceClient" to call the correct interceptors.
func RegisterConfigServiceHandlerFromEndpoint ¶
func RegisterConfigServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterConfigServiceHandlerFromEndpoint is same as RegisterConfigServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterConfigServiceHandlerServer ¶
func RegisterConfigServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ConfigServiceServer) error
RegisterConfigServiceHandlerServer registers the http handlers for service ConfigService to "mux". UnaryRPC :call ConfigServiceServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterConfigServiceHandlerFromEndpoint instead.
func RegisterConfigServiceServer ¶
func RegisterConfigServiceServer(s *grpc.Server, srv ConfigServiceServer)
func TokenByTypeGroup ¶
func TokenByTypeGroup(tokenType *TokenType, tokenGroup *TokenGroup) []string
Types ¶
type Config ¶
type Config struct { DefaultToken []string `protobuf:"bytes,1,rep,name=default_token,json=defaultToken,proto3" json:"default_token,omitempty"` MaxTokenTypesNum int32 `protobuf:"varint,2,opt,name=max_token_types_num,json=maxTokenTypesNum,proto3" json:"max_token_types_num,omitempty"` MaxTokenGroupsNum int32 `protobuf:"varint,3,opt,name=max_token_groups_num,json=maxTokenGroupsNum,proto3" json:"max_token_groups_num,omitempty"` // contains filtered or unexported fields }
func (*Config) Descriptor
deprecated
func (*Config) GetDefaultToken ¶
func (*Config) GetMaxTokenGroupsNum ¶
func (*Config) GetMaxTokenTypesNum ¶
func (*Config) ProtoMessage ¶
func (*Config) ProtoMessage()
func (*Config) ProtoReflect ¶
func (x *Config) ProtoReflect() protoreflect.Message
type ConfigServiceChaincode ¶
type ConfigServiceChaincode interface { GetConfig(cckit_router.Context, *emptypb.Empty) (*Config, error) SetConfig(cckit_router.Context, *Config) (*Config, error) GetToken(cckit_router.Context, *TokenId) (*Token, error) GetDefaultToken(cckit_router.Context, *emptypb.Empty) (*Token, error) CreateTokenType(cckit_router.Context, *CreateTokenTypeRequest) (*TokenType, error) GetTokenType(cckit_router.Context, *TokenTypeId) (*TokenType, error) ListTokenTypes(cckit_router.Context, *emptypb.Empty) (*TokenTypes, error) UpdateTokenType(cckit_router.Context, *UpdateTokenTypeRequest) (*TokenType, error) DeleteTokenType(cckit_router.Context, *TokenTypeId) (*TokenType, error) GetTokenGroups(cckit_router.Context, *TokenTypeId) (*TokenGroups, error) CreateTokenGroup(cckit_router.Context, *CreateTokenGroupRequest) (*TokenGroup, error) GetTokenGroup(cckit_router.Context, *TokenGroupId) (*TokenGroup, error) DeleteTokenGroup(cckit_router.Context, *TokenGroupId) (*Token, error) }
ConfigServiceChaincode chaincode methods interface
type ConfigServiceChaincodeLocalResolver ¶
type ConfigServiceChaincodeLocalResolver struct {
// contains filtered or unexported fields
}
ConfigServiceChaincodeResolver interface for service resolver
func NewConfigServiceChaincodeLocalResolver ¶
func NewConfigServiceChaincodeLocalResolver(service ConfigServiceChaincode) *ConfigServiceChaincodeLocalResolver
func (*ConfigServiceChaincodeLocalResolver) Resolve ¶
func (r *ConfigServiceChaincodeLocalResolver) Resolve(ctx cckit_router.Context) (ConfigServiceChaincode, error)
type ConfigServiceChaincodeLocatorResolver ¶
type ConfigServiceChaincodeLocatorResolver struct {
// contains filtered or unexported fields
}
ConfigServiceChaincodeResolver interface for service resolver
func NewConfigServiceChaincodeResolver ¶
func NewConfigServiceChaincodeResolver(locatorResolver cckit_gateway.ChaincodeLocatorResolver) *ConfigServiceChaincodeLocatorResolver
func (*ConfigServiceChaincodeLocatorResolver) Resolve ¶
func (r *ConfigServiceChaincodeLocatorResolver) Resolve(ctx cckit_router.Context) (ConfigServiceChaincode, error)
type ConfigServiceChaincodeResolver ¶
type ConfigServiceChaincodeResolver interface {
Resolve(ctx cckit_router.Context) (ConfigServiceChaincode, error)
}
ConfigServiceChaincodeResolver interface for service resolver
type ConfigServiceChaincodeStubInvoker ¶
type ConfigServiceChaincodeStubInvoker struct {
Invoker cckit_gateway.ChaincodeStubInvoker
}
func NewConfigServiceChaincodeStubInvoker ¶
func NewConfigServiceChaincodeStubInvoker(locator *cckit_gateway.ChaincodeLocator) *ConfigServiceChaincodeStubInvoker
func (*ConfigServiceChaincodeStubInvoker) CreateTokenGroup ¶
func (c *ConfigServiceChaincodeStubInvoker) CreateTokenGroup(ctx cckit_router.Context, in *CreateTokenGroupRequest) (*TokenGroup, error)
func (*ConfigServiceChaincodeStubInvoker) CreateTokenType ¶
func (c *ConfigServiceChaincodeStubInvoker) CreateTokenType(ctx cckit_router.Context, in *CreateTokenTypeRequest) (*TokenType, error)
func (*ConfigServiceChaincodeStubInvoker) DeleteTokenGroup ¶
func (c *ConfigServiceChaincodeStubInvoker) DeleteTokenGroup(ctx cckit_router.Context, in *TokenGroupId) (*Token, error)
func (*ConfigServiceChaincodeStubInvoker) DeleteTokenType ¶
func (c *ConfigServiceChaincodeStubInvoker) DeleteTokenType(ctx cckit_router.Context, in *TokenTypeId) (*TokenType, error)
func (*ConfigServiceChaincodeStubInvoker) GetConfig ¶
func (c *ConfigServiceChaincodeStubInvoker) GetConfig(ctx cckit_router.Context, in *emptypb.Empty) (*Config, error)
func (*ConfigServiceChaincodeStubInvoker) GetDefaultToken ¶
func (c *ConfigServiceChaincodeStubInvoker) GetDefaultToken(ctx cckit_router.Context, in *emptypb.Empty) (*Token, error)
func (*ConfigServiceChaincodeStubInvoker) GetToken ¶
func (c *ConfigServiceChaincodeStubInvoker) GetToken(ctx cckit_router.Context, in *TokenId) (*Token, error)
func (*ConfigServiceChaincodeStubInvoker) GetTokenGroup ¶
func (c *ConfigServiceChaincodeStubInvoker) GetTokenGroup(ctx cckit_router.Context, in *TokenGroupId) (*TokenGroup, error)
func (*ConfigServiceChaincodeStubInvoker) GetTokenGroups ¶
func (c *ConfigServiceChaincodeStubInvoker) GetTokenGroups(ctx cckit_router.Context, in *TokenTypeId) (*TokenGroups, error)
func (*ConfigServiceChaincodeStubInvoker) GetTokenType ¶
func (c *ConfigServiceChaincodeStubInvoker) GetTokenType(ctx cckit_router.Context, in *TokenTypeId) (*TokenType, error)
func (*ConfigServiceChaincodeStubInvoker) ListTokenTypes ¶
func (c *ConfigServiceChaincodeStubInvoker) ListTokenTypes(ctx cckit_router.Context, in *emptypb.Empty) (*TokenTypes, error)
func (*ConfigServiceChaincodeStubInvoker) SetConfig ¶
func (c *ConfigServiceChaincodeStubInvoker) SetConfig(ctx cckit_router.Context, in *Config) (*Config, error)
func (*ConfigServiceChaincodeStubInvoker) UpdateTokenType ¶
func (c *ConfigServiceChaincodeStubInvoker) UpdateTokenType(ctx cckit_router.Context, in *UpdateTokenTypeRequest) (*TokenType, error)
type ConfigServiceClient ¶
type ConfigServiceClient interface { GetConfig(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*Config, error) SetConfig(ctx context.Context, in *Config, opts ...grpc.CallOption) (*Config, error) GetToken(ctx context.Context, in *TokenId, opts ...grpc.CallOption) (*Token, error) GetDefaultToken(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*Token, error) CreateTokenType(ctx context.Context, in *CreateTokenTypeRequest, opts ...grpc.CallOption) (*TokenType, error) GetTokenType(ctx context.Context, in *TokenTypeId, opts ...grpc.CallOption) (*TokenType, error) ListTokenTypes(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*TokenTypes, error) UpdateTokenType(ctx context.Context, in *UpdateTokenTypeRequest, opts ...grpc.CallOption) (*TokenType, error) DeleteTokenType(ctx context.Context, in *TokenTypeId, opts ...grpc.CallOption) (*TokenType, error) GetTokenGroups(ctx context.Context, in *TokenTypeId, opts ...grpc.CallOption) (*TokenGroups, error) CreateTokenGroup(ctx context.Context, in *CreateTokenGroupRequest, opts ...grpc.CallOption) (*TokenGroup, error) GetTokenGroup(ctx context.Context, in *TokenGroupId, opts ...grpc.CallOption) (*TokenGroup, error) DeleteTokenGroup(ctx context.Context, in *TokenGroupId, opts ...grpc.CallOption) (*Token, error) }
ConfigServiceClient is the client API for ConfigService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewConfigServiceClient ¶
func NewConfigServiceClient(cc grpc.ClientConnInterface) ConfigServiceClient
type ConfigServiceGateway ¶
type ConfigServiceGateway struct {
ChaincodeInstance cckit_gateway.ChaincodeInstance
}
gateway implementation gateway can be used as kind of SDK, GRPC or REST server ( via grpc-gateway or clay )
func NewConfigServiceGateway ¶
func NewConfigServiceGateway(sdk cckit_sdk.SDK, channel, chaincode string, opts ...cckit_gateway.Opt) *ConfigServiceGateway
NewConfigServiceGateway creates gateway to access chaincode method via chaincode service
func NewConfigServiceGatewayFromInstance ¶
func NewConfigServiceGatewayFromInstance(chaincodeInstance cckit_gateway.ChaincodeInstance) *ConfigServiceGateway
func (*ConfigServiceGateway) CreateTokenGroup ¶
func (c *ConfigServiceGateway) CreateTokenGroup(ctx context.Context, in *CreateTokenGroupRequest) (*TokenGroup, error)
func (*ConfigServiceGateway) CreateTokenType ¶
func (c *ConfigServiceGateway) CreateTokenType(ctx context.Context, in *CreateTokenTypeRequest) (*TokenType, error)
func (*ConfigServiceGateway) DeleteTokenGroup ¶
func (c *ConfigServiceGateway) DeleteTokenGroup(ctx context.Context, in *TokenGroupId) (*Token, error)
func (*ConfigServiceGateway) DeleteTokenType ¶
func (c *ConfigServiceGateway) DeleteTokenType(ctx context.Context, in *TokenTypeId) (*TokenType, error)
func (*ConfigServiceGateway) GetDefaultToken ¶
func (*ConfigServiceGateway) GetTokenGroup ¶
func (c *ConfigServiceGateway) GetTokenGroup(ctx context.Context, in *TokenGroupId) (*TokenGroup, error)
func (*ConfigServiceGateway) GetTokenGroups ¶
func (c *ConfigServiceGateway) GetTokenGroups(ctx context.Context, in *TokenTypeId) (*TokenGroups, error)
func (*ConfigServiceGateway) GetTokenType ¶
func (c *ConfigServiceGateway) GetTokenType(ctx context.Context, in *TokenTypeId) (*TokenType, error)
func (*ConfigServiceGateway) Invoker ¶
func (c *ConfigServiceGateway) Invoker() cckit_gateway.ChaincodeInstanceInvoker
func (*ConfigServiceGateway) ListTokenTypes ¶
func (c *ConfigServiceGateway) ListTokenTypes(ctx context.Context, in *emptypb.Empty) (*TokenTypes, error)
func (*ConfigServiceGateway) ServiceDef ¶
func (c *ConfigServiceGateway) ServiceDef() cckit_gateway.ServiceDef
ServiceDef returns service definition
func (*ConfigServiceGateway) UpdateTokenType ¶
func (c *ConfigServiceGateway) UpdateTokenType(ctx context.Context, in *UpdateTokenTypeRequest) (*TokenType, error)
type ConfigServiceServer ¶
type ConfigServiceServer interface { GetConfig(context.Context, *emptypb.Empty) (*Config, error) SetConfig(context.Context, *Config) (*Config, error) GetToken(context.Context, *TokenId) (*Token, error) GetDefaultToken(context.Context, *emptypb.Empty) (*Token, error) CreateTokenType(context.Context, *CreateTokenTypeRequest) (*TokenType, error) GetTokenType(context.Context, *TokenTypeId) (*TokenType, error) ListTokenTypes(context.Context, *emptypb.Empty) (*TokenTypes, error) UpdateTokenType(context.Context, *UpdateTokenTypeRequest) (*TokenType, error) DeleteTokenType(context.Context, *TokenTypeId) (*TokenType, error) GetTokenGroups(context.Context, *TokenTypeId) (*TokenGroups, error) CreateTokenGroup(context.Context, *CreateTokenGroupRequest) (*TokenGroup, error) GetTokenGroup(context.Context, *TokenGroupId) (*TokenGroup, error) DeleteTokenGroup(context.Context, *TokenGroupId) (*Token, error) }
ConfigServiceServer is the server API for ConfigService service.
type CreateTokenGroupRequest ¶
type CreateTokenGroupRequest struct { Name []string `protobuf:"bytes,1,rep,name=name,proto3" json:"name,omitempty"` TokenType string `protobuf:"bytes,2,opt,name=token_type,json=tokenType,proto3" json:"token_type,omitempty"` TotalSupply uint64 `protobuf:"varint,3,opt,name=total_supply,json=totalSupply,proto3" json:"total_supply,omitempty"` Meta []*TokenMetaRequest `protobuf:"bytes,4,rep,name=meta,proto3" json:"meta,omitempty"` // contains filtered or unexported fields }
func (*CreateTokenGroupRequest) Descriptor
deprecated
func (*CreateTokenGroupRequest) Descriptor() ([]byte, []int)
Deprecated: Use CreateTokenGroupRequest.ProtoReflect.Descriptor instead.
func (*CreateTokenGroupRequest) GetMeta ¶
func (x *CreateTokenGroupRequest) GetMeta() []*TokenMetaRequest
func (*CreateTokenGroupRequest) GetName ¶
func (x *CreateTokenGroupRequest) GetName() []string
func (*CreateTokenGroupRequest) GetTokenType ¶
func (x *CreateTokenGroupRequest) GetTokenType() string
func (*CreateTokenGroupRequest) GetTotalSupply ¶
func (x *CreateTokenGroupRequest) GetTotalSupply() uint64
func (*CreateTokenGroupRequest) ProtoMessage ¶
func (*CreateTokenGroupRequest) ProtoMessage()
func (*CreateTokenGroupRequest) ProtoReflect ¶
func (x *CreateTokenGroupRequest) ProtoReflect() protoreflect.Message
func (*CreateTokenGroupRequest) Reset ¶
func (x *CreateTokenGroupRequest) Reset()
func (*CreateTokenGroupRequest) String ¶
func (x *CreateTokenGroupRequest) String() string
func (*CreateTokenGroupRequest) Validate ¶
func (this *CreateTokenGroupRequest) Validate() error
type CreateTokenTypeRequest ¶
type CreateTokenTypeRequest struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Symbol string `protobuf:"bytes,2,opt,name=symbol,proto3" json:"symbol,omitempty"` Decimals uint32 `protobuf:"varint,3,opt,name=decimals,proto3" json:"decimals,omitempty"` // from 0 to 8 GroupType TokenGroupType `` /* 148-byte string literal not displayed */ TotalSupply uint64 `protobuf:"varint,5,opt,name=total_supply,json=totalSupply,proto3" json:"total_supply,omitempty"` Meta []*TokenMetaRequest `protobuf:"bytes,6,rep,name=meta,proto3" json:"meta,omitempty"` // contains filtered or unexported fields }
func (*CreateTokenTypeRequest) Descriptor
deprecated
func (*CreateTokenTypeRequest) Descriptor() ([]byte, []int)
Deprecated: Use CreateTokenTypeRequest.ProtoReflect.Descriptor instead.
func (*CreateTokenTypeRequest) GetDecimals ¶
func (x *CreateTokenTypeRequest) GetDecimals() uint32
func (*CreateTokenTypeRequest) GetGroupType ¶
func (x *CreateTokenTypeRequest) GetGroupType() TokenGroupType
func (*CreateTokenTypeRequest) GetMeta ¶
func (x *CreateTokenTypeRequest) GetMeta() []*TokenMetaRequest
func (*CreateTokenTypeRequest) GetName ¶
func (x *CreateTokenTypeRequest) GetName() string
func (*CreateTokenTypeRequest) GetSymbol ¶
func (x *CreateTokenTypeRequest) GetSymbol() string
func (*CreateTokenTypeRequest) GetTotalSupply ¶
func (x *CreateTokenTypeRequest) GetTotalSupply() uint64
func (*CreateTokenTypeRequest) ProtoMessage ¶
func (*CreateTokenTypeRequest) ProtoMessage()
func (*CreateTokenTypeRequest) ProtoReflect ¶
func (x *CreateTokenTypeRequest) ProtoReflect() protoreflect.Message
func (*CreateTokenTypeRequest) Reset ¶
func (x *CreateTokenTypeRequest) Reset()
func (*CreateTokenTypeRequest) String ¶
func (x *CreateTokenTypeRequest) String() string
func (*CreateTokenTypeRequest) Validate ¶
func (this *CreateTokenTypeRequest) Validate() error
type StateService ¶
type StateService struct { }
func NewStateService ¶
func NewStateService() *StateService
func (*StateService) CreateTokenGroup ¶
func (s *StateService) CreateTokenGroup(ctx router.Context, req *CreateTokenGroupRequest) (*TokenGroup, error)
func (*StateService) CreateTokenType ¶
func (s *StateService) CreateTokenType(ctx router.Context, req *CreateTokenTypeRequest) (*TokenType, error)
func (*StateService) DeleteTokenGroup ¶
func (s *StateService) DeleteTokenGroup(ctx router.Context, id *TokenGroupId) (*Token, error)
func (*StateService) DeleteTokenType ¶
func (s *StateService) DeleteTokenType(ctx router.Context, id *TokenTypeId) (*TokenType, error)
func (*StateService) GetDefaultToken ¶
func (*StateService) GetToken ¶
GetToken naming for token is[{TokenType}, {GroupIdPart1}, {GroupIdPart2}]
func (*StateService) GetTokenGroup ¶
func (s *StateService) GetTokenGroup(ctx router.Context, id *TokenGroupId) (*TokenGroup, error)
func (*StateService) GetTokenGroups ¶
func (s *StateService) GetTokenGroups(ctx router.Context, id *TokenTypeId) (*TokenGroups, error)
func (*StateService) GetTokenType ¶
func (s *StateService) GetTokenType(ctx router.Context, id *TokenTypeId) (*TokenType, error)
func (*StateService) ListTokenTypes ¶
func (s *StateService) ListTokenTypes(ctx router.Context, _ *emptypb.Empty) (*TokenTypes, error)
func (*StateService) UpdateTokenType ¶
func (s *StateService) UpdateTokenType(ctx router.Context, request *UpdateTokenTypeRequest) (*TokenType, error)
type Token ¶
type Token struct { Token []string `protobuf:"bytes,1,rep,name=token,proto3" json:"token,omitempty"` Type *TokenType `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"` Group *TokenGroup `protobuf:"bytes,3,opt,name=group,proto3" json:"group,omitempty"` // contains filtered or unexported fields }
func (*Token) Descriptor
deprecated
func (*Token) GetGroup ¶
func (x *Token) GetGroup() *TokenGroup
func (*Token) ProtoMessage ¶
func (*Token) ProtoMessage()
func (*Token) ProtoReflect ¶
func (x *Token) ProtoReflect() protoreflect.Message
type TokenGetter ¶
type TokenGroup ¶
type TokenGroup struct { Name []string `protobuf:"bytes,1,rep,name=name,proto3" json:"name,omitempty"` TokenType string `protobuf:"bytes,2,opt,name=token_type,json=tokenType,proto3" json:"token_type,omitempty"` TotalSupply uint64 `protobuf:"varint,3,opt,name=total_supply,json=totalSupply,proto3" json:"total_supply,omitempty"` Meta []*TokenMeta `protobuf:"bytes,4,rep,name=meta,proto3" json:"meta,omitempty"` // contains filtered or unexported fields }
State: TokenGroup
func (*TokenGroup) Descriptor
deprecated
func (*TokenGroup) Descriptor() ([]byte, []int)
Deprecated: Use TokenGroup.ProtoReflect.Descriptor instead.
func (*TokenGroup) GetMeta ¶
func (x *TokenGroup) GetMeta() []*TokenMeta
func (*TokenGroup) GetName ¶
func (x *TokenGroup) GetName() []string
func (*TokenGroup) GetTokenType ¶
func (x *TokenGroup) GetTokenType() string
func (*TokenGroup) GetTotalSupply ¶
func (x *TokenGroup) GetTotalSupply() uint64
func (*TokenGroup) ProtoMessage ¶
func (*TokenGroup) ProtoMessage()
func (*TokenGroup) ProtoReflect ¶
func (x *TokenGroup) ProtoReflect() protoreflect.Message
func (*TokenGroup) Reset ¶
func (x *TokenGroup) Reset()
func (*TokenGroup) String ¶
func (x *TokenGroup) String() string
func (*TokenGroup) Validate ¶
func (this *TokenGroup) Validate() error
type TokenGroupCreated ¶
type TokenGroupCreated struct { TokenType string `protobuf:"bytes,1,opt,name=token_type,json=tokenType,proto3" json:"token_type,omitempty"` Name []string `protobuf:"bytes,2,rep,name=name,proto3" json:"name,omitempty"` // contains filtered or unexported fields }
func (*TokenGroupCreated) Descriptor
deprecated
func (*TokenGroupCreated) Descriptor() ([]byte, []int)
Deprecated: Use TokenGroupCreated.ProtoReflect.Descriptor instead.
func (*TokenGroupCreated) GetName ¶
func (x *TokenGroupCreated) GetName() []string
func (*TokenGroupCreated) GetTokenType ¶
func (x *TokenGroupCreated) GetTokenType() string
func (*TokenGroupCreated) ProtoMessage ¶
func (*TokenGroupCreated) ProtoMessage()
func (*TokenGroupCreated) ProtoReflect ¶
func (x *TokenGroupCreated) ProtoReflect() protoreflect.Message
func (*TokenGroupCreated) Reset ¶
func (x *TokenGroupCreated) Reset()
func (*TokenGroupCreated) String ¶
func (x *TokenGroupCreated) String() string
func (*TokenGroupCreated) Validate ¶
func (this *TokenGroupCreated) Validate() error
type TokenGroupId ¶
type TokenGroupId struct { TokenName string `protobuf:"bytes,1,opt,name=token_name,json=tokenName,proto3" json:"token_name,omitempty"` Name []string `protobuf:"bytes,2,rep,name=name,proto3" json:"name,omitempty"` // contains filtered or unexported fields }
func (*TokenGroupId) Descriptor
deprecated
func (*TokenGroupId) Descriptor() ([]byte, []int)
Deprecated: Use TokenGroupId.ProtoReflect.Descriptor instead.
func (*TokenGroupId) GetName ¶
func (x *TokenGroupId) GetName() []string
func (*TokenGroupId) GetTokenName ¶
func (x *TokenGroupId) GetTokenName() string
func (*TokenGroupId) ProtoMessage ¶
func (*TokenGroupId) ProtoMessage()
func (*TokenGroupId) ProtoReflect ¶
func (x *TokenGroupId) ProtoReflect() protoreflect.Message
func (*TokenGroupId) Reset ¶
func (x *TokenGroupId) Reset()
func (*TokenGroupId) String ¶
func (x *TokenGroupId) String() string
func (*TokenGroupId) Validate ¶
func (this *TokenGroupId) Validate() error
type TokenGroupType ¶
type TokenGroupType int32
const ( TokenGroupType_OPTIONAL TokenGroupType = 0 TokenGroupType_REQUIRED TokenGroupType = 1 TokenGroupType_NOT_ALLOWED TokenGroupType = 3 )
func (TokenGroupType) Descriptor ¶
func (TokenGroupType) Descriptor() protoreflect.EnumDescriptor
func (TokenGroupType) Enum ¶
func (x TokenGroupType) Enum() *TokenGroupType
func (TokenGroupType) EnumDescriptor
deprecated
func (TokenGroupType) EnumDescriptor() ([]byte, []int)
Deprecated: Use TokenGroupType.Descriptor instead.
func (TokenGroupType) Number ¶
func (x TokenGroupType) Number() protoreflect.EnumNumber
func (TokenGroupType) String ¶
func (x TokenGroupType) String() string
func (TokenGroupType) Type ¶
func (TokenGroupType) Type() protoreflect.EnumType
type TokenGroups ¶
type TokenGroups struct { Groups []*TokenGroup `protobuf:"bytes,1,rep,name=groups,proto3" json:"groups,omitempty"` // contains filtered or unexported fields }
func (*TokenGroups) Descriptor
deprecated
func (*TokenGroups) Descriptor() ([]byte, []int)
Deprecated: Use TokenGroups.ProtoReflect.Descriptor instead.
func (*TokenGroups) GetGroups ¶
func (x *TokenGroups) GetGroups() []*TokenGroup
func (*TokenGroups) ProtoMessage ¶
func (*TokenGroups) ProtoMessage()
func (*TokenGroups) ProtoReflect ¶
func (x *TokenGroups) ProtoReflect() protoreflect.Message
func (*TokenGroups) Reset ¶
func (x *TokenGroups) Reset()
func (*TokenGroups) String ¶
func (x *TokenGroups) String() string
func (*TokenGroups) Validate ¶
func (this *TokenGroups) Validate() error
type TokenId ¶
type TokenId struct { Token []string `protobuf:"bytes,1,rep,name=token,proto3" json:"token,omitempty"` // contains filtered or unexported fields }
func (*TokenId) Descriptor
deprecated
func (*TokenId) ProtoMessage ¶
func (*TokenId) ProtoMessage()
func (*TokenId) ProtoReflect ¶
func (x *TokenId) ProtoReflect() protoreflect.Message
type TokenMeta ¶
type TokenMeta struct { Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` // contains filtered or unexported fields }
func (*TokenMeta) Descriptor
deprecated
func (*TokenMeta) ProtoMessage ¶
func (*TokenMeta) ProtoMessage()
func (*TokenMeta) ProtoReflect ¶
func (x *TokenMeta) ProtoReflect() protoreflect.Message
type TokenMetaRequest ¶
type TokenMetaRequest struct { Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` // contains filtered or unexported fields }
func (*TokenMetaRequest) Descriptor
deprecated
func (*TokenMetaRequest) Descriptor() ([]byte, []int)
Deprecated: Use TokenMetaRequest.ProtoReflect.Descriptor instead.
func (*TokenMetaRequest) GetKey ¶
func (x *TokenMetaRequest) GetKey() string
func (*TokenMetaRequest) GetValue ¶
func (x *TokenMetaRequest) GetValue() string
func (*TokenMetaRequest) ProtoMessage ¶
func (*TokenMetaRequest) ProtoMessage()
func (*TokenMetaRequest) ProtoReflect ¶
func (x *TokenMetaRequest) ProtoReflect() protoreflect.Message
func (*TokenMetaRequest) Reset ¶
func (x *TokenMetaRequest) Reset()
func (*TokenMetaRequest) String ¶
func (x *TokenMetaRequest) String() string
func (*TokenMetaRequest) Validate ¶
func (this *TokenMetaRequest) Validate() error
type TokenType ¶
type TokenType struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Symbol string `protobuf:"bytes,2,opt,name=symbol,proto3" json:"symbol,omitempty"` Decimals uint32 `protobuf:"varint,3,opt,name=decimals,proto3" json:"decimals,omitempty"` TotalSupply uint64 `protobuf:"varint,4,opt,name=total_supply,json=totalSupply,proto3" json:"total_supply,omitempty"` GroupType TokenGroupType `` /* 148-byte string literal not displayed */ Meta []*TokenMeta `protobuf:"bytes,6,rep,name=meta,proto3" json:"meta,omitempty"` // contains filtered or unexported fields }
State: TokenType
func (*TokenType) Descriptor
deprecated
func (*TokenType) GetDecimals ¶
func (*TokenType) GetGroupType ¶
func (x *TokenType) GetGroupType() TokenGroupType
func (*TokenType) GetTotalSupply ¶
func (*TokenType) ProtoMessage ¶
func (*TokenType) ProtoMessage()
func (*TokenType) ProtoReflect ¶
func (x *TokenType) ProtoReflect() protoreflect.Message
type TokenTypeCreated ¶
type TokenTypeCreated struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Symbol string `protobuf:"bytes,2,opt,name=symbol,proto3" json:"symbol,omitempty"` // contains filtered or unexported fields }
func (*TokenTypeCreated) Descriptor
deprecated
func (*TokenTypeCreated) Descriptor() ([]byte, []int)
Deprecated: Use TokenTypeCreated.ProtoReflect.Descriptor instead.
func (*TokenTypeCreated) GetName ¶
func (x *TokenTypeCreated) GetName() string
func (*TokenTypeCreated) GetSymbol ¶
func (x *TokenTypeCreated) GetSymbol() string
func (*TokenTypeCreated) ProtoMessage ¶
func (*TokenTypeCreated) ProtoMessage()
func (*TokenTypeCreated) ProtoReflect ¶
func (x *TokenTypeCreated) ProtoReflect() protoreflect.Message
func (*TokenTypeCreated) Reset ¶
func (x *TokenTypeCreated) Reset()
func (*TokenTypeCreated) String ¶
func (x *TokenTypeCreated) String() string
func (*TokenTypeCreated) Validate ¶
func (this *TokenTypeCreated) Validate() error
type TokenTypeId ¶
type TokenTypeId struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // contains filtered or unexported fields }
Id: toke type id
func (*TokenTypeId) Descriptor
deprecated
func (*TokenTypeId) Descriptor() ([]byte, []int)
Deprecated: Use TokenTypeId.ProtoReflect.Descriptor instead.
func (*TokenTypeId) GetName ¶
func (x *TokenTypeId) GetName() string
func (*TokenTypeId) ProtoMessage ¶
func (*TokenTypeId) ProtoMessage()
func (*TokenTypeId) ProtoReflect ¶
func (x *TokenTypeId) ProtoReflect() protoreflect.Message
func (*TokenTypeId) Reset ¶
func (x *TokenTypeId) Reset()
func (*TokenTypeId) String ¶
func (x *TokenTypeId) String() string
func (*TokenTypeId) Validate ¶
func (this *TokenTypeId) Validate() error
type TokenTypes ¶
type TokenTypes struct { Types []*TokenType `protobuf:"bytes,1,rep,name=types,proto3" json:"types,omitempty"` // contains filtered or unexported fields }
func (*TokenTypes) Descriptor
deprecated
func (*TokenTypes) Descriptor() ([]byte, []int)
Deprecated: Use TokenTypes.ProtoReflect.Descriptor instead.
func (*TokenTypes) GetTypes ¶
func (x *TokenTypes) GetTypes() []*TokenType
func (*TokenTypes) ProtoMessage ¶
func (*TokenTypes) ProtoMessage()
func (*TokenTypes) ProtoReflect ¶
func (x *TokenTypes) ProtoReflect() protoreflect.Message
func (*TokenTypes) Reset ¶
func (x *TokenTypes) Reset()
func (*TokenTypes) String ¶
func (x *TokenTypes) String() string
func (*TokenTypes) Validate ¶
func (this *TokenTypes) Validate() error
type UnimplementedConfigServiceServer ¶
type UnimplementedConfigServiceServer struct { }
UnimplementedConfigServiceServer can be embedded to have forward compatible implementations.
func (*UnimplementedConfigServiceServer) CreateTokenGroup ¶
func (*UnimplementedConfigServiceServer) CreateTokenGroup(context.Context, *CreateTokenGroupRequest) (*TokenGroup, error)
func (*UnimplementedConfigServiceServer) CreateTokenType ¶
func (*UnimplementedConfigServiceServer) CreateTokenType(context.Context, *CreateTokenTypeRequest) (*TokenType, error)
func (*UnimplementedConfigServiceServer) DeleteTokenGroup ¶
func (*UnimplementedConfigServiceServer) DeleteTokenGroup(context.Context, *TokenGroupId) (*Token, error)
func (*UnimplementedConfigServiceServer) DeleteTokenType ¶
func (*UnimplementedConfigServiceServer) DeleteTokenType(context.Context, *TokenTypeId) (*TokenType, error)
func (*UnimplementedConfigServiceServer) GetDefaultToken ¶
func (*UnimplementedConfigServiceServer) GetTokenGroup ¶
func (*UnimplementedConfigServiceServer) GetTokenGroup(context.Context, *TokenGroupId) (*TokenGroup, error)
func (*UnimplementedConfigServiceServer) GetTokenGroups ¶
func (*UnimplementedConfigServiceServer) GetTokenGroups(context.Context, *TokenTypeId) (*TokenGroups, error)
func (*UnimplementedConfigServiceServer) GetTokenType ¶
func (*UnimplementedConfigServiceServer) GetTokenType(context.Context, *TokenTypeId) (*TokenType, error)
func (*UnimplementedConfigServiceServer) ListTokenTypes ¶
func (*UnimplementedConfigServiceServer) ListTokenTypes(context.Context, *emptypb.Empty) (*TokenTypes, error)
func (*UnimplementedConfigServiceServer) UpdateTokenType ¶
func (*UnimplementedConfigServiceServer) UpdateTokenType(context.Context, *UpdateTokenTypeRequest) (*TokenType, error)
type UpdateTokenTypeRequest ¶
type UpdateTokenTypeRequest struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Symbol string `protobuf:"bytes,2,opt,name=symbol,proto3" json:"symbol,omitempty"` TotalSupply uint64 `protobuf:"varint,3,opt,name=total_supply,json=totalSupply,proto3" json:"total_supply,omitempty"` Meta []*TokenMetaRequest `protobuf:"bytes,4,rep,name=meta,proto3" json:"meta,omitempty"` // contains filtered or unexported fields }
func (*UpdateTokenTypeRequest) Descriptor
deprecated
func (*UpdateTokenTypeRequest) Descriptor() ([]byte, []int)
Deprecated: Use UpdateTokenTypeRequest.ProtoReflect.Descriptor instead.
func (*UpdateTokenTypeRequest) GetMeta ¶
func (x *UpdateTokenTypeRequest) GetMeta() []*TokenMetaRequest
func (*UpdateTokenTypeRequest) GetName ¶
func (x *UpdateTokenTypeRequest) GetName() string
func (*UpdateTokenTypeRequest) GetSymbol ¶
func (x *UpdateTokenTypeRequest) GetSymbol() string
func (*UpdateTokenTypeRequest) GetTotalSupply ¶
func (x *UpdateTokenTypeRequest) GetTotalSupply() uint64
func (*UpdateTokenTypeRequest) ProtoMessage ¶
func (*UpdateTokenTypeRequest) ProtoMessage()
func (*UpdateTokenTypeRequest) ProtoReflect ¶
func (x *UpdateTokenTypeRequest) ProtoReflect() protoreflect.Message
func (*UpdateTokenTypeRequest) Reset ¶
func (x *UpdateTokenTypeRequest) Reset()
func (*UpdateTokenTypeRequest) String ¶
func (x *UpdateTokenTypeRequest) String() string
func (*UpdateTokenTypeRequest) Validate ¶
func (this *UpdateTokenTypeRequest) Validate() error