Documentation ¶
Overview ¶
Package cscc is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Variables
- func RegisterCSCCServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterCSCCServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client CSCCServiceClient) error
- func RegisterCSCCServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterCSCCServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server CSCCServiceServer) error
- func RegisterCSCCServiceServer(s *grpc.Server, srv CSCCServiceServer)
- type CSCCServiceClient
- type CSCCServiceServer
- type GetChannelConfigRequest
- func (*GetChannelConfigRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GetChannelConfigRequest) GetChannel() string
- func (*GetChannelConfigRequest) ProtoMessage()
- func (x *GetChannelConfigRequest) ProtoReflect() protoreflect.Message
- func (x *GetChannelConfigRequest) Reset()
- func (x *GetChannelConfigRequest) String() string
- func (m *GetChannelConfigRequest) Validate() error
- func (m *GetChannelConfigRequest) ValidateAll() error
- type GetChannelConfigRequestMultiError
- type GetChannelConfigRequestValidationError
- func (e GetChannelConfigRequestValidationError) Cause() error
- func (e GetChannelConfigRequestValidationError) Error() string
- func (e GetChannelConfigRequestValidationError) ErrorName() string
- func (e GetChannelConfigRequestValidationError) Field() string
- func (e GetChannelConfigRequestValidationError) Key() bool
- func (e GetChannelConfigRequestValidationError) Reason() string
- type GetConfigBlockRequest
- func (*GetConfigBlockRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GetConfigBlockRequest) GetChannel() string
- func (*GetConfigBlockRequest) ProtoMessage()
- func (x *GetConfigBlockRequest) ProtoReflect() protoreflect.Message
- func (x *GetConfigBlockRequest) Reset()
- func (x *GetConfigBlockRequest) String() string
- func (m *GetConfigBlockRequest) Validate() error
- func (m *GetConfigBlockRequest) ValidateAll() error
- type GetConfigBlockRequestMultiError
- type GetConfigBlockRequestValidationError
- func (e GetConfigBlockRequestValidationError) Cause() error
- func (e GetConfigBlockRequestValidationError) Error() string
- func (e GetConfigBlockRequestValidationError) ErrorName() string
- func (e GetConfigBlockRequestValidationError) Field() string
- func (e GetConfigBlockRequestValidationError) Key() bool
- func (e GetConfigBlockRequestValidationError) Reason() string
- type JoinChainRequest
- func (*JoinChainRequest) Descriptor() ([]byte, []int)deprecated
- func (x *JoinChainRequest) GetChannel() string
- func (x *JoinChainRequest) GetGenesisBlock() *common.Block
- func (*JoinChainRequest) ProtoMessage()
- func (x *JoinChainRequest) ProtoReflect() protoreflect.Message
- func (x *JoinChainRequest) Reset()
- func (x *JoinChainRequest) String() string
- func (m *JoinChainRequest) Validate() error
- func (m *JoinChainRequest) ValidateAll() error
- type JoinChainRequestMultiError
- type JoinChainRequestValidationError
- func (e JoinChainRequestValidationError) Cause() error
- func (e JoinChainRequestValidationError) Error() string
- func (e JoinChainRequestValidationError) ErrorName() string
- func (e JoinChainRequestValidationError) Field() string
- func (e JoinChainRequestValidationError) Key() bool
- func (e JoinChainRequestValidationError) Reason() string
- type Service
- func (c *Service) GetChannelConfig(ctx context.Context, request *GetChannelConfigRequest) (*common.Config, error)
- func (c *Service) GetChannels(ctx context.Context, _ *empty.Empty) (*peer.ChannelQueryResponse, error)
- func (c *Service) GetConfigBlock(ctx context.Context, request *GetConfigBlockRequest) (*common.Block, error)
- func (c *Service) JoinChain(ctx context.Context, request *JoinChainRequest) (*empty.Empty, error)
- func (c *Service) ServiceDef() *service.Def
- type UnimplementedCSCCServiceServer
- func (*UnimplementedCSCCServiceServer) GetChannelConfig(context.Context, *GetChannelConfigRequest) (*common.Config, error)
- func (*UnimplementedCSCCServiceServer) GetChannels(context.Context, *emptypb.Empty) (*peer.ChannelQueryResponse, error)
- func (*UnimplementedCSCCServiceServer) GetConfigBlock(context.Context, *GetConfigBlockRequest) (*common.Block, error)
- func (*UnimplementedCSCCServiceServer) JoinChain(context.Context, *JoinChainRequest) (*emptypb.Empty, error)
Constants ¶
This section is empty.
Variables ¶
var File_systemcc_cscc_cscc_proto protoreflect.FileDescriptor
var Swagger []byte
Functions ¶
func RegisterCSCCServiceHandler ¶
func RegisterCSCCServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterCSCCServiceHandler registers the http handlers for service CSCCService to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterCSCCServiceHandlerClient ¶
func RegisterCSCCServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client CSCCServiceClient) error
RegisterCSCCServiceHandlerClient registers the http handlers for service CSCCService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "CSCCServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "CSCCServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "CSCCServiceClient" to call the correct interceptors.
func RegisterCSCCServiceHandlerFromEndpoint ¶
func RegisterCSCCServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterCSCCServiceHandlerFromEndpoint is same as RegisterCSCCServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterCSCCServiceHandlerServer ¶
func RegisterCSCCServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server CSCCServiceServer) error
RegisterCSCCServiceHandlerServer registers the http handlers for service CSCCService to "mux". UnaryRPC :call CSCCServiceServer 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 RegisterCSCCServiceHandlerFromEndpoint instead.
func RegisterCSCCServiceServer ¶
func RegisterCSCCServiceServer(s *grpc.Server, srv CSCCServiceServer)
Types ¶
type CSCCServiceClient ¶
type CSCCServiceClient interface { // GetChainInfo allows joining channel using presented genesis block JoinChain(ctx context.Context, in *JoinChainRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) GetChannels(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*peer.ChannelQueryResponse, error) // GetConfigBlock returns genesis block of channel GetConfigBlock(ctx context.Context, in *GetConfigBlockRequest, opts ...grpc.CallOption) (*common.Block, error) // GetChannelConfig returns channel configuration GetChannelConfig(ctx context.Context, in *GetChannelConfigRequest, opts ...grpc.CallOption) (*common.Config, error) }
CSCCServiceClient is the client API for CSCCService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewCSCCServiceClient ¶
func NewCSCCServiceClient(cc grpc.ClientConnInterface) CSCCServiceClient
type CSCCServiceServer ¶
type CSCCServiceServer interface { // GetChainInfo allows joining channel using presented genesis block JoinChain(context.Context, *JoinChainRequest) (*emptypb.Empty, error) GetChannels(context.Context, *emptypb.Empty) (*peer.ChannelQueryResponse, error) // GetConfigBlock returns genesis block of channel GetConfigBlock(context.Context, *GetConfigBlockRequest) (*common.Block, error) // GetChannelConfig returns channel configuration GetChannelConfig(context.Context, *GetChannelConfigRequest) (*common.Config, error) }
CSCCServiceServer is the server API for CSCCService service.
type GetChannelConfigRequest ¶
type GetChannelConfigRequest struct { Channel string `protobuf:"bytes,1,opt,name=channel,proto3" json:"channel,omitempty"` // contains filtered or unexported fields }
func (*GetChannelConfigRequest) Descriptor
deprecated
func (*GetChannelConfigRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetChannelConfigRequest.ProtoReflect.Descriptor instead.
func (*GetChannelConfigRequest) GetChannel ¶
func (x *GetChannelConfigRequest) GetChannel() string
func (*GetChannelConfigRequest) ProtoMessage ¶
func (*GetChannelConfigRequest) ProtoMessage()
func (*GetChannelConfigRequest) ProtoReflect ¶
func (x *GetChannelConfigRequest) ProtoReflect() protoreflect.Message
func (*GetChannelConfigRequest) Reset ¶
func (x *GetChannelConfigRequest) Reset()
func (*GetChannelConfigRequest) String ¶
func (x *GetChannelConfigRequest) String() string
func (*GetChannelConfigRequest) Validate ¶
func (m *GetChannelConfigRequest) Validate() error
Validate checks the field values on GetChannelConfigRequest with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*GetChannelConfigRequest) ValidateAll ¶
func (m *GetChannelConfigRequest) ValidateAll() error
ValidateAll checks the field values on GetChannelConfigRequest with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in GetChannelConfigRequestMultiError, or nil if none found.
type GetChannelConfigRequestMultiError ¶
type GetChannelConfigRequestMultiError []error
GetChannelConfigRequestMultiError is an error wrapping multiple validation errors returned by GetChannelConfigRequest.ValidateAll() if the designated constraints aren't met.
func (GetChannelConfigRequestMultiError) AllErrors ¶
func (m GetChannelConfigRequestMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (GetChannelConfigRequestMultiError) Error ¶
func (m GetChannelConfigRequestMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type GetChannelConfigRequestValidationError ¶
type GetChannelConfigRequestValidationError struct {
// contains filtered or unexported fields
}
GetChannelConfigRequestValidationError is the validation error returned by GetChannelConfigRequest.Validate if the designated constraints aren't met.
func (GetChannelConfigRequestValidationError) Cause ¶
func (e GetChannelConfigRequestValidationError) Cause() error
Cause function returns cause value.
func (GetChannelConfigRequestValidationError) Error ¶
func (e GetChannelConfigRequestValidationError) Error() string
Error satisfies the builtin error interface
func (GetChannelConfigRequestValidationError) ErrorName ¶
func (e GetChannelConfigRequestValidationError) ErrorName() string
ErrorName returns error name.
func (GetChannelConfigRequestValidationError) Field ¶
func (e GetChannelConfigRequestValidationError) Field() string
Field function returns field value.
func (GetChannelConfigRequestValidationError) Key ¶
func (e GetChannelConfigRequestValidationError) Key() bool
Key function returns key value.
func (GetChannelConfigRequestValidationError) Reason ¶
func (e GetChannelConfigRequestValidationError) Reason() string
Reason function returns reason value.
type GetConfigBlockRequest ¶
type GetConfigBlockRequest struct { Channel string `protobuf:"bytes,1,opt,name=channel,proto3" json:"channel,omitempty"` // contains filtered or unexported fields }
func (*GetConfigBlockRequest) Descriptor
deprecated
func (*GetConfigBlockRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetConfigBlockRequest.ProtoReflect.Descriptor instead.
func (*GetConfigBlockRequest) GetChannel ¶
func (x *GetConfigBlockRequest) GetChannel() string
func (*GetConfigBlockRequest) ProtoMessage ¶
func (*GetConfigBlockRequest) ProtoMessage()
func (*GetConfigBlockRequest) ProtoReflect ¶
func (x *GetConfigBlockRequest) ProtoReflect() protoreflect.Message
func (*GetConfigBlockRequest) Reset ¶
func (x *GetConfigBlockRequest) Reset()
func (*GetConfigBlockRequest) String ¶
func (x *GetConfigBlockRequest) String() string
func (*GetConfigBlockRequest) Validate ¶
func (m *GetConfigBlockRequest) Validate() error
Validate checks the field values on GetConfigBlockRequest with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*GetConfigBlockRequest) ValidateAll ¶
func (m *GetConfigBlockRequest) ValidateAll() error
ValidateAll checks the field values on GetConfigBlockRequest with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in GetConfigBlockRequestMultiError, or nil if none found.
type GetConfigBlockRequestMultiError ¶
type GetConfigBlockRequestMultiError []error
GetConfigBlockRequestMultiError is an error wrapping multiple validation errors returned by GetConfigBlockRequest.ValidateAll() if the designated constraints aren't met.
func (GetConfigBlockRequestMultiError) AllErrors ¶
func (m GetConfigBlockRequestMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (GetConfigBlockRequestMultiError) Error ¶
func (m GetConfigBlockRequestMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type GetConfigBlockRequestValidationError ¶
type GetConfigBlockRequestValidationError struct {
// contains filtered or unexported fields
}
GetConfigBlockRequestValidationError is the validation error returned by GetConfigBlockRequest.Validate if the designated constraints aren't met.
func (GetConfigBlockRequestValidationError) Cause ¶
func (e GetConfigBlockRequestValidationError) Cause() error
Cause function returns cause value.
func (GetConfigBlockRequestValidationError) Error ¶
func (e GetConfigBlockRequestValidationError) Error() string
Error satisfies the builtin error interface
func (GetConfigBlockRequestValidationError) ErrorName ¶
func (e GetConfigBlockRequestValidationError) ErrorName() string
ErrorName returns error name.
func (GetConfigBlockRequestValidationError) Field ¶
func (e GetConfigBlockRequestValidationError) Field() string
Field function returns field value.
func (GetConfigBlockRequestValidationError) Key ¶
func (e GetConfigBlockRequestValidationError) Key() bool
Key function returns key value.
func (GetConfigBlockRequestValidationError) Reason ¶
func (e GetConfigBlockRequestValidationError) Reason() string
Reason function returns reason value.
type JoinChainRequest ¶
type JoinChainRequest struct { Channel string `protobuf:"bytes,1,opt,name=channel,proto3" json:"channel,omitempty"` GenesisBlock *common.Block `protobuf:"bytes,2,opt,name=genesis_block,json=genesisBlock,proto3" json:"genesis_block,omitempty"` // contains filtered or unexported fields }
func (*JoinChainRequest) Descriptor
deprecated
func (*JoinChainRequest) Descriptor() ([]byte, []int)
Deprecated: Use JoinChainRequest.ProtoReflect.Descriptor instead.
func (*JoinChainRequest) GetChannel ¶
func (x *JoinChainRequest) GetChannel() string
func (*JoinChainRequest) GetGenesisBlock ¶
func (x *JoinChainRequest) GetGenesisBlock() *common.Block
func (*JoinChainRequest) ProtoMessage ¶
func (*JoinChainRequest) ProtoMessage()
func (*JoinChainRequest) ProtoReflect ¶
func (x *JoinChainRequest) ProtoReflect() protoreflect.Message
func (*JoinChainRequest) Reset ¶
func (x *JoinChainRequest) Reset()
func (*JoinChainRequest) String ¶
func (x *JoinChainRequest) String() string
func (*JoinChainRequest) Validate ¶
func (m *JoinChainRequest) Validate() error
Validate checks the field values on JoinChainRequest with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*JoinChainRequest) ValidateAll ¶
func (m *JoinChainRequest) ValidateAll() error
ValidateAll checks the field values on JoinChainRequest with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in JoinChainRequestMultiError, or nil if none found.
type JoinChainRequestMultiError ¶
type JoinChainRequestMultiError []error
JoinChainRequestMultiError is an error wrapping multiple validation errors returned by JoinChainRequest.ValidateAll() if the designated constraints aren't met.
func (JoinChainRequestMultiError) AllErrors ¶
func (m JoinChainRequestMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (JoinChainRequestMultiError) Error ¶
func (m JoinChainRequestMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type JoinChainRequestValidationError ¶
type JoinChainRequestValidationError struct {
// contains filtered or unexported fields
}
JoinChainRequestValidationError is the validation error returned by JoinChainRequest.Validate if the designated constraints aren't met.
func (JoinChainRequestValidationError) Cause ¶
func (e JoinChainRequestValidationError) Cause() error
Cause function returns cause value.
func (JoinChainRequestValidationError) Error ¶
func (e JoinChainRequestValidationError) Error() string
Error satisfies the builtin error interface
func (JoinChainRequestValidationError) ErrorName ¶
func (e JoinChainRequestValidationError) ErrorName() string
ErrorName returns error name.
func (JoinChainRequestValidationError) Field ¶
func (e JoinChainRequestValidationError) Field() string
Field function returns field value.
func (JoinChainRequestValidationError) Key ¶
func (e JoinChainRequestValidationError) Key() bool
Key function returns key value.
func (JoinChainRequestValidationError) Reason ¶
func (e JoinChainRequestValidationError) Reason() string
Reason function returns reason value.
type Service ¶
type Service struct { UnimplementedCSCCServiceServer Querier *tx.ProtoQuerier ChannelListGetter api.ChannelListGetter FabricVersion hlfproto.FabricVersion }
func FromClient ¶
func (*Service) GetChannelConfig ¶
func (*Service) GetChannels ¶
func (*Service) GetConfigBlock ¶
func (*Service) ServiceDef ¶
type UnimplementedCSCCServiceServer ¶
type UnimplementedCSCCServiceServer struct { }
UnimplementedCSCCServiceServer can be embedded to have forward compatible implementations.
func (*UnimplementedCSCCServiceServer) GetChannelConfig ¶
func (*UnimplementedCSCCServiceServer) GetChannelConfig(context.Context, *GetChannelConfigRequest) (*common.Config, error)
func (*UnimplementedCSCCServiceServer) GetChannels ¶
func (*UnimplementedCSCCServiceServer) GetChannels(context.Context, *emptypb.Empty) (*peer.ChannelQueryResponse, error)
func (*UnimplementedCSCCServiceServer) GetConfigBlock ¶
func (*UnimplementedCSCCServiceServer) GetConfigBlock(context.Context, *GetConfigBlockRequest) (*common.Block, error)
func (*UnimplementedCSCCServiceServer) JoinChain ¶
func (*UnimplementedCSCCServiceServer) JoinChain(context.Context, *JoinChainRequest) (*emptypb.Empty, error)