Documentation ¶
Overview ¶
Package ccpackage is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Variables
- func RegisterPackageServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterPackageServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client PackageServiceClient) error
- func RegisterPackageServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterPackageServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server PackageServiceServer) error
- func RegisterPackageServiceServer(s *grpc.Server, srv PackageServiceServer)
- type FabricVersion
- func (FabricVersion) Descriptor() protoreflect.EnumDescriptor
- func (x FabricVersion) Enum() *FabricVersion
- func (FabricVersion) EnumDescriptor() ([]byte, []int)deprecated
- func (x FabricVersion) Number() protoreflect.EnumNumber
- func (x FabricVersion) String() string
- func (FabricVersion) Type() protoreflect.EnumType
- type FileChunk
- func (*FileChunk) Descriptor() ([]byte, []int)deprecated
- func (x *FileChunk) GetData() []byte
- func (*FileChunk) ProtoMessage()
- func (x *FileChunk) ProtoReflect() protoreflect.Message
- func (x *FileChunk) Reset()
- func (x *FileChunk) String() string
- func (m *FileChunk) Validate() error
- func (m *FileChunk) ValidateAll() error
- type FileChunkMultiError
- type FileChunkValidationError
- type Package
- func (*Package) Descriptor() ([]byte, []int)deprecated
- func (x *Package) GetCreatedAt() *timestamppb.Timestamp
- func (x *Package) GetData() []byte
- func (x *Package) GetId() *PackageID
- func (x *Package) GetSize() int64
- func (*Package) ProtoMessage()
- func (x *Package) ProtoReflect() protoreflect.Message
- func (x *Package) Reset()
- func (x *Package) String() string
- func (m *Package) Validate() error
- func (m *Package) ValidateAll() error
- type PackageID
- func (*PackageID) Descriptor() ([]byte, []int)deprecated
- func (x *PackageID) GetFabricVersion() FabricVersion
- func (x *PackageID) GetName() string
- func (x *PackageID) GetVersion() string
- func (*PackageID) ProtoMessage()
- func (x *PackageID) ProtoReflect() protoreflect.Message
- func (x *PackageID) Reset()
- func (x *PackageID) String() string
- func (m *PackageID) Validate() error
- func (m *PackageID) ValidateAll() error
- type PackageIDMultiError
- type PackageIDValidationError
- type PackageInfo
- func (*PackageInfo) Descriptor() ([]byte, []int)deprecated
- func (x *PackageInfo) GetCreatedAt() *timestamppb.Timestamp
- func (x *PackageInfo) GetId() *PackageID
- func (x *PackageInfo) GetSize() int64
- func (*PackageInfo) ProtoMessage()
- func (x *PackageInfo) ProtoReflect() protoreflect.Message
- func (x *PackageInfo) Reset()
- func (x *PackageInfo) String() string
- func (m *PackageInfo) Validate() error
- func (m *PackageInfo) ValidateAll() error
- type PackageInfoList
- func (*PackageInfoList) Descriptor() ([]byte, []int)deprecated
- func (x *PackageInfoList) GetItems() []*PackageInfo
- func (*PackageInfoList) ProtoMessage()
- func (x *PackageInfoList) ProtoReflect() protoreflect.Message
- func (x *PackageInfoList) Reset()
- func (x *PackageInfoList) String() string
- func (m *PackageInfoList) Validate() error
- func (m *PackageInfoList) ValidateAll() error
- type PackageInfoListMultiError
- type PackageInfoListValidationError
- func (e PackageInfoListValidationError) Cause() error
- func (e PackageInfoListValidationError) Error() string
- func (e PackageInfoListValidationError) ErrorName() string
- func (e PackageInfoListValidationError) Field() string
- func (e PackageInfoListValidationError) Key() bool
- func (e PackageInfoListValidationError) Reason() string
- type PackageInfoMultiError
- type PackageInfoValidationError
- func (e PackageInfoValidationError) Cause() error
- func (e PackageInfoValidationError) Error() string
- func (e PackageInfoValidationError) ErrorName() string
- func (e PackageInfoValidationError) Field() string
- func (e PackageInfoValidationError) Key() bool
- func (e PackageInfoValidationError) Reason() string
- type PackageMultiError
- type PackageServiceClient
- type PackageServiceServer
- type PackageService_FetchClient
- type PackageService_FetchServer
- type PackageSpec
- func (*PackageSpec) Descriptor() ([]byte, []int)deprecated
- func (x *PackageSpec) GetBinaryPath() string
- func (x *PackageSpec) GetChaincodePath() string
- func (x *PackageSpec) GetId() *PackageID
- func (x *PackageSpec) GetRepository() string
- func (*PackageSpec) ProtoMessage()
- func (x *PackageSpec) ProtoReflect() protoreflect.Message
- func (x *PackageSpec) Reset()
- func (x *PackageSpec) String() string
- func (m *PackageSpec) Validate() error
- func (m *PackageSpec) ValidateAll() error
- type PackageSpecMultiError
- type PackageSpecValidationError
- func (e PackageSpecValidationError) Cause() error
- func (e PackageSpecValidationError) Error() string
- func (e PackageSpecValidationError) ErrorName() string
- func (e PackageSpecValidationError) Field() string
- func (e PackageSpecValidationError) Key() bool
- func (e PackageSpecValidationError) Reason() string
- type PackageValidationError
- type PutPackageRequest
- func (*PutPackageRequest) Descriptor() ([]byte, []int)deprecated
- func (x *PutPackageRequest) GetData() []byte
- func (x *PutPackageRequest) GetId() *PackageID
- func (*PutPackageRequest) ProtoMessage()
- func (x *PutPackageRequest) ProtoReflect() protoreflect.Message
- func (x *PutPackageRequest) Reset()
- func (x *PutPackageRequest) String() string
- func (m *PutPackageRequest) Validate() error
- func (m *PutPackageRequest) ValidateAll() error
- type PutPackageRequestMultiError
- type PutPackageRequestValidationError
- func (e PutPackageRequestValidationError) Cause() error
- func (e PutPackageRequestValidationError) Error() string
- func (e PutPackageRequestValidationError) ErrorName() string
- func (e PutPackageRequestValidationError) Field() string
- func (e PutPackageRequestValidationError) Key() bool
- func (e PutPackageRequestValidationError) Reason() string
- type UnimplementedPackageServiceServer
- func (*UnimplementedPackageServiceServer) Create(context.Context, *PackageSpec) (*PackageInfo, error)
- func (*UnimplementedPackageServiceServer) Fetch(*PackageID, PackageService_FetchServer) error
- func (*UnimplementedPackageServiceServer) Get(context.Context, *PackageID) (*Package, error)
- func (*UnimplementedPackageServiceServer) GetDeploymentSpec(context.Context, *PackageID) (*peer.ChaincodeDeploymentSpec, error)
- func (*UnimplementedPackageServiceServer) GetInfo(context.Context, *PackageID) (*PackageInfo, error)
- func (*UnimplementedPackageServiceServer) GetOrCreate(context.Context, *PackageSpec) (*PackageInfo, error)
- func (*UnimplementedPackageServiceServer) ListInfo(context.Context, *emptypb.Empty) (*PackageInfoList, error)
Constants ¶
This section is empty.
Variables ¶
var ( FabricVersion_name = map[int32]string{ 0: "FABRIC_VERSION_UNSPECIFIED", 1: "FABRIC_V1", 2: "FABRIC_V2", 3: "FABRIC_V2_LIFECYCLE", } FabricVersion_value = map[string]int32{ "FABRIC_VERSION_UNSPECIFIED": 0, "FABRIC_V1": 1, "FABRIC_V2": 2, "FABRIC_V2_LIFECYCLE": 3, } )
Enum value maps for FabricVersion.
var File_ccpackage_packages_proto protoreflect.FileDescriptor
Functions ¶
func RegisterPackageServiceHandler ¶
func RegisterPackageServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterPackageServiceHandler registers the http handlers for service PackageService to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterPackageServiceHandlerClient ¶
func RegisterPackageServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client PackageServiceClient) error
RegisterPackageServiceHandlerClient registers the http handlers for service PackageService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "PackageServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "PackageServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "PackageServiceClient" to call the correct interceptors.
func RegisterPackageServiceHandlerFromEndpoint ¶
func RegisterPackageServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterPackageServiceHandlerFromEndpoint is same as RegisterPackageServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterPackageServiceHandlerServer ¶
func RegisterPackageServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server PackageServiceServer) error
RegisterPackageServiceHandlerServer registers the http handlers for service PackageService to "mux". UnaryRPC :call PackageServiceServer 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 RegisterPackageServiceHandlerFromEndpoint instead.
func RegisterPackageServiceServer ¶
func RegisterPackageServiceServer(s *grpc.Server, srv PackageServiceServer)
Types ¶
type FabricVersion ¶
type FabricVersion int32
const ( // Fabric v1.4 tools FabricVersion_FABRIC_VERSION_UNSPECIFIED FabricVersion = 0 // Fabric v1.4 tools FabricVersion_FABRIC_V1 FabricVersion = 1 // Fabric v2.3 tools FabricVersion_FABRIC_V2 FabricVersion = 2 // Fabric v2.3 tools with lifecycle FabricVersion_FABRIC_V2_LIFECYCLE FabricVersion = 3 )
func (FabricVersion) Descriptor ¶
func (FabricVersion) Descriptor() protoreflect.EnumDescriptor
func (FabricVersion) Enum ¶
func (x FabricVersion) Enum() *FabricVersion
func (FabricVersion) EnumDescriptor
deprecated
func (FabricVersion) EnumDescriptor() ([]byte, []int)
Deprecated: Use FabricVersion.Descriptor instead.
func (FabricVersion) Number ¶
func (x FabricVersion) Number() protoreflect.EnumNumber
func (FabricVersion) String ¶
func (x FabricVersion) String() string
func (FabricVersion) Type ¶
func (FabricVersion) Type() protoreflect.EnumType
type FileChunk ¶
type FileChunk struct { Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` // contains filtered or unexported fields }
func (*FileChunk) Descriptor
deprecated
func (*FileChunk) ProtoMessage ¶
func (*FileChunk) ProtoMessage()
func (*FileChunk) ProtoReflect ¶
func (x *FileChunk) ProtoReflect() protoreflect.Message
func (*FileChunk) Validate ¶
Validate checks the field values on FileChunk 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 (*FileChunk) ValidateAll ¶
ValidateAll checks the field values on FileChunk 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 FileChunkMultiError, or nil if none found.
type FileChunkMultiError ¶
type FileChunkMultiError []error
FileChunkMultiError is an error wrapping multiple validation errors returned by FileChunk.ValidateAll() if the designated constraints aren't met.
func (FileChunkMultiError) AllErrors ¶
func (m FileChunkMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (FileChunkMultiError) Error ¶
func (m FileChunkMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type FileChunkValidationError ¶
type FileChunkValidationError struct {
// contains filtered or unexported fields
}
FileChunkValidationError is the validation error returned by FileChunk.Validate if the designated constraints aren't met.
func (FileChunkValidationError) Cause ¶
func (e FileChunkValidationError) Cause() error
Cause function returns cause value.
func (FileChunkValidationError) Error ¶
func (e FileChunkValidationError) Error() string
Error satisfies the builtin error interface
func (FileChunkValidationError) ErrorName ¶
func (e FileChunkValidationError) ErrorName() string
ErrorName returns error name.
func (FileChunkValidationError) Field ¶
func (e FileChunkValidationError) Field() string
Field function returns field value.
func (FileChunkValidationError) Key ¶
func (e FileChunkValidationError) Key() bool
Key function returns key value.
func (FileChunkValidationError) Reason ¶
func (e FileChunkValidationError) Reason() string
Reason function returns reason value.
type Package ¶
type Package struct { Id *PackageID `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Size int64 `protobuf:"varint,2,opt,name=size,proto3" json:"size,omitempty"` CreatedAt *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` Data []byte `protobuf:"bytes,4,opt,name=data,proto3" json:"data,omitempty"` // contains filtered or unexported fields }
func (*Package) Descriptor
deprecated
func (*Package) GetCreatedAt ¶
func (x *Package) GetCreatedAt() *timestamppb.Timestamp
func (*Package) ProtoMessage ¶
func (*Package) ProtoMessage()
func (*Package) ProtoReflect ¶
func (x *Package) ProtoReflect() protoreflect.Message
func (*Package) Validate ¶
Validate checks the field values on Package 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 (*Package) ValidateAll ¶
ValidateAll checks the field values on Package 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 PackageMultiError, or nil if none found.
type PackageID ¶
type PackageID struct { // Name is a chaincode name, ex: payment Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // Version is a chaincode version to use, ex: 2800dea5e957b3b65f48340337fdbbedc7caf396 Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"` // Fabric version to use to build chaincode. FabricVersion FabricVersion `` /* 147-byte string literal not displayed */ // contains filtered or unexported fields }
func (*PackageID) Descriptor
deprecated
func (*PackageID) GetFabricVersion ¶
func (x *PackageID) GetFabricVersion() FabricVersion
func (*PackageID) GetVersion ¶
func (*PackageID) ProtoMessage ¶
func (*PackageID) ProtoMessage()
func (*PackageID) ProtoReflect ¶
func (x *PackageID) ProtoReflect() protoreflect.Message
func (*PackageID) Validate ¶
Validate checks the field values on PackageID 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 (*PackageID) ValidateAll ¶
ValidateAll checks the field values on PackageID 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 PackageIDMultiError, or nil if none found.
type PackageIDMultiError ¶
type PackageIDMultiError []error
PackageIDMultiError is an error wrapping multiple validation errors returned by PackageID.ValidateAll() if the designated constraints aren't met.
func (PackageIDMultiError) AllErrors ¶
func (m PackageIDMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (PackageIDMultiError) Error ¶
func (m PackageIDMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type PackageIDValidationError ¶
type PackageIDValidationError struct {
// contains filtered or unexported fields
}
PackageIDValidationError is the validation error returned by PackageID.Validate if the designated constraints aren't met.
func (PackageIDValidationError) Cause ¶
func (e PackageIDValidationError) Cause() error
Cause function returns cause value.
func (PackageIDValidationError) Error ¶
func (e PackageIDValidationError) Error() string
Error satisfies the builtin error interface
func (PackageIDValidationError) ErrorName ¶
func (e PackageIDValidationError) ErrorName() string
ErrorName returns error name.
func (PackageIDValidationError) Field ¶
func (e PackageIDValidationError) Field() string
Field function returns field value.
func (PackageIDValidationError) Key ¶
func (e PackageIDValidationError) Key() bool
Key function returns key value.
func (PackageIDValidationError) Reason ¶
func (e PackageIDValidationError) Reason() string
Reason function returns reason value.
type PackageInfo ¶
type PackageInfo struct { Id *PackageID `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Size int64 `protobuf:"varint,4,opt,name=size,proto3" json:"size,omitempty"` CreatedAt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` // contains filtered or unexported fields }
func (*PackageInfo) Descriptor
deprecated
func (*PackageInfo) Descriptor() ([]byte, []int)
Deprecated: Use PackageInfo.ProtoReflect.Descriptor instead.
func (*PackageInfo) GetCreatedAt ¶
func (x *PackageInfo) GetCreatedAt() *timestamppb.Timestamp
func (*PackageInfo) GetId ¶
func (x *PackageInfo) GetId() *PackageID
func (*PackageInfo) GetSize ¶
func (x *PackageInfo) GetSize() int64
func (*PackageInfo) ProtoMessage ¶
func (*PackageInfo) ProtoMessage()
func (*PackageInfo) ProtoReflect ¶
func (x *PackageInfo) ProtoReflect() protoreflect.Message
func (*PackageInfo) Reset ¶
func (x *PackageInfo) Reset()
func (*PackageInfo) String ¶
func (x *PackageInfo) String() string
func (*PackageInfo) Validate ¶
func (m *PackageInfo) Validate() error
Validate checks the field values on PackageInfo 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 (*PackageInfo) ValidateAll ¶
func (m *PackageInfo) ValidateAll() error
ValidateAll checks the field values on PackageInfo 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 PackageInfoMultiError, or nil if none found.
type PackageInfoList ¶
type PackageInfoList struct { Items []*PackageInfo `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"` // contains filtered or unexported fields }
func (*PackageInfoList) Descriptor
deprecated
func (*PackageInfoList) Descriptor() ([]byte, []int)
Deprecated: Use PackageInfoList.ProtoReflect.Descriptor instead.
func (*PackageInfoList) GetItems ¶
func (x *PackageInfoList) GetItems() []*PackageInfo
func (*PackageInfoList) ProtoMessage ¶
func (*PackageInfoList) ProtoMessage()
func (*PackageInfoList) ProtoReflect ¶
func (x *PackageInfoList) ProtoReflect() protoreflect.Message
func (*PackageInfoList) Reset ¶
func (x *PackageInfoList) Reset()
func (*PackageInfoList) String ¶
func (x *PackageInfoList) String() string
func (*PackageInfoList) Validate ¶
func (m *PackageInfoList) Validate() error
Validate checks the field values on PackageInfoList 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 (*PackageInfoList) ValidateAll ¶
func (m *PackageInfoList) ValidateAll() error
ValidateAll checks the field values on PackageInfoList 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 PackageInfoListMultiError, or nil if none found.
type PackageInfoListMultiError ¶
type PackageInfoListMultiError []error
PackageInfoListMultiError is an error wrapping multiple validation errors returned by PackageInfoList.ValidateAll() if the designated constraints aren't met.
func (PackageInfoListMultiError) AllErrors ¶
func (m PackageInfoListMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (PackageInfoListMultiError) Error ¶
func (m PackageInfoListMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type PackageInfoListValidationError ¶
type PackageInfoListValidationError struct {
// contains filtered or unexported fields
}
PackageInfoListValidationError is the validation error returned by PackageInfoList.Validate if the designated constraints aren't met.
func (PackageInfoListValidationError) Cause ¶
func (e PackageInfoListValidationError) Cause() error
Cause function returns cause value.
func (PackageInfoListValidationError) Error ¶
func (e PackageInfoListValidationError) Error() string
Error satisfies the builtin error interface
func (PackageInfoListValidationError) ErrorName ¶
func (e PackageInfoListValidationError) ErrorName() string
ErrorName returns error name.
func (PackageInfoListValidationError) Field ¶
func (e PackageInfoListValidationError) Field() string
Field function returns field value.
func (PackageInfoListValidationError) Key ¶
func (e PackageInfoListValidationError) Key() bool
Key function returns key value.
func (PackageInfoListValidationError) Reason ¶
func (e PackageInfoListValidationError) Reason() string
Reason function returns reason value.
type PackageInfoMultiError ¶
type PackageInfoMultiError []error
PackageInfoMultiError is an error wrapping multiple validation errors returned by PackageInfo.ValidateAll() if the designated constraints aren't met.
func (PackageInfoMultiError) AllErrors ¶
func (m PackageInfoMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (PackageInfoMultiError) Error ¶
func (m PackageInfoMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type PackageInfoValidationError ¶
type PackageInfoValidationError struct {
// contains filtered or unexported fields
}
PackageInfoValidationError is the validation error returned by PackageInfo.Validate if the designated constraints aren't met.
func (PackageInfoValidationError) Cause ¶
func (e PackageInfoValidationError) Cause() error
Cause function returns cause value.
func (PackageInfoValidationError) Error ¶
func (e PackageInfoValidationError) Error() string
Error satisfies the builtin error interface
func (PackageInfoValidationError) ErrorName ¶
func (e PackageInfoValidationError) ErrorName() string
ErrorName returns error name.
func (PackageInfoValidationError) Field ¶
func (e PackageInfoValidationError) Field() string
Field function returns field value.
func (PackageInfoValidationError) Key ¶
func (e PackageInfoValidationError) Key() bool
Key function returns key value.
func (PackageInfoValidationError) Reason ¶
func (e PackageInfoValidationError) Reason() string
Reason function returns reason value.
type PackageMultiError ¶
type PackageMultiError []error
PackageMultiError is an error wrapping multiple validation errors returned by Package.ValidateAll() if the designated constraints aren't met.
func (PackageMultiError) AllErrors ¶
func (m PackageMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (PackageMultiError) Error ¶
func (m PackageMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type PackageServiceClient ¶
type PackageServiceClient interface { Create(ctx context.Context, in *PackageSpec, opts ...grpc.CallOption) (*PackageInfo, error) GetInfo(ctx context.Context, in *PackageID, opts ...grpc.CallOption) (*PackageInfo, error) GetOrCreate(ctx context.Context, in *PackageSpec, opts ...grpc.CallOption) (*PackageInfo, error) ListInfo(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*PackageInfoList, error) GetDeploymentSpec(ctx context.Context, in *PackageID, opts ...grpc.CallOption) (*peer.ChaincodeDeploymentSpec, error) Get(ctx context.Context, in *PackageID, opts ...grpc.CallOption) (*Package, error) Fetch(ctx context.Context, in *PackageID, opts ...grpc.CallOption) (PackageService_FetchClient, error) }
PackageServiceClient is the client API for PackageService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewPackageServiceClient ¶
func NewPackageServiceClient(cc grpc.ClientConnInterface) PackageServiceClient
type PackageServiceServer ¶
type PackageServiceServer interface { Create(context.Context, *PackageSpec) (*PackageInfo, error) GetInfo(context.Context, *PackageID) (*PackageInfo, error) GetOrCreate(context.Context, *PackageSpec) (*PackageInfo, error) ListInfo(context.Context, *emptypb.Empty) (*PackageInfoList, error) GetDeploymentSpec(context.Context, *PackageID) (*peer.ChaincodeDeploymentSpec, error) Get(context.Context, *PackageID) (*Package, error) Fetch(*PackageID, PackageService_FetchServer) error }
PackageServiceServer is the server API for PackageService service.
type PackageService_FetchClient ¶
type PackageService_FetchClient interface { Recv() (*FileChunk, error) grpc.ClientStream }
type PackageService_FetchServer ¶
type PackageService_FetchServer interface { Send(*FileChunk) error grpc.ServerStream }
type PackageSpec ¶
type PackageSpec struct { // Package ID is package identification data Id *PackageID `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // Repository is url to git sources, ex: http://:token@{repo url} // or http://login:password@github.com/hyperledger-labs/cckit/examples/cars // or path to local directory file:///path/to/sources/hyperledger-labs/cckit Repository string `protobuf:"bytes,2,opt,name=repository,proto3" json:"repository,omitempty"` // Chaincode path is path to chaincode, ex: github.com/hyperledger-labs/cckit ChaincodePath string `protobuf:"bytes,3,opt,name=chaincode_path,json=chaincodePath,proto3" json:"chaincode_path,omitempty"` // BinaryPath is path to chaincode binary in given repository, // ex: `examples/cars`. BinaryPath string `protobuf:"bytes,4,opt,name=binary_path,json=binaryPath,proto3" json:"binary_path,omitempty"` // contains filtered or unexported fields }
func (*PackageSpec) Descriptor
deprecated
func (*PackageSpec) Descriptor() ([]byte, []int)
Deprecated: Use PackageSpec.ProtoReflect.Descriptor instead.
func (*PackageSpec) GetBinaryPath ¶
func (x *PackageSpec) GetBinaryPath() string
func (*PackageSpec) GetChaincodePath ¶
func (x *PackageSpec) GetChaincodePath() string
func (*PackageSpec) GetId ¶
func (x *PackageSpec) GetId() *PackageID
func (*PackageSpec) GetRepository ¶
func (x *PackageSpec) GetRepository() string
func (*PackageSpec) ProtoMessage ¶
func (*PackageSpec) ProtoMessage()
func (*PackageSpec) ProtoReflect ¶
func (x *PackageSpec) ProtoReflect() protoreflect.Message
func (*PackageSpec) Reset ¶
func (x *PackageSpec) Reset()
func (*PackageSpec) String ¶
func (x *PackageSpec) String() string
func (*PackageSpec) Validate ¶
func (m *PackageSpec) Validate() error
Validate checks the field values on PackageSpec 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 (*PackageSpec) ValidateAll ¶
func (m *PackageSpec) ValidateAll() error
ValidateAll checks the field values on PackageSpec 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 PackageSpecMultiError, or nil if none found.
type PackageSpecMultiError ¶
type PackageSpecMultiError []error
PackageSpecMultiError is an error wrapping multiple validation errors returned by PackageSpec.ValidateAll() if the designated constraints aren't met.
func (PackageSpecMultiError) AllErrors ¶
func (m PackageSpecMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (PackageSpecMultiError) Error ¶
func (m PackageSpecMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type PackageSpecValidationError ¶
type PackageSpecValidationError struct {
// contains filtered or unexported fields
}
PackageSpecValidationError is the validation error returned by PackageSpec.Validate if the designated constraints aren't met.
func (PackageSpecValidationError) Cause ¶
func (e PackageSpecValidationError) Cause() error
Cause function returns cause value.
func (PackageSpecValidationError) Error ¶
func (e PackageSpecValidationError) Error() string
Error satisfies the builtin error interface
func (PackageSpecValidationError) ErrorName ¶
func (e PackageSpecValidationError) ErrorName() string
ErrorName returns error name.
func (PackageSpecValidationError) Field ¶
func (e PackageSpecValidationError) Field() string
Field function returns field value.
func (PackageSpecValidationError) Key ¶
func (e PackageSpecValidationError) Key() bool
Key function returns key value.
func (PackageSpecValidationError) Reason ¶
func (e PackageSpecValidationError) Reason() string
Reason function returns reason value.
type PackageValidationError ¶
type PackageValidationError struct {
// contains filtered or unexported fields
}
PackageValidationError is the validation error returned by Package.Validate if the designated constraints aren't met.
func (PackageValidationError) Cause ¶
func (e PackageValidationError) Cause() error
Cause function returns cause value.
func (PackageValidationError) Error ¶
func (e PackageValidationError) Error() string
Error satisfies the builtin error interface
func (PackageValidationError) ErrorName ¶
func (e PackageValidationError) ErrorName() string
ErrorName returns error name.
func (PackageValidationError) Field ¶
func (e PackageValidationError) Field() string
Field function returns field value.
func (PackageValidationError) Key ¶
func (e PackageValidationError) Key() bool
Key function returns key value.
func (PackageValidationError) Reason ¶
func (e PackageValidationError) Reason() string
Reason function returns reason value.
type PutPackageRequest ¶
type PutPackageRequest struct { Id *PackageID `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Data []byte `protobuf:"bytes,4,opt,name=data,proto3" json:"data,omitempty"` // contains filtered or unexported fields }
func (*PutPackageRequest) Descriptor
deprecated
func (*PutPackageRequest) Descriptor() ([]byte, []int)
Deprecated: Use PutPackageRequest.ProtoReflect.Descriptor instead.
func (*PutPackageRequest) GetData ¶
func (x *PutPackageRequest) GetData() []byte
func (*PutPackageRequest) GetId ¶
func (x *PutPackageRequest) GetId() *PackageID
func (*PutPackageRequest) ProtoMessage ¶
func (*PutPackageRequest) ProtoMessage()
func (*PutPackageRequest) ProtoReflect ¶
func (x *PutPackageRequest) ProtoReflect() protoreflect.Message
func (*PutPackageRequest) Reset ¶
func (x *PutPackageRequest) Reset()
func (*PutPackageRequest) String ¶
func (x *PutPackageRequest) String() string
func (*PutPackageRequest) Validate ¶
func (m *PutPackageRequest) Validate() error
Validate checks the field values on PutPackageRequest 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 (*PutPackageRequest) ValidateAll ¶
func (m *PutPackageRequest) ValidateAll() error
ValidateAll checks the field values on PutPackageRequest 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 PutPackageRequestMultiError, or nil if none found.
type PutPackageRequestMultiError ¶
type PutPackageRequestMultiError []error
PutPackageRequestMultiError is an error wrapping multiple validation errors returned by PutPackageRequest.ValidateAll() if the designated constraints aren't met.
func (PutPackageRequestMultiError) AllErrors ¶
func (m PutPackageRequestMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (PutPackageRequestMultiError) Error ¶
func (m PutPackageRequestMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type PutPackageRequestValidationError ¶
type PutPackageRequestValidationError struct {
// contains filtered or unexported fields
}
PutPackageRequestValidationError is the validation error returned by PutPackageRequest.Validate if the designated constraints aren't met.
func (PutPackageRequestValidationError) Cause ¶
func (e PutPackageRequestValidationError) Cause() error
Cause function returns cause value.
func (PutPackageRequestValidationError) Error ¶
func (e PutPackageRequestValidationError) Error() string
Error satisfies the builtin error interface
func (PutPackageRequestValidationError) ErrorName ¶
func (e PutPackageRequestValidationError) ErrorName() string
ErrorName returns error name.
func (PutPackageRequestValidationError) Field ¶
func (e PutPackageRequestValidationError) Field() string
Field function returns field value.
func (PutPackageRequestValidationError) Key ¶
func (e PutPackageRequestValidationError) Key() bool
Key function returns key value.
func (PutPackageRequestValidationError) Reason ¶
func (e PutPackageRequestValidationError) Reason() string
Reason function returns reason value.
type UnimplementedPackageServiceServer ¶
type UnimplementedPackageServiceServer struct { }
UnimplementedPackageServiceServer can be embedded to have forward compatible implementations.
func (*UnimplementedPackageServiceServer) Create ¶
func (*UnimplementedPackageServiceServer) Create(context.Context, *PackageSpec) (*PackageInfo, error)
func (*UnimplementedPackageServiceServer) Fetch ¶
func (*UnimplementedPackageServiceServer) Fetch(*PackageID, PackageService_FetchServer) error
func (*UnimplementedPackageServiceServer) GetDeploymentSpec ¶
func (*UnimplementedPackageServiceServer) GetDeploymentSpec(context.Context, *PackageID) (*peer.ChaincodeDeploymentSpec, error)
func (*UnimplementedPackageServiceServer) GetInfo ¶
func (*UnimplementedPackageServiceServer) GetInfo(context.Context, *PackageID) (*PackageInfo, error)
func (*UnimplementedPackageServiceServer) GetOrCreate ¶
func (*UnimplementedPackageServiceServer) GetOrCreate(context.Context, *PackageSpec) (*PackageInfo, error)
func (*UnimplementedPackageServiceServer) ListInfo ¶
func (*UnimplementedPackageServiceServer) ListInfo(context.Context, *emptypb.Empty) (*PackageInfoList, error)