github.com/s7techlab/cckit@v0.10.5/examples/token/service/config/config.pb.cc.go (about)

     1  // Code generated by protoc-gen-cc-gateway. DO NOT EDIT.
     2  // source: token/service/config/config.proto
     3  
     4  /*
     5  Package config contains
     6    *   chaincode methods names {service_name}Chaincode_{method_name}
     7    *   chaincode interface definition {service_name}Chaincode
     8    *   chaincode gateway definition {service_name}}Gateway
     9    *   chaincode service to cckit router registration func
    10  */
    11  package config
    12  
    13  import (
    14  	context "context"
    15  	_ "embed"
    16  	errors "errors"
    17  
    18  	cckit_gateway "github.com/s7techlab/cckit/gateway"
    19  	cckit_router "github.com/s7techlab/cckit/router"
    20  	cckit_defparam "github.com/s7techlab/cckit/router/param/defparam"
    21  	cckit_sdk "github.com/s7techlab/cckit/sdk"
    22  	"google.golang.org/protobuf/types/known/emptypb"
    23  )
    24  
    25  // ConfigServiceChaincode method names
    26  const (
    27  
    28  	// ConfigServiceChaincodeMethodPrefix allows to use multiple services with same method names in one chaincode
    29  	ConfigServiceChaincodeMethodPrefix = ""
    30  
    31  	ConfigServiceChaincode_GetConfig = ConfigServiceChaincodeMethodPrefix + "GetConfig"
    32  
    33  	ConfigServiceChaincode_SetConfig = ConfigServiceChaincodeMethodPrefix + "SetConfig"
    34  
    35  	ConfigServiceChaincode_GetToken = ConfigServiceChaincodeMethodPrefix + "GetToken"
    36  
    37  	ConfigServiceChaincode_GetDefaultToken = ConfigServiceChaincodeMethodPrefix + "GetDefaultToken"
    38  
    39  	ConfigServiceChaincode_CreateTokenType = ConfigServiceChaincodeMethodPrefix + "CreateTokenType"
    40  
    41  	ConfigServiceChaincode_GetTokenType = ConfigServiceChaincodeMethodPrefix + "GetTokenType"
    42  
    43  	ConfigServiceChaincode_ListTokenTypes = ConfigServiceChaincodeMethodPrefix + "ListTokenTypes"
    44  
    45  	ConfigServiceChaincode_UpdateTokenType = ConfigServiceChaincodeMethodPrefix + "UpdateTokenType"
    46  
    47  	ConfigServiceChaincode_DeleteTokenType = ConfigServiceChaincodeMethodPrefix + "DeleteTokenType"
    48  
    49  	ConfigServiceChaincode_GetTokenGroups = ConfigServiceChaincodeMethodPrefix + "GetTokenGroups"
    50  
    51  	ConfigServiceChaincode_CreateTokenGroup = ConfigServiceChaincodeMethodPrefix + "CreateTokenGroup"
    52  
    53  	ConfigServiceChaincode_GetTokenGroup = ConfigServiceChaincodeMethodPrefix + "GetTokenGroup"
    54  
    55  	ConfigServiceChaincode_DeleteTokenGroup = ConfigServiceChaincodeMethodPrefix + "DeleteTokenGroup"
    56  )
    57  
    58  // ConfigServiceChaincode chaincode methods interface
    59  type ConfigServiceChaincode interface {
    60  	GetConfig(cckit_router.Context, *emptypb.Empty) (*Config, error)
    61  
    62  	SetConfig(cckit_router.Context, *Config) (*Config, error)
    63  
    64  	GetToken(cckit_router.Context, *TokenId) (*Token, error)
    65  
    66  	GetDefaultToken(cckit_router.Context, *emptypb.Empty) (*Token, error)
    67  
    68  	CreateTokenType(cckit_router.Context, *CreateTokenTypeRequest) (*TokenType, error)
    69  
    70  	GetTokenType(cckit_router.Context, *TokenTypeId) (*TokenType, error)
    71  
    72  	ListTokenTypes(cckit_router.Context, *emptypb.Empty) (*TokenTypes, error)
    73  
    74  	UpdateTokenType(cckit_router.Context, *UpdateTokenTypeRequest) (*TokenType, error)
    75  
    76  	DeleteTokenType(cckit_router.Context, *TokenTypeId) (*TokenType, error)
    77  
    78  	GetTokenGroups(cckit_router.Context, *TokenTypeId) (*TokenGroups, error)
    79  
    80  	CreateTokenGroup(cckit_router.Context, *CreateTokenGroupRequest) (*TokenGroup, error)
    81  
    82  	GetTokenGroup(cckit_router.Context, *TokenGroupId) (*TokenGroup, error)
    83  
    84  	DeleteTokenGroup(cckit_router.Context, *TokenGroupId) (*Token, error)
    85  }
    86  
    87  // RegisterConfigServiceChaincode registers service methods as chaincode router handlers
    88  func RegisterConfigServiceChaincode(r *cckit_router.Group, cc ConfigServiceChaincode) error {
    89  
    90  	r.Query(ConfigServiceChaincode_GetConfig,
    91  		func(ctx cckit_router.Context) (interface{}, error) {
    92  			return cc.GetConfig(ctx, ctx.Param().(*emptypb.Empty))
    93  		},
    94  		cckit_defparam.Proto(&emptypb.Empty{}))
    95  
    96  	r.Invoke(ConfigServiceChaincode_SetConfig,
    97  		func(ctx cckit_router.Context) (interface{}, error) {
    98  			return cc.SetConfig(ctx, ctx.Param().(*Config))
    99  		},
   100  		cckit_defparam.Proto(&Config{}))
   101  
   102  	r.Query(ConfigServiceChaincode_GetToken,
   103  		func(ctx cckit_router.Context) (interface{}, error) {
   104  			return cc.GetToken(ctx, ctx.Param().(*TokenId))
   105  		},
   106  		cckit_defparam.Proto(&TokenId{}))
   107  
   108  	r.Query(ConfigServiceChaincode_GetDefaultToken,
   109  		func(ctx cckit_router.Context) (interface{}, error) {
   110  			return cc.GetDefaultToken(ctx, ctx.Param().(*emptypb.Empty))
   111  		},
   112  		cckit_defparam.Proto(&emptypb.Empty{}))
   113  
   114  	r.Invoke(ConfigServiceChaincode_CreateTokenType,
   115  		func(ctx cckit_router.Context) (interface{}, error) {
   116  			return cc.CreateTokenType(ctx, ctx.Param().(*CreateTokenTypeRequest))
   117  		},
   118  		cckit_defparam.Proto(&CreateTokenTypeRequest{}))
   119  
   120  	r.Query(ConfigServiceChaincode_GetTokenType,
   121  		func(ctx cckit_router.Context) (interface{}, error) {
   122  			return cc.GetTokenType(ctx, ctx.Param().(*TokenTypeId))
   123  		},
   124  		cckit_defparam.Proto(&TokenTypeId{}))
   125  
   126  	r.Query(ConfigServiceChaincode_ListTokenTypes,
   127  		func(ctx cckit_router.Context) (interface{}, error) {
   128  			return cc.ListTokenTypes(ctx, ctx.Param().(*emptypb.Empty))
   129  		},
   130  		cckit_defparam.Proto(&emptypb.Empty{}))
   131  
   132  	r.Invoke(ConfigServiceChaincode_UpdateTokenType,
   133  		func(ctx cckit_router.Context) (interface{}, error) {
   134  			return cc.UpdateTokenType(ctx, ctx.Param().(*UpdateTokenTypeRequest))
   135  		},
   136  		cckit_defparam.Proto(&UpdateTokenTypeRequest{}))
   137  
   138  	r.Invoke(ConfigServiceChaincode_DeleteTokenType,
   139  		func(ctx cckit_router.Context) (interface{}, error) {
   140  			return cc.DeleteTokenType(ctx, ctx.Param().(*TokenTypeId))
   141  		},
   142  		cckit_defparam.Proto(&TokenTypeId{}))
   143  
   144  	r.Query(ConfigServiceChaincode_GetTokenGroups,
   145  		func(ctx cckit_router.Context) (interface{}, error) {
   146  			return cc.GetTokenGroups(ctx, ctx.Param().(*TokenTypeId))
   147  		},
   148  		cckit_defparam.Proto(&TokenTypeId{}))
   149  
   150  	r.Invoke(ConfigServiceChaincode_CreateTokenGroup,
   151  		func(ctx cckit_router.Context) (interface{}, error) {
   152  			return cc.CreateTokenGroup(ctx, ctx.Param().(*CreateTokenGroupRequest))
   153  		},
   154  		cckit_defparam.Proto(&CreateTokenGroupRequest{}))
   155  
   156  	r.Query(ConfigServiceChaincode_GetTokenGroup,
   157  		func(ctx cckit_router.Context) (interface{}, error) {
   158  			return cc.GetTokenGroup(ctx, ctx.Param().(*TokenGroupId))
   159  		},
   160  		cckit_defparam.Proto(&TokenGroupId{}))
   161  
   162  	r.Invoke(ConfigServiceChaincode_DeleteTokenGroup,
   163  		func(ctx cckit_router.Context) (interface{}, error) {
   164  			return cc.DeleteTokenGroup(ctx, ctx.Param().(*TokenGroupId))
   165  		},
   166  		cckit_defparam.Proto(&TokenGroupId{}))
   167  
   168  	return nil
   169  }
   170  
   171  //go:embed config.swagger.json
   172  var ConfigServiceSwagger []byte
   173  
   174  // NewConfigServiceGateway creates gateway to access chaincode method via chaincode service
   175  func NewConfigServiceGateway(sdk cckit_sdk.SDK, channel, chaincode string, opts ...cckit_gateway.Opt) *ConfigServiceGateway {
   176  	return NewConfigServiceGatewayFromInstance(
   177  		cckit_gateway.NewChaincodeInstanceService(
   178  			sdk,
   179  			&cckit_gateway.ChaincodeLocator{Channel: channel, Chaincode: chaincode},
   180  			opts...,
   181  		))
   182  }
   183  
   184  func NewConfigServiceGatewayFromInstance(chaincodeInstance cckit_gateway.ChaincodeInstance) *ConfigServiceGateway {
   185  	return &ConfigServiceGateway{
   186  		ChaincodeInstance: chaincodeInstance,
   187  	}
   188  }
   189  
   190  // gateway implementation
   191  // gateway can be used as kind of SDK, GRPC or REST server ( via grpc-gateway or clay )
   192  type ConfigServiceGateway struct {
   193  	ChaincodeInstance cckit_gateway.ChaincodeInstance
   194  }
   195  
   196  func (c *ConfigServiceGateway) Invoker() cckit_gateway.ChaincodeInstanceInvoker {
   197  	return cckit_gateway.NewChaincodeInstanceServiceInvoker(c.ChaincodeInstance)
   198  }
   199  
   200  // ServiceDef returns service definition
   201  func (c *ConfigServiceGateway) ServiceDef() cckit_gateway.ServiceDef {
   202  	return cckit_gateway.NewServiceDef(
   203  		_ConfigService_serviceDesc.ServiceName,
   204  		ConfigServiceSwagger,
   205  		&_ConfigService_serviceDesc,
   206  		c,
   207  		RegisterConfigServiceHandlerFromEndpoint,
   208  	)
   209  }
   210  
   211  func (c *ConfigServiceGateway) GetConfig(ctx context.Context, in *emptypb.Empty) (*Config, error) {
   212  	var inMsg interface{} = in
   213  	if v, ok := inMsg.(interface{ Validate() error }); ok {
   214  		if err := v.Validate(); err != nil {
   215  			return nil, err
   216  		}
   217  	}
   218  
   219  	if res, err := c.Invoker().Query(ctx, ConfigServiceChaincode_GetConfig, []interface{}{in}, &Config{}); err != nil {
   220  		return nil, err
   221  	} else {
   222  		return res.(*Config), nil
   223  	}
   224  }
   225  
   226  func (c *ConfigServiceGateway) SetConfig(ctx context.Context, in *Config) (*Config, error) {
   227  	var inMsg interface{} = in
   228  	if v, ok := inMsg.(interface{ Validate() error }); ok {
   229  		if err := v.Validate(); err != nil {
   230  			return nil, err
   231  		}
   232  	}
   233  
   234  	if res, err := c.Invoker().Invoke(ctx, ConfigServiceChaincode_SetConfig, []interface{}{in}, &Config{}); err != nil {
   235  		return nil, err
   236  	} else {
   237  		return res.(*Config), nil
   238  	}
   239  }
   240  
   241  func (c *ConfigServiceGateway) GetToken(ctx context.Context, in *TokenId) (*Token, error) {
   242  	var inMsg interface{} = in
   243  	if v, ok := inMsg.(interface{ Validate() error }); ok {
   244  		if err := v.Validate(); err != nil {
   245  			return nil, err
   246  		}
   247  	}
   248  
   249  	if res, err := c.Invoker().Query(ctx, ConfigServiceChaincode_GetToken, []interface{}{in}, &Token{}); err != nil {
   250  		return nil, err
   251  	} else {
   252  		return res.(*Token), nil
   253  	}
   254  }
   255  
   256  func (c *ConfigServiceGateway) GetDefaultToken(ctx context.Context, in *emptypb.Empty) (*Token, error) {
   257  	var inMsg interface{} = in
   258  	if v, ok := inMsg.(interface{ Validate() error }); ok {
   259  		if err := v.Validate(); err != nil {
   260  			return nil, err
   261  		}
   262  	}
   263  
   264  	if res, err := c.Invoker().Query(ctx, ConfigServiceChaincode_GetDefaultToken, []interface{}{in}, &Token{}); err != nil {
   265  		return nil, err
   266  	} else {
   267  		return res.(*Token), nil
   268  	}
   269  }
   270  
   271  func (c *ConfigServiceGateway) CreateTokenType(ctx context.Context, in *CreateTokenTypeRequest) (*TokenType, error) {
   272  	var inMsg interface{} = in
   273  	if v, ok := inMsg.(interface{ Validate() error }); ok {
   274  		if err := v.Validate(); err != nil {
   275  			return nil, err
   276  		}
   277  	}
   278  
   279  	if res, err := c.Invoker().Invoke(ctx, ConfigServiceChaincode_CreateTokenType, []interface{}{in}, &TokenType{}); err != nil {
   280  		return nil, err
   281  	} else {
   282  		return res.(*TokenType), nil
   283  	}
   284  }
   285  
   286  func (c *ConfigServiceGateway) GetTokenType(ctx context.Context, in *TokenTypeId) (*TokenType, error) {
   287  	var inMsg interface{} = in
   288  	if v, ok := inMsg.(interface{ Validate() error }); ok {
   289  		if err := v.Validate(); err != nil {
   290  			return nil, err
   291  		}
   292  	}
   293  
   294  	if res, err := c.Invoker().Query(ctx, ConfigServiceChaincode_GetTokenType, []interface{}{in}, &TokenType{}); err != nil {
   295  		return nil, err
   296  	} else {
   297  		return res.(*TokenType), nil
   298  	}
   299  }
   300  
   301  func (c *ConfigServiceGateway) ListTokenTypes(ctx context.Context, in *emptypb.Empty) (*TokenTypes, error) {
   302  	var inMsg interface{} = in
   303  	if v, ok := inMsg.(interface{ Validate() error }); ok {
   304  		if err := v.Validate(); err != nil {
   305  			return nil, err
   306  		}
   307  	}
   308  
   309  	if res, err := c.Invoker().Query(ctx, ConfigServiceChaincode_ListTokenTypes, []interface{}{in}, &TokenTypes{}); err != nil {
   310  		return nil, err
   311  	} else {
   312  		return res.(*TokenTypes), nil
   313  	}
   314  }
   315  
   316  func (c *ConfigServiceGateway) UpdateTokenType(ctx context.Context, in *UpdateTokenTypeRequest) (*TokenType, error) {
   317  	var inMsg interface{} = in
   318  	if v, ok := inMsg.(interface{ Validate() error }); ok {
   319  		if err := v.Validate(); err != nil {
   320  			return nil, err
   321  		}
   322  	}
   323  
   324  	if res, err := c.Invoker().Invoke(ctx, ConfigServiceChaincode_UpdateTokenType, []interface{}{in}, &TokenType{}); err != nil {
   325  		return nil, err
   326  	} else {
   327  		return res.(*TokenType), nil
   328  	}
   329  }
   330  
   331  func (c *ConfigServiceGateway) DeleteTokenType(ctx context.Context, in *TokenTypeId) (*TokenType, error) {
   332  	var inMsg interface{} = in
   333  	if v, ok := inMsg.(interface{ Validate() error }); ok {
   334  		if err := v.Validate(); err != nil {
   335  			return nil, err
   336  		}
   337  	}
   338  
   339  	if res, err := c.Invoker().Invoke(ctx, ConfigServiceChaincode_DeleteTokenType, []interface{}{in}, &TokenType{}); err != nil {
   340  		return nil, err
   341  	} else {
   342  		return res.(*TokenType), nil
   343  	}
   344  }
   345  
   346  func (c *ConfigServiceGateway) GetTokenGroups(ctx context.Context, in *TokenTypeId) (*TokenGroups, error) {
   347  	var inMsg interface{} = in
   348  	if v, ok := inMsg.(interface{ Validate() error }); ok {
   349  		if err := v.Validate(); err != nil {
   350  			return nil, err
   351  		}
   352  	}
   353  
   354  	if res, err := c.Invoker().Query(ctx, ConfigServiceChaincode_GetTokenGroups, []interface{}{in}, &TokenGroups{}); err != nil {
   355  		return nil, err
   356  	} else {
   357  		return res.(*TokenGroups), nil
   358  	}
   359  }
   360  
   361  func (c *ConfigServiceGateway) CreateTokenGroup(ctx context.Context, in *CreateTokenGroupRequest) (*TokenGroup, error) {
   362  	var inMsg interface{} = in
   363  	if v, ok := inMsg.(interface{ Validate() error }); ok {
   364  		if err := v.Validate(); err != nil {
   365  			return nil, err
   366  		}
   367  	}
   368  
   369  	if res, err := c.Invoker().Invoke(ctx, ConfigServiceChaincode_CreateTokenGroup, []interface{}{in}, &TokenGroup{}); err != nil {
   370  		return nil, err
   371  	} else {
   372  		return res.(*TokenGroup), nil
   373  	}
   374  }
   375  
   376  func (c *ConfigServiceGateway) GetTokenGroup(ctx context.Context, in *TokenGroupId) (*TokenGroup, error) {
   377  	var inMsg interface{} = in
   378  	if v, ok := inMsg.(interface{ Validate() error }); ok {
   379  		if err := v.Validate(); err != nil {
   380  			return nil, err
   381  		}
   382  	}
   383  
   384  	if res, err := c.Invoker().Query(ctx, ConfigServiceChaincode_GetTokenGroup, []interface{}{in}, &TokenGroup{}); err != nil {
   385  		return nil, err
   386  	} else {
   387  		return res.(*TokenGroup), nil
   388  	}
   389  }
   390  
   391  func (c *ConfigServiceGateway) DeleteTokenGroup(ctx context.Context, in *TokenGroupId) (*Token, error) {
   392  	var inMsg interface{} = in
   393  	if v, ok := inMsg.(interface{ Validate() error }); ok {
   394  		if err := v.Validate(); err != nil {
   395  			return nil, err
   396  		}
   397  	}
   398  
   399  	if res, err := c.Invoker().Invoke(ctx, ConfigServiceChaincode_DeleteTokenGroup, []interface{}{in}, &Token{}); err != nil {
   400  		return nil, err
   401  	} else {
   402  		return res.(*Token), nil
   403  	}
   404  }
   405  
   406  // ConfigServiceChaincodeResolver interface for service resolver
   407  type (
   408  	ConfigServiceChaincodeResolver interface {
   409  		Resolve(ctx cckit_router.Context) (ConfigServiceChaincode, error)
   410  	}
   411  
   412  	ConfigServiceChaincodeLocalResolver struct {
   413  		service ConfigServiceChaincode
   414  	}
   415  
   416  	ConfigServiceChaincodeLocatorResolver struct {
   417  		locatorResolver cckit_gateway.ChaincodeLocatorResolver
   418  		service         ConfigServiceChaincode
   419  	}
   420  )
   421  
   422  func NewConfigServiceChaincodeLocalResolver(service ConfigServiceChaincode) *ConfigServiceChaincodeLocalResolver {
   423  	return &ConfigServiceChaincodeLocalResolver{
   424  		service: service,
   425  	}
   426  }
   427  
   428  func (r *ConfigServiceChaincodeLocalResolver) Resolve(ctx cckit_router.Context) (ConfigServiceChaincode, error) {
   429  	if r.service == nil {
   430  		return nil, errors.New("service not set for local chaincode resolver")
   431  	}
   432  
   433  	return r.service, nil
   434  }
   435  
   436  func NewConfigServiceChaincodeResolver(locatorResolver cckit_gateway.ChaincodeLocatorResolver) *ConfigServiceChaincodeLocatorResolver {
   437  	return &ConfigServiceChaincodeLocatorResolver{
   438  		locatorResolver: locatorResolver,
   439  	}
   440  }
   441  
   442  func (r *ConfigServiceChaincodeLocatorResolver) Resolve(ctx cckit_router.Context) (ConfigServiceChaincode, error) {
   443  	if r.service != nil {
   444  		return r.service, nil
   445  	}
   446  
   447  	locator, err := r.locatorResolver(ctx, _ConfigService_serviceDesc.ServiceName)
   448  	if err != nil {
   449  		return nil, err
   450  	}
   451  
   452  	r.service = NewConfigServiceChaincodeStubInvoker(locator)
   453  	return r.service, nil
   454  }
   455  
   456  type ConfigServiceChaincodeStubInvoker struct {
   457  	Invoker cckit_gateway.ChaincodeStubInvoker
   458  }
   459  
   460  func NewConfigServiceChaincodeStubInvoker(locator *cckit_gateway.ChaincodeLocator) *ConfigServiceChaincodeStubInvoker {
   461  	return &ConfigServiceChaincodeStubInvoker{
   462  		Invoker: &cckit_gateway.LocatorChaincodeStubInvoker{Locator: locator},
   463  	}
   464  }
   465  
   466  func (c *ConfigServiceChaincodeStubInvoker) GetConfig(ctx cckit_router.Context, in *emptypb.Empty) (*Config, error) {
   467  
   468  	var inMsg interface{} = in
   469  	if v, ok := inMsg.(interface{ Validate() error }); ok {
   470  		if err := v.Validate(); err != nil {
   471  			return nil, err
   472  		}
   473  	}
   474  
   475  	if res, err := c.Invoker.Query(ctx.Stub(), ConfigServiceChaincode_GetConfig, []interface{}{in}, &Config{}); err != nil {
   476  		return nil, err
   477  	} else {
   478  		return res.(*Config), nil
   479  	}
   480  
   481  }
   482  
   483  func (c *ConfigServiceChaincodeStubInvoker) SetConfig(ctx cckit_router.Context, in *Config) (*Config, error) {
   484  
   485  	return nil, cckit_gateway.ErrInvokeMethodNotAllowed
   486  
   487  }
   488  
   489  func (c *ConfigServiceChaincodeStubInvoker) GetToken(ctx cckit_router.Context, in *TokenId) (*Token, error) {
   490  
   491  	var inMsg interface{} = in
   492  	if v, ok := inMsg.(interface{ Validate() error }); ok {
   493  		if err := v.Validate(); err != nil {
   494  			return nil, err
   495  		}
   496  	}
   497  
   498  	if res, err := c.Invoker.Query(ctx.Stub(), ConfigServiceChaincode_GetToken, []interface{}{in}, &Token{}); err != nil {
   499  		return nil, err
   500  	} else {
   501  		return res.(*Token), nil
   502  	}
   503  
   504  }
   505  
   506  func (c *ConfigServiceChaincodeStubInvoker) GetDefaultToken(ctx cckit_router.Context, in *emptypb.Empty) (*Token, error) {
   507  
   508  	var inMsg interface{} = in
   509  	if v, ok := inMsg.(interface{ Validate() error }); ok {
   510  		if err := v.Validate(); err != nil {
   511  			return nil, err
   512  		}
   513  	}
   514  
   515  	if res, err := c.Invoker.Query(ctx.Stub(), ConfigServiceChaincode_GetDefaultToken, []interface{}{in}, &Token{}); err != nil {
   516  		return nil, err
   517  	} else {
   518  		return res.(*Token), nil
   519  	}
   520  
   521  }
   522  
   523  func (c *ConfigServiceChaincodeStubInvoker) CreateTokenType(ctx cckit_router.Context, in *CreateTokenTypeRequest) (*TokenType, error) {
   524  
   525  	return nil, cckit_gateway.ErrInvokeMethodNotAllowed
   526  
   527  }
   528  
   529  func (c *ConfigServiceChaincodeStubInvoker) GetTokenType(ctx cckit_router.Context, in *TokenTypeId) (*TokenType, error) {
   530  
   531  	var inMsg interface{} = in
   532  	if v, ok := inMsg.(interface{ Validate() error }); ok {
   533  		if err := v.Validate(); err != nil {
   534  			return nil, err
   535  		}
   536  	}
   537  
   538  	if res, err := c.Invoker.Query(ctx.Stub(), ConfigServiceChaincode_GetTokenType, []interface{}{in}, &TokenType{}); err != nil {
   539  		return nil, err
   540  	} else {
   541  		return res.(*TokenType), nil
   542  	}
   543  
   544  }
   545  
   546  func (c *ConfigServiceChaincodeStubInvoker) ListTokenTypes(ctx cckit_router.Context, in *emptypb.Empty) (*TokenTypes, error) {
   547  
   548  	var inMsg interface{} = in
   549  	if v, ok := inMsg.(interface{ Validate() error }); ok {
   550  		if err := v.Validate(); err != nil {
   551  			return nil, err
   552  		}
   553  	}
   554  
   555  	if res, err := c.Invoker.Query(ctx.Stub(), ConfigServiceChaincode_ListTokenTypes, []interface{}{in}, &TokenTypes{}); err != nil {
   556  		return nil, err
   557  	} else {
   558  		return res.(*TokenTypes), nil
   559  	}
   560  
   561  }
   562  
   563  func (c *ConfigServiceChaincodeStubInvoker) UpdateTokenType(ctx cckit_router.Context, in *UpdateTokenTypeRequest) (*TokenType, error) {
   564  
   565  	return nil, cckit_gateway.ErrInvokeMethodNotAllowed
   566  
   567  }
   568  
   569  func (c *ConfigServiceChaincodeStubInvoker) DeleteTokenType(ctx cckit_router.Context, in *TokenTypeId) (*TokenType, error) {
   570  
   571  	return nil, cckit_gateway.ErrInvokeMethodNotAllowed
   572  
   573  }
   574  
   575  func (c *ConfigServiceChaincodeStubInvoker) GetTokenGroups(ctx cckit_router.Context, in *TokenTypeId) (*TokenGroups, error) {
   576  
   577  	var inMsg interface{} = in
   578  	if v, ok := inMsg.(interface{ Validate() error }); ok {
   579  		if err := v.Validate(); err != nil {
   580  			return nil, err
   581  		}
   582  	}
   583  
   584  	if res, err := c.Invoker.Query(ctx.Stub(), ConfigServiceChaincode_GetTokenGroups, []interface{}{in}, &TokenGroups{}); err != nil {
   585  		return nil, err
   586  	} else {
   587  		return res.(*TokenGroups), nil
   588  	}
   589  
   590  }
   591  
   592  func (c *ConfigServiceChaincodeStubInvoker) CreateTokenGroup(ctx cckit_router.Context, in *CreateTokenGroupRequest) (*TokenGroup, error) {
   593  
   594  	return nil, cckit_gateway.ErrInvokeMethodNotAllowed
   595  
   596  }
   597  
   598  func (c *ConfigServiceChaincodeStubInvoker) GetTokenGroup(ctx cckit_router.Context, in *TokenGroupId) (*TokenGroup, error) {
   599  
   600  	var inMsg interface{} = in
   601  	if v, ok := inMsg.(interface{ Validate() error }); ok {
   602  		if err := v.Validate(); err != nil {
   603  			return nil, err
   604  		}
   605  	}
   606  
   607  	if res, err := c.Invoker.Query(ctx.Stub(), ConfigServiceChaincode_GetTokenGroup, []interface{}{in}, &TokenGroup{}); err != nil {
   608  		return nil, err
   609  	} else {
   610  		return res.(*TokenGroup), nil
   611  	}
   612  
   613  }
   614  
   615  func (c *ConfigServiceChaincodeStubInvoker) DeleteTokenGroup(ctx cckit_router.Context, in *TokenGroupId) (*Token, error) {
   616  
   617  	return nil, cckit_gateway.ErrInvokeMethodNotAllowed
   618  
   619  }