Documentation
¶
Overview ¶
Copyright IBM Corp. All Rights Reserved.
SPDX-License-Identifier: Apache-2.0
Copyright IBM Corp. All Rights Reserved.
SPDX-License-Identifier: Apache-2.0
Copyright IBM Corp. All Rights Reserved.
SPDX-License-Identifier: Apache-2.0
Index ¶
- func UnmarshalCommand(raw []byte) (*token.Command, error)
- type ACLProvider
- type ACLResources
- type CapabilityChecker
- type ChannelConfigGetter
- type Issuer
- type Manager
- type Marshaler
- type PeerLedgerManager
- type PeerTokenOwnerValidatorManager
- type PolicyBasedAccessControl
- type PolicyChecker
- type Prover
- func (s *Prover) ListUnspentTokens(ctxt context.Context, header *token.Header, listRequest *token.ListRequest) (*token.CommandResponse_UnspentTokens, error)
- func (s *Prover) MarshalErrorResponse(command []byte, e error) (*token.SignedCommandResponse, error)
- func (s *Prover) ProcessCommand(ctx context.Context, sc *token.SignedCommand) (cr *token.SignedCommandResponse, err error)
- func (s *Prover) RequestIssue(ctx context.Context, header *token.Header, requestImport *token.IssueRequest) (*token.CommandResponse_TokenTransaction, error)
- func (s *Prover) RequestRedeem(ctx context.Context, header *token.Header, request *token.RedeemRequest) (*token.CommandResponse_TokenTransaction, error)
- func (s *Prover) RequestTokenOperations(ctx context.Context, header *token.Header, ...) (*token.CommandResponse_TokenTransactions, error)
- func (s *Prover) RequestTransfer(ctx context.Context, header *token.Header, request *token.TransferRequest) (*token.CommandResponse_TokenTransaction, error)
- func (s *Prover) ValidateHeader(header *token.Header) error
- type ResponseMarshaler
- type Signer
- type SignerIdentity
- type TMSManager
- type TimeFunc
- type TokenCapabilityChecker
- type Transactor
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ACLProvider ¶
type ACLResources ¶
type CapabilityChecker ¶
type ChannelConfigGetter ¶
type ChannelConfigGetter interface {
GetChannelConfig(cid string) channelconfig.Resources
}
type Issuer ¶
type Issuer interface {
RequestIssue(tokensToIssue []*token.Token) (*token.TokenTransaction, error)
RequestTokenOperation(op *token.TokenOperation) (*token.TokenTransaction, error)
}
type Manager ¶
type Manager struct {
LedgerManager ledger.LedgerManager
TokenOwnerValidatorManager identity.TokenOwnerValidatorManager
}
func (*Manager) GetTransactor ¶
func (m *Manager) GetTransactor(channel string, privateCredential, publicCredential []byte) (Transactor, error)
type Marshaler ¶
type Marshaler interface {
MarshalCommandResponse(command []byte, responsePayload interface{}) (*token.SignedCommandResponse, error)
}
type PeerLedgerManager ¶
func (*PeerLedgerManager) GetLedgerReader ¶
func (p *PeerLedgerManager) GetLedgerReader(channel string) (ledger.LedgerReader, error)
type PeerTokenOwnerValidatorManager ¶
type PeerTokenOwnerValidatorManager struct {
IdentityDeserializerManager identity.DeserializerManager
}
func (*PeerTokenOwnerValidatorManager) Get ¶
func (p *PeerTokenOwnerValidatorManager) Get(channel string) (identity.TokenOwnerValidator, error)
type PolicyBasedAccessControl ¶
type PolicyBasedAccessControl struct {
ACLProvider ACLProvider
ACLResources *ACLResources
}
func (*PolicyBasedAccessControl) Check ¶
func (ac *PolicyBasedAccessControl) Check(sc *token.SignedCommand, c *token.Command) error
type PolicyChecker ¶
type PolicyChecker interface {
Check(sc *token.SignedCommand, c *token.Command) error
}
type Prover ¶
type Prover struct {
CapabilityChecker CapabilityChecker
Marshaler Marshaler
PolicyChecker PolicyChecker
TMSManager TMSManager
}
func (*Prover) ListUnspentTokens ¶
func (s *Prover) ListUnspentTokens(ctxt context.Context, header *token.Header, listRequest *token.ListRequest) (*token.CommandResponse_UnspentTokens, error)
func (*Prover) MarshalErrorResponse ¶
func (*Prover) ProcessCommand ¶
func (s *Prover) ProcessCommand(ctx context.Context, sc *token.SignedCommand) (cr *token.SignedCommandResponse, err error)
func (*Prover) RequestIssue ¶
func (s *Prover) RequestIssue(ctx context.Context, header *token.Header, requestImport *token.IssueRequest) (*token.CommandResponse_TokenTransaction, error)
func (*Prover) RequestRedeem ¶
func (s *Prover) RequestRedeem(ctx context.Context, header *token.Header, request *token.RedeemRequest) (*token.CommandResponse_TokenTransaction, error)
func (*Prover) RequestTokenOperations ¶
func (s *Prover) RequestTokenOperations(ctx context.Context, header *token.Header, request *token.TokenOperationRequest) (*token.CommandResponse_TokenTransactions, error)
func (*Prover) RequestTransfer ¶
func (s *Prover) RequestTransfer(ctx context.Context, header *token.Header, request *token.TransferRequest) (*token.CommandResponse_TokenTransaction, error)
type ResponseMarshaler ¶
func NewResponseMarshaler ¶
func NewResponseMarshaler(signerID SignerIdentity) (*ResponseMarshaler, error)
func (*ResponseMarshaler) MarshalCommandResponse ¶
func (s *ResponseMarshaler) MarshalCommandResponse(command []byte, responsePayload interface{}) (*token.SignedCommandResponse, error)
type SignerIdentity ¶
type TMSManager ¶
type TokenCapabilityChecker ¶
type TokenCapabilityChecker struct {
ChannelConfigGetter ChannelConfigGetter
}
type Transactor ¶
type Transactor interface {
RequestTransfer(request *token.TransferRequest) (*token.TokenTransaction, error)
RequestRedeem(request *token.RedeemRequest) (*token.TokenTransaction, error)
ListTokens() (*token.UnspentTokens, error)
RequestTokenOperation(tokenIDs []*token.TokenId, op *token.TokenOperation) (*token.TokenTransaction, int, error)
Done()
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.