wallet

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2023 License: Apache-2.0 Imports: 36 Imported by: 0

Documentation

Overview

Package wallet is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

View Source
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_-]+")
)
View Source
var File_wallet_wallet_proto protoreflect.FileDescriptor
View Source
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

func ValidateLabel(label string) error

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) Descriptor() ([]byte, []int)

Deprecated: Use Identity.ProtoReflect.Descriptor instead.

func (*Identity) GetCert

func (x *Identity) GetCert() []byte

func (*Identity) GetKey

func (x *Identity) GetKey() []byte

func (*Identity) GetLabel

func (x *Identity) GetLabel() string

func (*Identity) GetMspId

func (x *Identity) GetMspId() string

func (*Identity) GetRole

func (x *Identity) GetRole() string

func (*Identity) ProtoMessage

func (*Identity) ProtoMessage()

func (*Identity) ProtoReflect

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

func (*Identity) Reset

func (x *Identity) Reset()

func (*Identity) String

func (x *Identity) String() string

func (*Identity) Validate

func (m *Identity) Validate() error

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

func (m *Identity) ValidateAll() error

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

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

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

Cause function returns cause value.

func (IdentityInWalletTextValidationError) Error

Error satisfies the builtin error interface

func (IdentityInWalletTextValidationError) ErrorName

ErrorName returns error name.

func (IdentityInWalletTextValidationError) Field

Field function returns field value.

func (IdentityInWalletTextValidationError) Key

Key function returns key value.

func (IdentityInWalletTextValidationError) Reason

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

Cause function returns cause value.

func (IdentityInWalletValidationError) Error

Error satisfies the builtin error interface

func (IdentityInWalletValidationError) ErrorName

ErrorName returns error name.

func (IdentityInWalletValidationError) Field

Field function returns field value.

func (IdentityInWalletValidationError) Key

Key function returns key value.

func (IdentityInWalletValidationError) Reason

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

Cause function returns cause value.

func (IdentityLabelValidationError) Error

Error satisfies the builtin error interface

func (IdentityLabelValidationError) ErrorName

func (e IdentityLabelValidationError) ErrorName() string

ErrorName returns error name.

func (IdentityLabelValidationError) Field

Field function returns field value.

func (IdentityLabelValidationError) Key

Key function returns key value.

func (IdentityLabelValidationError) Reason

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

Cause function returns cause value.

func (IdentityLabelsValidationError) Error

Error satisfies the builtin error interface

func (IdentityLabelsValidationError) ErrorName

func (e IdentityLabelsValidationError) ErrorName() string

ErrorName returns error name.

func (IdentityLabelsValidationError) Field

Field function returns field value.

func (IdentityLabelsValidationError) Key

Key function returns key value.

func (IdentityLabelsValidationError) Reason

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

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

Cause function returns cause value.

func (IdentityPasswordValidationError) Error

Error satisfies the builtin error interface

func (IdentityPasswordValidationError) ErrorName

ErrorName returns error name.

func (IdentityPasswordValidationError) Field

Field function returns field value.

func (IdentityPasswordValidationError) Key

Key function returns key value.

func (IdentityPasswordValidationError) Reason

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

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

Cause function returns cause value.

func (IdentityWithPasswordValidationError) Error

Error satisfies the builtin error interface

func (IdentityWithPasswordValidationError) ErrorName

ErrorName returns error name.

func (IdentityWithPasswordValidationError) Field

Field function returns field value.

func (IdentityWithPasswordValidationError) Key

Key function returns key value.

func (IdentityWithPasswordValidationError) Reason

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) IdentityGet

func (*UnimplementedWalletServiceServer) IdentityGetText

func (*UnimplementedWalletServiceServer) IdentityGetWithPassword

func (*UnimplementedWalletServiceServer) IdentityList

func (*UnimplementedWalletServiceServer) IdentitySet

func (*UnimplementedWalletServiceServer) IdentitySetWithPassword

type Wallet

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

func New

func New(store Store) *Wallet

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 (w *Wallet) IdentityList(context.Context, *empty.Empty) (*IdentityLabels, error)

func (*Wallet) IdentitySet

func (w *Wallet) IdentitySet(ctx context.Context, identity *Identity) (*IdentityInWallet, error)

func (*Wallet) IdentitySetWithPassword

func (w *Wallet) IdentitySetWithPassword(_ context.Context, identity *IdentityWithPassword) (*IdentityInWallet, error)

func (*Wallet) ServiceDef

func (w *Wallet) ServiceDef() *service.Def

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.

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.

Directories

Path Synopsis
store

Jump to

Keyboard shortcuts

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