Documentation
¶
Overview ¶
Package service is a generated protocol buffer package.
It is generated from these files:
service.proto
It has these top-level messages:
Package service is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Constants
- func CPaperApiDef(service *CPaperGateway) gateway.ServiceDef
- func RegisterCPaperChaincode(r *router.Group, cc CPaperChaincode) error
- func RegisterCPaperHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterCPaperHandlerClient(ctx context.Context, mux *runtime.ServeMux, client CPaperClient) error
- func RegisterCPaperHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterCPaperServer(s *grpc.Server, srv CPaperServer)
- type CPaperChaincode
- type CPaperClient
- type CPaperGateway
- func (c *CPaperGateway) Buy(ctx context.Context, in *schema.BuyCommercialPaper) (*schema.CommercialPaper, error)
- func (c *CPaperGateway) Delete(ctx context.Context, in *schema.CommercialPaperId) (*schema.CommercialPaper, error)
- func (c *CPaperGateway) Get(ctx context.Context, in *schema.CommercialPaperId) (*schema.CommercialPaper, error)
- func (c *CPaperGateway) GetByExternalId(ctx context.Context, in *schema.ExternalId) (*schema.CommercialPaper, error)
- func (c *CPaperGateway) Issue(ctx context.Context, in *schema.IssueCommercialPaper) (*schema.CommercialPaper, error)
- func (c *CPaperGateway) List(ctx context.Context, in *empty.Empty) (*schema.CommercialPaperList, error)
- func (c *CPaperGateway) Redeem(ctx context.Context, in *schema.RedeemCommercialPaper) (*schema.CommercialPaper, error)
- type CPaperServer
Constants ¶
const ( CPaperChaincode_List = `List` CPaperChaincode_Get = `Get` CPaperChaincode_GetByExternalId = `GetByExternalId` CPaperChaincode_Issue = `Issue` CPaperChaincode_Buy = `Buy` CPaperChaincode_Redeem = `Redeem` CPaperChaincode_Delete = `Delete` )
chaincode method names without router group namespace
Variables ¶
This section is empty.
Functions ¶
func CPaperApiDef ¶
func CPaperApiDef(service *CPaperGateway) gateway.ServiceDef
func RegisterCPaperChaincode ¶
func RegisterCPaperChaincode(r *router.Group, cc CPaperChaincode) error
RegisterCPaperChaincode registers service methods as chaincode router handlers
func RegisterCPaperHandler ¶
RegisterCPaperHandler registers the http handlers for service CPaper to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterCPaperHandlerClient ¶
func RegisterCPaperHandlerClient(ctx context.Context, mux *runtime.ServeMux, client CPaperClient) error
RegisterCPaperHandlerClient registers the http handlers for service CPaper to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "CPaperClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "CPaperClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "CPaperClient" to call the correct interceptors.
func RegisterCPaperHandlerFromEndpoint ¶
func RegisterCPaperHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterCPaperHandlerFromEndpoint is same as RegisterCPaperHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterCPaperServer ¶
func RegisterCPaperServer(s *grpc.Server, srv CPaperServer)
Types ¶
type CPaperChaincode ¶
type CPaperChaincode interface {
List(router.Context, *empty.Empty) (*schema.CommercialPaperList, error)
Get(router.Context, *schema.CommercialPaperId) (*schema.CommercialPaper, error)
GetByExternalId(router.Context, *schema.ExternalId) (*schema.CommercialPaper, error)
Issue(router.Context, *schema.IssueCommercialPaper) (*schema.CommercialPaper, error)
Buy(router.Context, *schema.BuyCommercialPaper) (*schema.CommercialPaper, error)
Redeem(router.Context, *schema.RedeemCommercialPaper) (*schema.CommercialPaper, error)
Delete(router.Context, *schema.CommercialPaperId) (*schema.CommercialPaper, error)
}
chaincode methods interface
type CPaperClient ¶
type CPaperClient interface {
List(ctx context.Context, in *google_protobuf1.Empty, opts ...grpc.CallOption) (*schema.CommercialPaperList, error)
Get(ctx context.Context, in *schema.CommercialPaperId, opts ...grpc.CallOption) (*schema.CommercialPaper, error)
GetByExternalId(ctx context.Context, in *schema.ExternalId, opts ...grpc.CallOption) (*schema.CommercialPaper, error)
Issue(ctx context.Context, in *schema.IssueCommercialPaper, opts ...grpc.CallOption) (*schema.CommercialPaper, error)
Buy(ctx context.Context, in *schema.BuyCommercialPaper, opts ...grpc.CallOption) (*schema.CommercialPaper, error)
Redeem(ctx context.Context, in *schema.RedeemCommercialPaper, opts ...grpc.CallOption) (*schema.CommercialPaper, error)
Delete(ctx context.Context, in *schema.CommercialPaperId, opts ...grpc.CallOption) (*schema.CommercialPaper, error)
}
func NewCPaperClient ¶
func NewCPaperClient(cc *grpc.ClientConn) CPaperClient
type CPaperGateway ¶
gateway implementation gateway can be used as kind of SDK, GRPC or REST server ( via grpc-gateway or clay )
func NewCPaperGateway ¶
func NewCPaperGateway(ccService service.Chaincode, channel, chaincode string, signer msp.SigningIdentity) *CPaperGateway
func (*CPaperGateway) Buy ¶
func (c *CPaperGateway) Buy(ctx context.Context, in *schema.BuyCommercialPaper) (*schema.CommercialPaper, error)
func (*CPaperGateway) Delete ¶
func (c *CPaperGateway) Delete(ctx context.Context, in *schema.CommercialPaperId) (*schema.CommercialPaper, error)
func (*CPaperGateway) Get ¶
func (c *CPaperGateway) Get(ctx context.Context, in *schema.CommercialPaperId) (*schema.CommercialPaper, error)
func (*CPaperGateway) GetByExternalId ¶
func (c *CPaperGateway) GetByExternalId(ctx context.Context, in *schema.ExternalId) (*schema.CommercialPaper, error)
func (*CPaperGateway) Issue ¶
func (c *CPaperGateway) Issue(ctx context.Context, in *schema.IssueCommercialPaper) (*schema.CommercialPaper, error)
func (*CPaperGateway) List ¶
func (c *CPaperGateway) List(ctx context.Context, in *empty.Empty) (*schema.CommercialPaperList, error)
func (*CPaperGateway) Redeem ¶
func (c *CPaperGateway) Redeem(ctx context.Context, in *schema.RedeemCommercialPaper) (*schema.CommercialPaper, error)
type CPaperServer ¶
type CPaperServer interface {
List(context.Context, *google_protobuf1.Empty) (*schema.CommercialPaperList, error)
Get(context.Context, *schema.CommercialPaperId) (*schema.CommercialPaper, error)
GetByExternalId(context.Context, *schema.ExternalId) (*schema.CommercialPaper, error)
Issue(context.Context, *schema.IssueCommercialPaper) (*schema.CommercialPaper, error)
Buy(context.Context, *schema.BuyCommercialPaper) (*schema.CommercialPaper, error)
Redeem(context.Context, *schema.RedeemCommercialPaper) (*schema.CommercialPaper, error)
Delete(context.Context, *schema.CommercialPaperId) (*schema.CommercialPaper, error)
}