service

package
v0.5.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 6, 2019 License: MIT Imports: 21 Imported by: 0

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

View Source
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

func RegisterCPaperHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

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 CPaperGateway

type CPaperGateway struct {
	Gateway gateway.Chaincode
}

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 (*CPaperGateway) Delete

func (*CPaperGateway) Get

func (*CPaperGateway) GetByExternalId

func (c *CPaperGateway) GetByExternalId(ctx context.Context, in *schema.ExternalId) (*schema.CommercialPaper, error)

func (*CPaperGateway) Issue

func (*CPaperGateway) List

func (*CPaperGateway) Redeem

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL