Documentation ¶
Overview ¶
Package wallet is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Variables
- func RegisterWalletServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterWalletServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client WalletServiceClient) error
- func RegisterWalletServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterWalletServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server WalletServiceServer) error
- func RegisterWalletServiceServer(s *grpc.Server, srv WalletServiceServer)
- func ValidateLabel(label string) error
- type Identity
- func (*Identity) Descriptor() ([]byte, []int)deprecated
- func (x *Identity) GetCert() []byte
- func (x *Identity) GetKey() []byte
- func (x *Identity) GetLabel() string
- func (x *Identity) GetMspId() string
- func (x *Identity) GetRole() string
- func (*Identity) ProtoMessage()
- func (x *Identity) ProtoReflect() protoreflect.Message
- func (x *Identity) Reset()
- func (x *Identity) String() string
- func (m *Identity) Validate() error
- func (m *Identity) ValidateAll() error
- type IdentityInWallet
- func (*IdentityInWallet) Descriptor() ([]byte, []int)deprecated
- func (x *IdentityInWallet) GetCert() []byte
- func (x *IdentityInWallet) GetKey() []byte
- func (x *IdentityInWallet) GetLabel() string
- func (x *IdentityInWallet) GetMspId() string
- func (x *IdentityInWallet) GetRole() string
- func (x *IdentityInWallet) GetWithPassword() bool
- func (*IdentityInWallet) ProtoMessage()
- func (x *IdentityInWallet) ProtoReflect() protoreflect.Message
- func (x *IdentityInWallet) Reset()
- func (x *IdentityInWallet) String() string
- func (m *IdentityInWallet) Validate() error
- func (m *IdentityInWallet) ValidateAll() error
- type IdentityInWalletMultiError
- type IdentityInWalletText
- func (*IdentityInWalletText) Descriptor() ([]byte, []int)deprecated
- func (x *IdentityInWalletText) GetCert() string
- func (x *IdentityInWalletText) GetCertContent() string
- func (x *IdentityInWalletText) GetKey() string
- func (x *IdentityInWalletText) GetLabel() string
- func (x *IdentityInWalletText) GetMspId() string
- func (x *IdentityInWalletText) GetRole() string
- func (x *IdentityInWalletText) GetWithPassword() bool
- func (*IdentityInWalletText) ProtoMessage()
- func (x *IdentityInWalletText) ProtoReflect() protoreflect.Message
- func (x *IdentityInWalletText) Reset()
- func (x *IdentityInWalletText) String() string
- func (m *IdentityInWalletText) Validate() error
- func (m *IdentityInWalletText) ValidateAll() error
- type IdentityInWalletTextMultiError
- type IdentityInWalletTextValidationError
- func (e IdentityInWalletTextValidationError) Cause() error
- func (e IdentityInWalletTextValidationError) Error() string
- func (e IdentityInWalletTextValidationError) ErrorName() string
- func (e IdentityInWalletTextValidationError) Field() string
- func (e IdentityInWalletTextValidationError) Key() bool
- func (e IdentityInWalletTextValidationError) Reason() string
- type IdentityInWalletValidationError
- func (e IdentityInWalletValidationError) Cause() error
- func (e IdentityInWalletValidationError) Error() string
- func (e IdentityInWalletValidationError) ErrorName() string
- func (e IdentityInWalletValidationError) Field() string
- func (e IdentityInWalletValidationError) Key() bool
- func (e IdentityInWalletValidationError) Reason() string
- type IdentityLabel
- func (*IdentityLabel) Descriptor() ([]byte, []int)deprecated
- func (x *IdentityLabel) GetLabel() string
- func (*IdentityLabel) ProtoMessage()
- func (x *IdentityLabel) ProtoReflect() protoreflect.Message
- func (x *IdentityLabel) Reset()
- func (x *IdentityLabel) String() string
- func (m *IdentityLabel) Validate() error
- func (m *IdentityLabel) ValidateAll() error
- type IdentityLabelMultiError
- type IdentityLabelValidationError
- func (e IdentityLabelValidationError) Cause() error
- func (e IdentityLabelValidationError) Error() string
- func (e IdentityLabelValidationError) ErrorName() string
- func (e IdentityLabelValidationError) Field() string
- func (e IdentityLabelValidationError) Key() bool
- func (e IdentityLabelValidationError) Reason() string
- type IdentityLabels
- func (*IdentityLabels) Descriptor() ([]byte, []int)deprecated
- func (x *IdentityLabels) GetLabels() []string
- func (*IdentityLabels) ProtoMessage()
- func (x *IdentityLabels) ProtoReflect() protoreflect.Message
- func (x *IdentityLabels) Reset()
- func (x *IdentityLabels) String() string
- func (m *IdentityLabels) Validate() error
- func (m *IdentityLabels) ValidateAll() error
- type IdentityLabelsMultiError
- type IdentityLabelsValidationError
- func (e IdentityLabelsValidationError) Cause() error
- func (e IdentityLabelsValidationError) Error() string
- func (e IdentityLabelsValidationError) ErrorName() string
- func (e IdentityLabelsValidationError) Field() string
- func (e IdentityLabelsValidationError) Key() bool
- func (e IdentityLabelsValidationError) Reason() string
- type IdentityMultiError
- type IdentityPassword
- func (*IdentityPassword) Descriptor() ([]byte, []int)deprecated
- func (x *IdentityPassword) GetLabel() string
- func (x *IdentityPassword) GetPassword() string
- func (*IdentityPassword) ProtoMessage()
- func (x *IdentityPassword) ProtoReflect() protoreflect.Message
- func (x *IdentityPassword) Reset()
- func (x *IdentityPassword) String() string
- func (m *IdentityPassword) Validate() error
- func (m *IdentityPassword) ValidateAll() error
- type IdentityPasswordMultiError
- type IdentityPasswordValidationError
- func (e IdentityPasswordValidationError) Cause() error
- func (e IdentityPasswordValidationError) Error() string
- func (e IdentityPasswordValidationError) ErrorName() string
- func (e IdentityPasswordValidationError) Field() string
- func (e IdentityPasswordValidationError) Key() bool
- func (e IdentityPasswordValidationError) Reason() string
- type IdentityValidationError
- type IdentityWithPassword
- func (*IdentityWithPassword) Descriptor() ([]byte, []int)deprecated
- func (x *IdentityWithPassword) GetCert() []byte
- func (x *IdentityWithPassword) GetKey() []byte
- func (x *IdentityWithPassword) GetLabel() string
- func (x *IdentityWithPassword) GetMspId() string
- func (x *IdentityWithPassword) GetPassword() string
- func (x *IdentityWithPassword) GetRole() string
- func (*IdentityWithPassword) ProtoMessage()
- func (x *IdentityWithPassword) ProtoReflect() protoreflect.Message
- func (x *IdentityWithPassword) Reset()
- func (x *IdentityWithPassword) String() string
- func (m *IdentityWithPassword) Validate() error
- func (m *IdentityWithPassword) ValidateAll() error
- type IdentityWithPasswordMultiError
- type IdentityWithPasswordValidationError
- func (e IdentityWithPasswordValidationError) Cause() error
- func (e IdentityWithPasswordValidationError) Error() string
- func (e IdentityWithPasswordValidationError) ErrorName() string
- func (e IdentityWithPasswordValidationError) Field() string
- func (e IdentityWithPasswordValidationError) Key() bool
- func (e IdentityWithPasswordValidationError) Reason() string
- type Store
- type UnimplementedWalletServiceServer
- func (*UnimplementedWalletServiceServer) IdentityDelete(context.Context, *IdentityLabel) (*IdentityInWallet, error)
- func (*UnimplementedWalletServiceServer) IdentityGet(context.Context, *IdentityLabel) (*IdentityInWallet, error)
- func (*UnimplementedWalletServiceServer) IdentityGetText(context.Context, *IdentityLabel) (*IdentityInWalletText, error)
- func (*UnimplementedWalletServiceServer) IdentityGetWithPassword(context.Context, *IdentityPassword) (*IdentityInWallet, error)
- func (*UnimplementedWalletServiceServer) IdentityList(context.Context, *emptypb.Empty) (*IdentityLabels, error)
- func (*UnimplementedWalletServiceServer) IdentitySet(context.Context, *Identity) (*IdentityInWallet, error)
- func (*UnimplementedWalletServiceServer) IdentitySetWithPassword(context.Context, *IdentityWithPassword) (*IdentityInWallet, error)
- type Wallet
- func (w *Wallet) IdentityDelete(ctx context.Context, label *IdentityLabel) (*IdentityInWallet, error)
- func (w *Wallet) IdentityGet(_ context.Context, lbl *IdentityLabel) (*IdentityInWallet, error)
- func (w *Wallet) IdentityGetText(ctx context.Context, lbl *IdentityLabel) (*IdentityInWalletText, error)
- func (w *Wallet) IdentityGetWithPassword(_ context.Context, identity *IdentityPassword) (*IdentityInWallet, error)
- func (w *Wallet) IdentityList(context.Context, *empty.Empty) (*IdentityLabels, error)
- func (w *Wallet) IdentitySet(ctx context.Context, identity *Identity) (*IdentityInWallet, error)
- func (w *Wallet) IdentitySetWithPassword(_ context.Context, identity *IdentityWithPassword) (*IdentityInWallet, error)
- func (w *Wallet) ServiceDef() *service.Def
- type WalletServiceClient
- type WalletServiceServer
Constants ¶
This section is empty.
Variables ¶
var ( ErrEmptyLabel = errors.New(`empty label`) ErrInvalidCharInLabel = errors.New(`invalid char in label`) ErrIdentityNotFound = errors.New(`identity not found`) DisallowedCharsInLabel, _ = regexp.Compile("[^A-Za-z0-9_-]+") )
var File_wallet_wallet_proto protoreflect.FileDescriptor
var ( //go:embed wallet.swagger.json Swagger []byte )
Functions ¶
func RegisterWalletServiceHandler ¶
func RegisterWalletServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterWalletServiceHandler registers the http handlers for service WalletService to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterWalletServiceHandlerClient ¶
func RegisterWalletServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client WalletServiceClient) error
RegisterWalletServiceHandlerClient registers the http handlers for service WalletService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "WalletServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "WalletServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "WalletServiceClient" to call the correct interceptors.
func RegisterWalletServiceHandlerFromEndpoint ¶
func RegisterWalletServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterWalletServiceHandlerFromEndpoint is same as RegisterWalletServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterWalletServiceHandlerServer ¶
func RegisterWalletServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server WalletServiceServer) error
RegisterWalletServiceHandlerServer registers the http handlers for service WalletService to "mux". UnaryRPC :call WalletServiceServer 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 RegisterWalletServiceHandlerFromEndpoint instead.
func RegisterWalletServiceServer ¶
func RegisterWalletServiceServer(s *grpc.Server, srv WalletServiceServer)
func ValidateLabel ¶
Types ¶
type Identity ¶
type Identity struct { Label string `protobuf:"bytes,1,opt,name=label,proto3" json:"label,omitempty"` MspId string `protobuf:"bytes,2,opt,name=msp_id,json=mspId,proto3" json:"msp_id,omitempty"` Role string `protobuf:"bytes,5,opt,name=role,proto3" json:"role,omitempty"` Cert []byte `protobuf:"bytes,3,opt,name=cert,proto3" json:"cert,omitempty"` Key []byte `protobuf:"bytes,4,opt,name=key,proto3" json:"key,omitempty"` // contains filtered or unexported fields }
func (*Identity) Descriptor
deprecated
func (*Identity) ProtoMessage ¶
func (*Identity) ProtoMessage()
func (*Identity) ProtoReflect ¶
func (x *Identity) ProtoReflect() protoreflect.Message
func (*Identity) Validate ¶
Validate checks the field values on Identity 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 (*Identity) ValidateAll ¶
ValidateAll checks the field values on Identity 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 IdentityMultiError, or nil if none found.
type IdentityInWallet ¶
type IdentityInWallet struct { Label string `protobuf:"bytes,1,opt,name=label,proto3" json:"label,omitempty"` MspId string `protobuf:"bytes,2,opt,name=msp_id,json=mspId,proto3" json:"msp_id,omitempty"` Role string `protobuf:"bytes,6,opt,name=role,proto3" json:"role,omitempty"` Cert []byte `protobuf:"bytes,3,opt,name=cert,proto3" json:"cert,omitempty"` Key []byte `protobuf:"bytes,4,opt,name=key,proto3" json:"key,omitempty"` WithPassword bool `protobuf:"varint,5,opt,name=with_password,json=withPassword,proto3" json:"with_password,omitempty"` // contains filtered or unexported fields }
func (*IdentityInWallet) Descriptor
deprecated
func (*IdentityInWallet) Descriptor() ([]byte, []int)
Deprecated: Use IdentityInWallet.ProtoReflect.Descriptor instead.
func (*IdentityInWallet) GetCert ¶
func (x *IdentityInWallet) GetCert() []byte
func (*IdentityInWallet) GetKey ¶
func (x *IdentityInWallet) GetKey() []byte
func (*IdentityInWallet) GetLabel ¶
func (x *IdentityInWallet) GetLabel() string
func (*IdentityInWallet) GetMspId ¶
func (x *IdentityInWallet) GetMspId() string
func (*IdentityInWallet) GetRole ¶
func (x *IdentityInWallet) GetRole() string
func (*IdentityInWallet) GetWithPassword ¶
func (x *IdentityInWallet) GetWithPassword() bool
func (*IdentityInWallet) ProtoMessage ¶
func (*IdentityInWallet) ProtoMessage()
func (*IdentityInWallet) ProtoReflect ¶
func (x *IdentityInWallet) ProtoReflect() protoreflect.Message
func (*IdentityInWallet) Reset ¶
func (x *IdentityInWallet) Reset()
func (*IdentityInWallet) String ¶
func (x *IdentityInWallet) String() string
func (*IdentityInWallet) Validate ¶
func (m *IdentityInWallet) Validate() error
Validate checks the field values on IdentityInWallet 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 (*IdentityInWallet) ValidateAll ¶
func (m *IdentityInWallet) ValidateAll() error
ValidateAll checks the field values on IdentityInWallet 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 IdentityInWalletMultiError, or nil if none found.
type IdentityInWalletMultiError ¶
type IdentityInWalletMultiError []error
IdentityInWalletMultiError is an error wrapping multiple validation errors returned by IdentityInWallet.ValidateAll() if the designated constraints aren't met.
func (IdentityInWalletMultiError) AllErrors ¶
func (m IdentityInWalletMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (IdentityInWalletMultiError) Error ¶
func (m IdentityInWalletMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type IdentityInWalletText ¶
type IdentityInWalletText struct { Label string `protobuf:"bytes,1,opt,name=label,proto3" json:"label,omitempty"` MspId string `protobuf:"bytes,2,opt,name=msp_id,json=mspId,proto3" json:"msp_id,omitempty"` Role string `protobuf:"bytes,7,opt,name=role,proto3" json:"role,omitempty"` Cert string `protobuf:"bytes,3,opt,name=cert,proto3" json:"cert,omitempty"` CertContent string `protobuf:"bytes,4,opt,name=cert_content,json=certContent,proto3" json:"cert_content,omitempty"` Key string `protobuf:"bytes,5,opt,name=key,proto3" json:"key,omitempty"` WithPassword bool `protobuf:"varint,6,opt,name=with_password,json=withPassword,proto3" json:"with_password,omitempty"` // contains filtered or unexported fields }
func (*IdentityInWalletText) Descriptor
deprecated
func (*IdentityInWalletText) Descriptor() ([]byte, []int)
Deprecated: Use IdentityInWalletText.ProtoReflect.Descriptor instead.
func (*IdentityInWalletText) GetCert ¶
func (x *IdentityInWalletText) GetCert() string
func (*IdentityInWalletText) GetCertContent ¶
func (x *IdentityInWalletText) GetCertContent() string
func (*IdentityInWalletText) GetKey ¶
func (x *IdentityInWalletText) GetKey() string
func (*IdentityInWalletText) GetLabel ¶
func (x *IdentityInWalletText) GetLabel() string
func (*IdentityInWalletText) GetMspId ¶
func (x *IdentityInWalletText) GetMspId() string
func (*IdentityInWalletText) GetRole ¶
func (x *IdentityInWalletText) GetRole() string
func (*IdentityInWalletText) GetWithPassword ¶
func (x *IdentityInWalletText) GetWithPassword() bool
func (*IdentityInWalletText) ProtoMessage ¶
func (*IdentityInWalletText) ProtoMessage()
func (*IdentityInWalletText) ProtoReflect ¶
func (x *IdentityInWalletText) ProtoReflect() protoreflect.Message
func (*IdentityInWalletText) Reset ¶
func (x *IdentityInWalletText) Reset()
func (*IdentityInWalletText) String ¶
func (x *IdentityInWalletText) String() string
func (*IdentityInWalletText) Validate ¶
func (m *IdentityInWalletText) Validate() error
Validate checks the field values on IdentityInWalletText 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 (*IdentityInWalletText) ValidateAll ¶
func (m *IdentityInWalletText) ValidateAll() error
ValidateAll checks the field values on IdentityInWalletText 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 IdentityInWalletTextMultiError, or nil if none found.
type IdentityInWalletTextMultiError ¶
type IdentityInWalletTextMultiError []error
IdentityInWalletTextMultiError is an error wrapping multiple validation errors returned by IdentityInWalletText.ValidateAll() if the designated constraints aren't met.
func (IdentityInWalletTextMultiError) AllErrors ¶
func (m IdentityInWalletTextMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (IdentityInWalletTextMultiError) Error ¶
func (m IdentityInWalletTextMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type IdentityInWalletTextValidationError ¶
type IdentityInWalletTextValidationError struct {
// contains filtered or unexported fields
}
IdentityInWalletTextValidationError is the validation error returned by IdentityInWalletText.Validate if the designated constraints aren't met.
func (IdentityInWalletTextValidationError) Cause ¶
func (e IdentityInWalletTextValidationError) Cause() error
Cause function returns cause value.
func (IdentityInWalletTextValidationError) Error ¶
func (e IdentityInWalletTextValidationError) Error() string
Error satisfies the builtin error interface
func (IdentityInWalletTextValidationError) ErrorName ¶
func (e IdentityInWalletTextValidationError) ErrorName() string
ErrorName returns error name.
func (IdentityInWalletTextValidationError) Field ¶
func (e IdentityInWalletTextValidationError) Field() string
Field function returns field value.
func (IdentityInWalletTextValidationError) Key ¶
func (e IdentityInWalletTextValidationError) Key() bool
Key function returns key value.
func (IdentityInWalletTextValidationError) Reason ¶
func (e IdentityInWalletTextValidationError) Reason() string
Reason function returns reason value.
type IdentityInWalletValidationError ¶
type IdentityInWalletValidationError struct {
// contains filtered or unexported fields
}
IdentityInWalletValidationError is the validation error returned by IdentityInWallet.Validate if the designated constraints aren't met.
func (IdentityInWalletValidationError) Cause ¶
func (e IdentityInWalletValidationError) Cause() error
Cause function returns cause value.
func (IdentityInWalletValidationError) Error ¶
func (e IdentityInWalletValidationError) Error() string
Error satisfies the builtin error interface
func (IdentityInWalletValidationError) ErrorName ¶
func (e IdentityInWalletValidationError) ErrorName() string
ErrorName returns error name.
func (IdentityInWalletValidationError) Field ¶
func (e IdentityInWalletValidationError) Field() string
Field function returns field value.
func (IdentityInWalletValidationError) Key ¶
func (e IdentityInWalletValidationError) Key() bool
Key function returns key value.
func (IdentityInWalletValidationError) Reason ¶
func (e IdentityInWalletValidationError) Reason() string
Reason function returns reason value.
type IdentityLabel ¶
type IdentityLabel struct { Label string `protobuf:"bytes,1,opt,name=label,proto3" json:"label,omitempty"` // contains filtered or unexported fields }
func (*IdentityLabel) Descriptor
deprecated
func (*IdentityLabel) Descriptor() ([]byte, []int)
Deprecated: Use IdentityLabel.ProtoReflect.Descriptor instead.
func (*IdentityLabel) GetLabel ¶
func (x *IdentityLabel) GetLabel() string
func (*IdentityLabel) ProtoMessage ¶
func (*IdentityLabel) ProtoMessage()
func (*IdentityLabel) ProtoReflect ¶
func (x *IdentityLabel) ProtoReflect() protoreflect.Message
func (*IdentityLabel) Reset ¶
func (x *IdentityLabel) Reset()
func (*IdentityLabel) String ¶
func (x *IdentityLabel) String() string
func (*IdentityLabel) Validate ¶
func (m *IdentityLabel) Validate() error
Validate checks the field values on IdentityLabel 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 (*IdentityLabel) ValidateAll ¶
func (m *IdentityLabel) ValidateAll() error
ValidateAll checks the field values on IdentityLabel 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 IdentityLabelMultiError, or nil if none found.
type IdentityLabelMultiError ¶
type IdentityLabelMultiError []error
IdentityLabelMultiError is an error wrapping multiple validation errors returned by IdentityLabel.ValidateAll() if the designated constraints aren't met.
func (IdentityLabelMultiError) AllErrors ¶
func (m IdentityLabelMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (IdentityLabelMultiError) Error ¶
func (m IdentityLabelMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type IdentityLabelValidationError ¶
type IdentityLabelValidationError struct {
// contains filtered or unexported fields
}
IdentityLabelValidationError is the validation error returned by IdentityLabel.Validate if the designated constraints aren't met.
func (IdentityLabelValidationError) Cause ¶
func (e IdentityLabelValidationError) Cause() error
Cause function returns cause value.
func (IdentityLabelValidationError) Error ¶
func (e IdentityLabelValidationError) Error() string
Error satisfies the builtin error interface
func (IdentityLabelValidationError) ErrorName ¶
func (e IdentityLabelValidationError) ErrorName() string
ErrorName returns error name.
func (IdentityLabelValidationError) Field ¶
func (e IdentityLabelValidationError) Field() string
Field function returns field value.
func (IdentityLabelValidationError) Key ¶
func (e IdentityLabelValidationError) Key() bool
Key function returns key value.
func (IdentityLabelValidationError) Reason ¶
func (e IdentityLabelValidationError) Reason() string
Reason function returns reason value.
type IdentityLabels ¶
type IdentityLabels struct { Labels []string `protobuf:"bytes,1,rep,name=labels,proto3" json:"labels,omitempty"` // contains filtered or unexported fields }
func (*IdentityLabels) Descriptor
deprecated
func (*IdentityLabels) Descriptor() ([]byte, []int)
Deprecated: Use IdentityLabels.ProtoReflect.Descriptor instead.
func (*IdentityLabels) GetLabels ¶
func (x *IdentityLabels) GetLabels() []string
func (*IdentityLabels) ProtoMessage ¶
func (*IdentityLabels) ProtoMessage()
func (*IdentityLabels) ProtoReflect ¶
func (x *IdentityLabels) ProtoReflect() protoreflect.Message
func (*IdentityLabels) Reset ¶
func (x *IdentityLabels) Reset()
func (*IdentityLabels) String ¶
func (x *IdentityLabels) String() string
func (*IdentityLabels) Validate ¶
func (m *IdentityLabels) Validate() error
Validate checks the field values on IdentityLabels 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 (*IdentityLabels) ValidateAll ¶
func (m *IdentityLabels) ValidateAll() error
ValidateAll checks the field values on IdentityLabels 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 IdentityLabelsMultiError, or nil if none found.
type IdentityLabelsMultiError ¶
type IdentityLabelsMultiError []error
IdentityLabelsMultiError is an error wrapping multiple validation errors returned by IdentityLabels.ValidateAll() if the designated constraints aren't met.
func (IdentityLabelsMultiError) AllErrors ¶
func (m IdentityLabelsMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (IdentityLabelsMultiError) Error ¶
func (m IdentityLabelsMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type IdentityLabelsValidationError ¶
type IdentityLabelsValidationError struct {
// contains filtered or unexported fields
}
IdentityLabelsValidationError is the validation error returned by IdentityLabels.Validate if the designated constraints aren't met.
func (IdentityLabelsValidationError) Cause ¶
func (e IdentityLabelsValidationError) Cause() error
Cause function returns cause value.
func (IdentityLabelsValidationError) Error ¶
func (e IdentityLabelsValidationError) Error() string
Error satisfies the builtin error interface
func (IdentityLabelsValidationError) ErrorName ¶
func (e IdentityLabelsValidationError) ErrorName() string
ErrorName returns error name.
func (IdentityLabelsValidationError) Field ¶
func (e IdentityLabelsValidationError) Field() string
Field function returns field value.
func (IdentityLabelsValidationError) Key ¶
func (e IdentityLabelsValidationError) Key() bool
Key function returns key value.
func (IdentityLabelsValidationError) Reason ¶
func (e IdentityLabelsValidationError) Reason() string
Reason function returns reason value.
type IdentityMultiError ¶
type IdentityMultiError []error
IdentityMultiError is an error wrapping multiple validation errors returned by Identity.ValidateAll() if the designated constraints aren't met.
func (IdentityMultiError) AllErrors ¶
func (m IdentityMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (IdentityMultiError) Error ¶
func (m IdentityMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type IdentityPassword ¶
type IdentityPassword struct { Label string `protobuf:"bytes,1,opt,name=label,proto3" json:"label,omitempty"` Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"` // contains filtered or unexported fields }
func (*IdentityPassword) Descriptor
deprecated
func (*IdentityPassword) Descriptor() ([]byte, []int)
Deprecated: Use IdentityPassword.ProtoReflect.Descriptor instead.
func (*IdentityPassword) GetLabel ¶
func (x *IdentityPassword) GetLabel() string
func (*IdentityPassword) GetPassword ¶
func (x *IdentityPassword) GetPassword() string
func (*IdentityPassword) ProtoMessage ¶
func (*IdentityPassword) ProtoMessage()
func (*IdentityPassword) ProtoReflect ¶
func (x *IdentityPassword) ProtoReflect() protoreflect.Message
func (*IdentityPassword) Reset ¶
func (x *IdentityPassword) Reset()
func (*IdentityPassword) String ¶
func (x *IdentityPassword) String() string
func (*IdentityPassword) Validate ¶
func (m *IdentityPassword) Validate() error
Validate checks the field values on IdentityPassword 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 (*IdentityPassword) ValidateAll ¶
func (m *IdentityPassword) ValidateAll() error
ValidateAll checks the field values on IdentityPassword 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 IdentityPasswordMultiError, or nil if none found.
type IdentityPasswordMultiError ¶
type IdentityPasswordMultiError []error
IdentityPasswordMultiError is an error wrapping multiple validation errors returned by IdentityPassword.ValidateAll() if the designated constraints aren't met.
func (IdentityPasswordMultiError) AllErrors ¶
func (m IdentityPasswordMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (IdentityPasswordMultiError) Error ¶
func (m IdentityPasswordMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type IdentityPasswordValidationError ¶
type IdentityPasswordValidationError struct {
// contains filtered or unexported fields
}
IdentityPasswordValidationError is the validation error returned by IdentityPassword.Validate if the designated constraints aren't met.
func (IdentityPasswordValidationError) Cause ¶
func (e IdentityPasswordValidationError) Cause() error
Cause function returns cause value.
func (IdentityPasswordValidationError) Error ¶
func (e IdentityPasswordValidationError) Error() string
Error satisfies the builtin error interface
func (IdentityPasswordValidationError) ErrorName ¶
func (e IdentityPasswordValidationError) ErrorName() string
ErrorName returns error name.
func (IdentityPasswordValidationError) Field ¶
func (e IdentityPasswordValidationError) Field() string
Field function returns field value.
func (IdentityPasswordValidationError) Key ¶
func (e IdentityPasswordValidationError) Key() bool
Key function returns key value.
func (IdentityPasswordValidationError) Reason ¶
func (e IdentityPasswordValidationError) Reason() string
Reason function returns reason value.
type IdentityValidationError ¶
type IdentityValidationError struct {
// contains filtered or unexported fields
}
IdentityValidationError is the validation error returned by Identity.Validate if the designated constraints aren't met.
func (IdentityValidationError) Cause ¶
func (e IdentityValidationError) Cause() error
Cause function returns cause value.
func (IdentityValidationError) Error ¶
func (e IdentityValidationError) Error() string
Error satisfies the builtin error interface
func (IdentityValidationError) ErrorName ¶
func (e IdentityValidationError) ErrorName() string
ErrorName returns error name.
func (IdentityValidationError) Field ¶
func (e IdentityValidationError) Field() string
Field function returns field value.
func (IdentityValidationError) Key ¶
func (e IdentityValidationError) Key() bool
Key function returns key value.
func (IdentityValidationError) Reason ¶
func (e IdentityValidationError) Reason() string
Reason function returns reason value.
type IdentityWithPassword ¶
type IdentityWithPassword struct { Label string `protobuf:"bytes,1,opt,name=label,proto3" json:"label,omitempty"` MspId string `protobuf:"bytes,2,opt,name=msp_id,json=mspId,proto3" json:"msp_id,omitempty"` Role string `protobuf:"bytes,6,opt,name=role,proto3" json:"role,omitempty"` Cert []byte `protobuf:"bytes,3,opt,name=cert,proto3" json:"cert,omitempty"` Key []byte `protobuf:"bytes,4,opt,name=key,proto3" json:"key,omitempty"` Password string `protobuf:"bytes,5,opt,name=password,proto3" json:"password,omitempty"` // contains filtered or unexported fields }
func (*IdentityWithPassword) Descriptor
deprecated
func (*IdentityWithPassword) Descriptor() ([]byte, []int)
Deprecated: Use IdentityWithPassword.ProtoReflect.Descriptor instead.
func (*IdentityWithPassword) GetCert ¶
func (x *IdentityWithPassword) GetCert() []byte
func (*IdentityWithPassword) GetKey ¶
func (x *IdentityWithPassword) GetKey() []byte
func (*IdentityWithPassword) GetLabel ¶
func (x *IdentityWithPassword) GetLabel() string
func (*IdentityWithPassword) GetMspId ¶
func (x *IdentityWithPassword) GetMspId() string
func (*IdentityWithPassword) GetPassword ¶
func (x *IdentityWithPassword) GetPassword() string
func (*IdentityWithPassword) GetRole ¶
func (x *IdentityWithPassword) GetRole() string
func (*IdentityWithPassword) ProtoMessage ¶
func (*IdentityWithPassword) ProtoMessage()
func (*IdentityWithPassword) ProtoReflect ¶
func (x *IdentityWithPassword) ProtoReflect() protoreflect.Message
func (*IdentityWithPassword) Reset ¶
func (x *IdentityWithPassword) Reset()
func (*IdentityWithPassword) String ¶
func (x *IdentityWithPassword) String() string
func (*IdentityWithPassword) Validate ¶
func (m *IdentityWithPassword) Validate() error
Validate checks the field values on IdentityWithPassword 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 (*IdentityWithPassword) ValidateAll ¶
func (m *IdentityWithPassword) ValidateAll() error
ValidateAll checks the field values on IdentityWithPassword 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 IdentityWithPasswordMultiError, or nil if none found.
type IdentityWithPasswordMultiError ¶
type IdentityWithPasswordMultiError []error
IdentityWithPasswordMultiError is an error wrapping multiple validation errors returned by IdentityWithPassword.ValidateAll() if the designated constraints aren't met.
func (IdentityWithPasswordMultiError) AllErrors ¶
func (m IdentityWithPasswordMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (IdentityWithPasswordMultiError) Error ¶
func (m IdentityWithPasswordMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type IdentityWithPasswordValidationError ¶
type IdentityWithPasswordValidationError struct {
// contains filtered or unexported fields
}
IdentityWithPasswordValidationError is the validation error returned by IdentityWithPassword.Validate if the designated constraints aren't met.
func (IdentityWithPasswordValidationError) Cause ¶
func (e IdentityWithPasswordValidationError) Cause() error
Cause function returns cause value.
func (IdentityWithPasswordValidationError) Error ¶
func (e IdentityWithPasswordValidationError) Error() string
Error satisfies the builtin error interface
func (IdentityWithPasswordValidationError) ErrorName ¶
func (e IdentityWithPasswordValidationError) ErrorName() string
ErrorName returns error name.
func (IdentityWithPasswordValidationError) Field ¶
func (e IdentityWithPasswordValidationError) Field() string
Field function returns field value.
func (IdentityWithPasswordValidationError) Key ¶
func (e IdentityWithPasswordValidationError) Key() bool
Key function returns key value.
func (IdentityWithPasswordValidationError) Reason ¶
func (e IdentityWithPasswordValidationError) Reason() string
Reason function returns reason value.
type Store ¶
type Store interface { Get(label string) (*IdentityInWallet, error) Set(identity *IdentityInWallet) error List() (labels []string, err error) Delete(label string) error }
type UnimplementedWalletServiceServer ¶
type UnimplementedWalletServiceServer struct { }
UnimplementedWalletServiceServer can be embedded to have forward compatible implementations.
func (*UnimplementedWalletServiceServer) IdentityDelete ¶
func (*UnimplementedWalletServiceServer) IdentityDelete(context.Context, *IdentityLabel) (*IdentityInWallet, error)
func (*UnimplementedWalletServiceServer) IdentityGet ¶
func (*UnimplementedWalletServiceServer) IdentityGet(context.Context, *IdentityLabel) (*IdentityInWallet, error)
func (*UnimplementedWalletServiceServer) IdentityGetText ¶
func (*UnimplementedWalletServiceServer) IdentityGetText(context.Context, *IdentityLabel) (*IdentityInWalletText, error)
func (*UnimplementedWalletServiceServer) IdentityGetWithPassword ¶
func (*UnimplementedWalletServiceServer) IdentityGetWithPassword(context.Context, *IdentityPassword) (*IdentityInWallet, error)
func (*UnimplementedWalletServiceServer) IdentityList ¶
func (*UnimplementedWalletServiceServer) IdentityList(context.Context, *emptypb.Empty) (*IdentityLabels, error)
func (*UnimplementedWalletServiceServer) IdentitySet ¶
func (*UnimplementedWalletServiceServer) IdentitySet(context.Context, *Identity) (*IdentityInWallet, error)
func (*UnimplementedWalletServiceServer) IdentitySetWithPassword ¶
func (*UnimplementedWalletServiceServer) IdentitySetWithPassword(context.Context, *IdentityWithPassword) (*IdentityInWallet, error)
type Wallet ¶
type Wallet struct {
// contains filtered or unexported fields
}
func (*Wallet) IdentityDelete ¶
func (w *Wallet) IdentityDelete(ctx context.Context, label *IdentityLabel) (*IdentityInWallet, error)
func (*Wallet) IdentityGet ¶
func (w *Wallet) IdentityGet(_ context.Context, lbl *IdentityLabel) (*IdentityInWallet, error)
func (*Wallet) IdentityGetText ¶
func (w *Wallet) IdentityGetText(ctx context.Context, lbl *IdentityLabel) (*IdentityInWalletText, error)
func (*Wallet) IdentityGetWithPassword ¶
func (w *Wallet) IdentityGetWithPassword(_ context.Context, identity *IdentityPassword) (*IdentityInWallet, error)
func (*Wallet) IdentityList ¶
func (*Wallet) IdentitySet ¶
func (*Wallet) IdentitySetWithPassword ¶
func (w *Wallet) IdentitySetWithPassword(_ context.Context, identity *IdentityWithPassword) (*IdentityInWallet, error)
func (*Wallet) ServiceDef ¶
type WalletServiceClient ¶
type WalletServiceClient interface { // Получить identity IdentityGet(ctx context.Context, in *IdentityLabel, opts ...grpc.CallOption) (*IdentityInWallet, error) // Получить identity в виде текста IdentityGetText(ctx context.Context, in *IdentityLabel, opts ...grpc.CallOption) (*IdentityInWalletText, error) // Записать identity IdentitySet(ctx context.Context, in *Identity, opts ...grpc.CallOption) (*IdentityInWallet, error) // Записать identity в зашифрованном виде IdentitySetWithPassword(ctx context.Context, in *IdentityWithPassword, opts ...grpc.CallOption) (*IdentityInWallet, error) // Получить identity из зашифрованного вида IdentityGetWithPassword(ctx context.Context, in *IdentityPassword, opts ...grpc.CallOption) (*IdentityInWallet, error) // Список identity IdentityList(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*IdentityLabels, error) // Удалить identity IdentityDelete(ctx context.Context, in *IdentityLabel, opts ...grpc.CallOption) (*IdentityInWallet, error) }
WalletServiceClient is the client API for WalletService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewWalletServiceClient ¶
func NewWalletServiceClient(cc grpc.ClientConnInterface) WalletServiceClient
type WalletServiceServer ¶
type WalletServiceServer interface { // Получить identity IdentityGet(context.Context, *IdentityLabel) (*IdentityInWallet, error) // Получить identity в виде текста IdentityGetText(context.Context, *IdentityLabel) (*IdentityInWalletText, error) // Записать identity IdentitySet(context.Context, *Identity) (*IdentityInWallet, error) // Записать identity в зашифрованном виде IdentitySetWithPassword(context.Context, *IdentityWithPassword) (*IdentityInWallet, error) // Получить identity из зашифрованного вида IdentityGetWithPassword(context.Context, *IdentityPassword) (*IdentityInWallet, error) // Список identity IdentityList(context.Context, *emptypb.Empty) (*IdentityLabels, error) // Удалить identity IdentityDelete(context.Context, *IdentityLabel) (*IdentityInWallet, error) }
WalletServiceServer is the server API for WalletService service.