qscc

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: Apache-2.0 Imports: 38 Imported by: 0

Documentation

Overview

Package qscc is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

View Source
var File_systemcc_qscc_qscc_proto protoreflect.FileDescriptor
View Source
var Swagger []byte

Functions

func RegisterQSCCServiceHandler

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

RegisterQSCCServiceHandler registers the http handlers for service QSCCService to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterQSCCServiceHandlerClient

func RegisterQSCCServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QSCCServiceClient) error

RegisterQSCCServiceHandlerClient registers the http handlers for service QSCCService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "QSCCServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "QSCCServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "QSCCServiceClient" to call the correct interceptors.

func RegisterQSCCServiceHandlerFromEndpoint

func RegisterQSCCServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterQSCCServiceHandlerFromEndpoint is same as RegisterQSCCServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterQSCCServiceHandlerServer

func RegisterQSCCServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QSCCServiceServer) error

RegisterQSCCServiceHandlerServer registers the http handlers for service QSCCService to "mux". UnaryRPC :call QSCCServiceServer 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 RegisterQSCCServiceHandlerFromEndpoint instead.

func RegisterQSCCServiceServer

func RegisterQSCCServiceServer(s *grpc.Server, srv QSCCServiceServer)

Types

type GetBlockByHashRequest

type GetBlockByHashRequest struct {
	ChannelName string `protobuf:"bytes,1,opt,name=channel_name,json=channelName,proto3" json:"channel_name,omitempty"`
	BlockHash   []byte `protobuf:"bytes,2,opt,name=block_hash,json=blockHash,proto3" json:"block_hash,omitempty"`
	// contains filtered or unexported fields
}

func (*GetBlockByHashRequest) Descriptor deprecated

func (*GetBlockByHashRequest) Descriptor() ([]byte, []int)

Deprecated: Use GetBlockByHashRequest.ProtoReflect.Descriptor instead.

func (*GetBlockByHashRequest) GetBlockHash

func (x *GetBlockByHashRequest) GetBlockHash() []byte

func (*GetBlockByHashRequest) GetChannelName

func (x *GetBlockByHashRequest) GetChannelName() string

func (*GetBlockByHashRequest) ProtoMessage

func (*GetBlockByHashRequest) ProtoMessage()

func (*GetBlockByHashRequest) ProtoReflect

func (x *GetBlockByHashRequest) ProtoReflect() protoreflect.Message

func (*GetBlockByHashRequest) Reset

func (x *GetBlockByHashRequest) Reset()

func (*GetBlockByHashRequest) String

func (x *GetBlockByHashRequest) String() string

func (*GetBlockByHashRequest) Validate

func (m *GetBlockByHashRequest) Validate() error

Validate checks the field values on GetBlockByHashRequest 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 (*GetBlockByHashRequest) ValidateAll

func (m *GetBlockByHashRequest) ValidateAll() error

ValidateAll checks the field values on GetBlockByHashRequest 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 GetBlockByHashRequestMultiError, or nil if none found.

type GetBlockByHashRequestMultiError

type GetBlockByHashRequestMultiError []error

GetBlockByHashRequestMultiError is an error wrapping multiple validation errors returned by GetBlockByHashRequest.ValidateAll() if the designated constraints aren't met.

func (GetBlockByHashRequestMultiError) AllErrors

func (m GetBlockByHashRequestMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (GetBlockByHashRequestMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type GetBlockByHashRequestValidationError

type GetBlockByHashRequestValidationError struct {
	// contains filtered or unexported fields
}

GetBlockByHashRequestValidationError is the validation error returned by GetBlockByHashRequest.Validate if the designated constraints aren't met.

func (GetBlockByHashRequestValidationError) Cause

Cause function returns cause value.

func (GetBlockByHashRequestValidationError) Error

Error satisfies the builtin error interface

func (GetBlockByHashRequestValidationError) ErrorName

ErrorName returns error name.

func (GetBlockByHashRequestValidationError) Field

Field function returns field value.

func (GetBlockByHashRequestValidationError) Key

Key function returns key value.

func (GetBlockByHashRequestValidationError) Reason

Reason function returns reason value.

type GetBlockByNumberRequest

type GetBlockByNumberRequest struct {
	ChannelName string `protobuf:"bytes,1,opt,name=channel_name,json=channelName,proto3" json:"channel_name,omitempty"`
	BlockNumber int64  `protobuf:"varint,2,opt,name=block_number,json=blockNumber,proto3" json:"block_number,omitempty"`
	// contains filtered or unexported fields
}

func (*GetBlockByNumberRequest) Descriptor deprecated

func (*GetBlockByNumberRequest) Descriptor() ([]byte, []int)

Deprecated: Use GetBlockByNumberRequest.ProtoReflect.Descriptor instead.

func (*GetBlockByNumberRequest) GetBlockNumber

func (x *GetBlockByNumberRequest) GetBlockNumber() int64

func (*GetBlockByNumberRequest) GetChannelName

func (x *GetBlockByNumberRequest) GetChannelName() string

func (*GetBlockByNumberRequest) ProtoMessage

func (*GetBlockByNumberRequest) ProtoMessage()

func (*GetBlockByNumberRequest) ProtoReflect

func (x *GetBlockByNumberRequest) ProtoReflect() protoreflect.Message

func (*GetBlockByNumberRequest) Reset

func (x *GetBlockByNumberRequest) Reset()

func (*GetBlockByNumberRequest) String

func (x *GetBlockByNumberRequest) String() string

func (*GetBlockByNumberRequest) Validate

func (m *GetBlockByNumberRequest) Validate() error

Validate checks the field values on GetBlockByNumberRequest 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 (*GetBlockByNumberRequest) ValidateAll

func (m *GetBlockByNumberRequest) ValidateAll() error

ValidateAll checks the field values on GetBlockByNumberRequest 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 GetBlockByNumberRequestMultiError, or nil if none found.

type GetBlockByNumberRequestMultiError

type GetBlockByNumberRequestMultiError []error

GetBlockByNumberRequestMultiError is an error wrapping multiple validation errors returned by GetBlockByNumberRequest.ValidateAll() if the designated constraints aren't met.

func (GetBlockByNumberRequestMultiError) AllErrors

func (m GetBlockByNumberRequestMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (GetBlockByNumberRequestMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type GetBlockByNumberRequestValidationError

type GetBlockByNumberRequestValidationError struct {
	// contains filtered or unexported fields
}

GetBlockByNumberRequestValidationError is the validation error returned by GetBlockByNumberRequest.Validate if the designated constraints aren't met.

func (GetBlockByNumberRequestValidationError) Cause

Cause function returns cause value.

func (GetBlockByNumberRequestValidationError) Error

Error satisfies the builtin error interface

func (GetBlockByNumberRequestValidationError) ErrorName

ErrorName returns error name.

func (GetBlockByNumberRequestValidationError) Field

Field function returns field value.

func (GetBlockByNumberRequestValidationError) Key

Key function returns key value.

func (GetBlockByNumberRequestValidationError) Reason

Reason function returns reason value.

type GetBlockByTxIDRequest

type GetBlockByTxIDRequest struct {
	ChannelName string `protobuf:"bytes,1,opt,name=channel_name,json=channelName,proto3" json:"channel_name,omitempty"`
	TxId        string `protobuf:"bytes,2,opt,name=tx_id,json=txId,proto3" json:"tx_id,omitempty"`
	// contains filtered or unexported fields
}

func (*GetBlockByTxIDRequest) Descriptor deprecated

func (*GetBlockByTxIDRequest) Descriptor() ([]byte, []int)

Deprecated: Use GetBlockByTxIDRequest.ProtoReflect.Descriptor instead.

func (*GetBlockByTxIDRequest) GetChannelName

func (x *GetBlockByTxIDRequest) GetChannelName() string

func (*GetBlockByTxIDRequest) GetTxId

func (x *GetBlockByTxIDRequest) GetTxId() string

func (*GetBlockByTxIDRequest) ProtoMessage

func (*GetBlockByTxIDRequest) ProtoMessage()

func (*GetBlockByTxIDRequest) ProtoReflect

func (x *GetBlockByTxIDRequest) ProtoReflect() protoreflect.Message

func (*GetBlockByTxIDRequest) Reset

func (x *GetBlockByTxIDRequest) Reset()

func (*GetBlockByTxIDRequest) String

func (x *GetBlockByTxIDRequest) String() string

func (*GetBlockByTxIDRequest) Validate

func (m *GetBlockByTxIDRequest) Validate() error

Validate checks the field values on GetBlockByTxIDRequest 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 (*GetBlockByTxIDRequest) ValidateAll

func (m *GetBlockByTxIDRequest) ValidateAll() error

ValidateAll checks the field values on GetBlockByTxIDRequest 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 GetBlockByTxIDRequestMultiError, or nil if none found.

type GetBlockByTxIDRequestMultiError

type GetBlockByTxIDRequestMultiError []error

GetBlockByTxIDRequestMultiError is an error wrapping multiple validation errors returned by GetBlockByTxIDRequest.ValidateAll() if the designated constraints aren't met.

func (GetBlockByTxIDRequestMultiError) AllErrors

func (m GetBlockByTxIDRequestMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (GetBlockByTxIDRequestMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type GetBlockByTxIDRequestValidationError

type GetBlockByTxIDRequestValidationError struct {
	// contains filtered or unexported fields
}

GetBlockByTxIDRequestValidationError is the validation error returned by GetBlockByTxIDRequest.Validate if the designated constraints aren't met.

func (GetBlockByTxIDRequestValidationError) Cause

Cause function returns cause value.

func (GetBlockByTxIDRequestValidationError) Error

Error satisfies the builtin error interface

func (GetBlockByTxIDRequestValidationError) ErrorName

ErrorName returns error name.

func (GetBlockByTxIDRequestValidationError) Field

Field function returns field value.

func (GetBlockByTxIDRequestValidationError) Key

Key function returns key value.

func (GetBlockByTxIDRequestValidationError) Reason

Reason function returns reason value.

type GetChainInfoRequest

type GetChainInfoRequest struct {
	ChannelName string `protobuf:"bytes,1,opt,name=channel_name,json=channelName,proto3" json:"channel_name,omitempty"`
	// contains filtered or unexported fields
}

func (*GetChainInfoRequest) Descriptor deprecated

func (*GetChainInfoRequest) Descriptor() ([]byte, []int)

Deprecated: Use GetChainInfoRequest.ProtoReflect.Descriptor instead.

func (*GetChainInfoRequest) GetChannelName

func (x *GetChainInfoRequest) GetChannelName() string

func (*GetChainInfoRequest) ProtoMessage

func (*GetChainInfoRequest) ProtoMessage()

func (*GetChainInfoRequest) ProtoReflect

func (x *GetChainInfoRequest) ProtoReflect() protoreflect.Message

func (*GetChainInfoRequest) Reset

func (x *GetChainInfoRequest) Reset()

func (*GetChainInfoRequest) String

func (x *GetChainInfoRequest) String() string

func (*GetChainInfoRequest) Validate

func (m *GetChainInfoRequest) Validate() error

Validate checks the field values on GetChainInfoRequest 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 (*GetChainInfoRequest) ValidateAll

func (m *GetChainInfoRequest) ValidateAll() error

ValidateAll checks the field values on GetChainInfoRequest 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 GetChainInfoRequestMultiError, or nil if none found.

type GetChainInfoRequestMultiError

type GetChainInfoRequestMultiError []error

GetChainInfoRequestMultiError is an error wrapping multiple validation errors returned by GetChainInfoRequest.ValidateAll() if the designated constraints aren't met.

func (GetChainInfoRequestMultiError) AllErrors

func (m GetChainInfoRequestMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (GetChainInfoRequestMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type GetChainInfoRequestValidationError

type GetChainInfoRequestValidationError struct {
	// contains filtered or unexported fields
}

GetChainInfoRequestValidationError is the validation error returned by GetChainInfoRequest.Validate if the designated constraints aren't met.

func (GetChainInfoRequestValidationError) Cause

Cause function returns cause value.

func (GetChainInfoRequestValidationError) Error

Error satisfies the builtin error interface

func (GetChainInfoRequestValidationError) ErrorName

ErrorName returns error name.

func (GetChainInfoRequestValidationError) Field

Field function returns field value.

func (GetChainInfoRequestValidationError) Key

Key function returns key value.

func (GetChainInfoRequestValidationError) Reason

Reason function returns reason value.

type GetTransactionByIDRequest

type GetTransactionByIDRequest struct {
	ChannelName string `protobuf:"bytes,1,opt,name=channel_name,json=channelName,proto3" json:"channel_name,omitempty"`
	TxId        string `protobuf:"bytes,2,opt,name=tx_id,json=txId,proto3" json:"tx_id,omitempty"`
	// contains filtered or unexported fields
}

func (*GetTransactionByIDRequest) Descriptor deprecated

func (*GetTransactionByIDRequest) Descriptor() ([]byte, []int)

Deprecated: Use GetTransactionByIDRequest.ProtoReflect.Descriptor instead.

func (*GetTransactionByIDRequest) GetChannelName

func (x *GetTransactionByIDRequest) GetChannelName() string

func (*GetTransactionByIDRequest) GetTxId

func (x *GetTransactionByIDRequest) GetTxId() string

func (*GetTransactionByIDRequest) ProtoMessage

func (*GetTransactionByIDRequest) ProtoMessage()

func (*GetTransactionByIDRequest) ProtoReflect

func (*GetTransactionByIDRequest) Reset

func (x *GetTransactionByIDRequest) Reset()

func (*GetTransactionByIDRequest) String

func (x *GetTransactionByIDRequest) String() string

func (*GetTransactionByIDRequest) Validate

func (m *GetTransactionByIDRequest) Validate() error

Validate checks the field values on GetTransactionByIDRequest 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 (*GetTransactionByIDRequest) ValidateAll

func (m *GetTransactionByIDRequest) ValidateAll() error

ValidateAll checks the field values on GetTransactionByIDRequest 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 GetTransactionByIDRequestMultiError, or nil if none found.

type GetTransactionByIDRequestMultiError

type GetTransactionByIDRequestMultiError []error

GetTransactionByIDRequestMultiError is an error wrapping multiple validation errors returned by GetTransactionByIDRequest.ValidateAll() if the designated constraints aren't met.

func (GetTransactionByIDRequestMultiError) AllErrors

AllErrors returns a list of validation violation errors.

func (GetTransactionByIDRequestMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type GetTransactionByIDRequestValidationError

type GetTransactionByIDRequestValidationError struct {
	// contains filtered or unexported fields
}

GetTransactionByIDRequestValidationError is the validation error returned by GetTransactionByIDRequest.Validate if the designated constraints aren't met.

func (GetTransactionByIDRequestValidationError) Cause

Cause function returns cause value.

func (GetTransactionByIDRequestValidationError) Error

Error satisfies the builtin error interface

func (GetTransactionByIDRequestValidationError) ErrorName

ErrorName returns error name.

func (GetTransactionByIDRequestValidationError) Field

Field function returns field value.

func (GetTransactionByIDRequestValidationError) Key

Key function returns key value.

func (GetTransactionByIDRequestValidationError) Reason

Reason function returns reason value.

type QSCCService

type QSCCService struct {
	UnimplementedQSCCServiceServer
	Querier *tx.ProtoQuerier
}

func NewQSCC

func NewQSCC(querier api.Querier) *QSCCService

func (*QSCCService) GetBlockByHash

func (q *QSCCService) GetBlockByHash(ctx context.Context, request *GetBlockByHashRequest) (*common.Block, error)

func (*QSCCService) GetBlockByNumber

func (q *QSCCService) GetBlockByNumber(ctx context.Context, request *GetBlockByNumberRequest) (*common.Block, error)

func (*QSCCService) GetBlockByTxID

func (q *QSCCService) GetBlockByTxID(ctx context.Context, request *GetBlockByTxIDRequest) (*common.Block, error)

func (*QSCCService) GetChainInfo

func (q *QSCCService) GetChainInfo(ctx context.Context, request *GetChainInfoRequest) (*common.BlockchainInfo, error)

func (*QSCCService) GetTransactionByID

func (q *QSCCService) GetTransactionByID(ctx context.Context, request *GetTransactionByIDRequest) (*peer.ProcessedTransaction, error)

func (*QSCCService) ServiceDef

func (q *QSCCService) ServiceDef() *service.Def

type QSCCServiceClient

type QSCCServiceClient interface {
	// GetChainInfo allows getting common info about channel blockchain
	GetChainInfo(ctx context.Context, in *GetChainInfoRequest, opts ...grpc.CallOption) (*common.BlockchainInfo, error)
	// GetBlockByNumber allows getting block by number
	GetBlockByNumber(ctx context.Context, in *GetBlockByNumberRequest, opts ...grpc.CallOption) (*common.Block, error)
	// GetBlockByHash allows getting block by hash
	GetBlockByHash(ctx context.Context, in *GetBlockByHashRequest, opts ...grpc.CallOption) (*common.Block, error)
	// GetBlockByTxID allows getting block by transaction
	GetBlockByTxID(ctx context.Context, in *GetBlockByTxIDRequest, opts ...grpc.CallOption) (*common.Block, error)
	// GetTransactionByID allows getting transaction by id
	GetTransactionByID(ctx context.Context, in *GetTransactionByIDRequest, opts ...grpc.CallOption) (*peer.ProcessedTransaction, error)
}

QSCCServiceClient is the client API for QSCCService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

type QSCCServiceServer

type QSCCServiceServer interface {
	// GetChainInfo allows getting common info about channel blockchain
	GetChainInfo(context.Context, *GetChainInfoRequest) (*common.BlockchainInfo, error)
	// GetBlockByNumber allows getting block by number
	GetBlockByNumber(context.Context, *GetBlockByNumberRequest) (*common.Block, error)
	// GetBlockByHash allows getting block by hash
	GetBlockByHash(context.Context, *GetBlockByHashRequest) (*common.Block, error)
	// GetBlockByTxID allows getting block by transaction
	GetBlockByTxID(context.Context, *GetBlockByTxIDRequest) (*common.Block, error)
	// GetTransactionByID allows getting transaction by id
	GetTransactionByID(context.Context, *GetTransactionByIDRequest) (*peer.ProcessedTransaction, error)
}

QSCCServiceServer is the server API for QSCCService service.

type UnimplementedQSCCServiceServer

type UnimplementedQSCCServiceServer struct {
}

UnimplementedQSCCServiceServer can be embedded to have forward compatible implementations.

func (*UnimplementedQSCCServiceServer) GetBlockByHash

func (*UnimplementedQSCCServiceServer) GetBlockByNumber

func (*UnimplementedQSCCServiceServer) GetBlockByTxID

func (*UnimplementedQSCCServiceServer) GetChainInfo

func (*UnimplementedQSCCServiceServer) GetTransactionByID

Jump to

Keyboard shortcuts

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