Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( ErrTransferNotFound = errors.New("transfer not found") ErrUnknown = errors.New("unknown error") )
Standardized errors for working with business logic.
Functions ¶
This section is empty.
Types ¶
type BlockData ¶
type BlockData struct { BlockNum uint64 Txs []Transaction }
func (*BlockData) ItemsCount ¶
type Checkpoint ¶
func (*Checkpoint) Clone ¶
func (cp *Checkpoint) Clone() data.Object
func (*Checkpoint) Instance ¶
func (cp *Checkpoint) Instance() data.Type
func (*Checkpoint) MarshalBinary ¶
func (cp *Checkpoint) MarshalBinary() (data []byte, err error)
func (*Checkpoint) UnmarshalBinary ¶
func (cp *Checkpoint) UnmarshalBinary(data []byte) error
type CompositeKeysPrefixes ¶
type CompositeKeysPrefixes struct {
BatchPrefix string
}
type ID ¶
type ID string
ID is defined as a separate data type for requests to get the status by ID.
type StatusKind ¶
type StatusKind int
const ( InProgressTransferFrom StatusKind = iota ErrorTransferFrom CompletedTransferFrom FromBatchNotFound InProgressTransferTo ErrorTransferTo CompletedTransferTo ToBatchNotFound CommitTransferFrom InProgressTransferToDelete CompletedTransferToDelete ErrorTransferToDelete InProgressTransferFromDelete CompletedTransferFromDelete ErrorTransferFromDelete Canceled Completed UnknownTransferStatus InternalErrorTransferStatus ErrorChannelToNotFound ExistsChannelTo )
func (StatusKind) Is ¶
func (sk StatusKind) Is(status string) bool
func (StatusKind) String ¶
func (sk StatusKind) String() string
type Transaction ¶
type TransactionKind ¶
type TransactionKind int
const ( TxCancelCCTransferFrom TransactionKind = iota TxChannelTransferByAdmin TxChannelTransferByCustomer TxCreateCCTransferTo NbTxCommitCCTransferFrom NbTxDeleteCCTransferFrom NbTxDeleteCCTransferTo QueryChannelTransfersFrom QueryChannelTransferTo QueryChannelTransferFrom TxChannelMultiTransferByAdmin TxChannelMultiTransferByCustomer )
func (TransactionKind) Is ¶
func (tk TransactionKind) Is(method string) bool
func (TransactionKind) String ¶
func (tk TransactionKind) String() string
type TransferBlock ¶
type TransferBlock struct { Channel ID Transfer ID Transactions []Transaction }
func (*TransferBlock) Clone ¶
func (tb *TransferBlock) Clone() data.Object
func (*TransferBlock) Instance ¶
func (tb *TransferBlock) Instance() data.Type
func (*TransferBlock) MarshalBinary ¶
func (tb *TransferBlock) MarshalBinary() (data []byte, err error)
func (*TransferBlock) UnmarshalBinary ¶
func (tb *TransferBlock) UnmarshalBinary(data []byte) error
type TransferItem ¶ added in v0.0.5
type TransferRequest ¶
type TransferRequest struct { TransferResult Request ID Transfer ID User ID Method string Chaincode string Channel string Nonce string PublicKey string Sign string To string Token string Amount string Items []TransferItem }
TransferRequest contains the internal representation of a request to transfer funds from one channel to another. This structure is filled from the request and enters the queue for processing.
func (*TransferRequest) Clone ¶
func (tr *TransferRequest) Clone() data.Object
Clone should create an exact copy of the object, located in a different memory location from the original. This is necessary in case of cache optimization to avoid marshalling the object in some cases. Clone is also used as a template for finding an object in the repository.
func (*TransferRequest) Instance ¶
func (tr *TransferRequest) Instance() data.Type
Instance should return a unique object type to share namespace between the stored data. In the simplest case, you can return the type name via InstanceOf, but keep in mind that you need to preserve compatibility or provide for migration when refactoring.
func (*TransferRequest) MarshalBinary ¶
func (tr *TransferRequest) MarshalBinary() (data []byte, err error)
func (*TransferRequest) UnmarshalBinary ¶
func (tr *TransferRequest) UnmarshalBinary(data []byte) error
type TransferResult ¶
TransferResult is the result of processing a request to transfer funds from one channel to another. The statuses are symmetrical to proto. TODO: Custom statuses should be added later.