Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Output ¶
type Output struct { Sequence uint64 `json:"sequence,omitempty"` CreatedAt time.Time `json:"created_at"` Hash mixinnet.Hash `json:"hash,omitempty"` Index uint8 `json:"index,omitempty"` UserID string `json:"user_id,omitempty"` AssetID string `json:"asset_id,omitempty"` Amount decimal.Decimal `json:"amount"` }
type OutputService ¶
type OutputStore ¶
type OutputStore interface { Save(ctx context.Context, outputs []*Output) error List(ctx context.Context, userID string, offset uint64, limit int) ([]*Output, error) ListTarget(ctx context.Context, userID, assetID string, offset uint64, target decimal.Decimal, limit int) ([]*Output, error) ListRange(ctx context.Context, userID, assetID string, from, to uint64) ([]*Output, error) Delete(ctx context.Context, sequence uint64) error SumBalances(ctx context.Context, userID, assetID string) ([]*Balance, error) }
type PropertyStore ¶ added in v1.1.0
type ServiceLoader ¶ added in v1.1.0
type ServiceLoader interface { LoadOutput(ctx context.Context, userID string) (OutputService, error) LoadTransfer(ctx context.Context, userID string) (TransferService, error) }
type Transfer ¶
type Transfer struct { ID uint64 `json:"id,omitempty"` CreatedAt time.Time `json:"created_at,omitempty"` TraceID string `json:"trace_id,omitempty"` Status TransferStatus `json:"state,omitempty"` UserID string `json:"user_id,omitempty"` AssetID string `json:"asset_id,omitempty"` Amount decimal.Decimal `json:"amount,omitempty"` Memo string `json:"memo,omitempty"` Opponent *mixin.MixAddress `json:"opponent,omitempty"` AssignRange [2]uint64 `json:"assign_range,omitempty"` }
type TransferService ¶
type TransferStatus ¶
type TransferStatus uint8
const ( TransferStatusPending TransferStatus TransferStatusAssigned TransferStatusHandled )
func TransferStatusString ¶
func TransferStatusString(s string) (TransferStatus, error)
TransferStatusString retrieves an enum value from the enum constants string name. Throws an error if the param is not part of the enum.
func TransferStatusValues ¶
func TransferStatusValues() []TransferStatus
TransferStatusValues returns all values of the enum
func (TransferStatus) IsATransferStatus ¶
func (i TransferStatus) IsATransferStatus() bool
IsATransferStatus returns "true" if the value is listed in the enum definition. "false" otherwise
func (TransferStatus) MarshalJSON ¶
func (i TransferStatus) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaler interface for TransferStatus
func (TransferStatus) String ¶
func (i TransferStatus) String() string
func (*TransferStatus) UnmarshalJSON ¶
func (i *TransferStatus) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaler interface for TransferStatus
type TransferStore ¶
type TransferStore interface { Create(ctx context.Context, transfer *Transfer) error Assign(ctx context.Context, transfer *Transfer, offset uint64) error UpdateStatus(ctx context.Context, transfer *Transfer, to TransferStatus) error FindTrace(ctx context.Context, traceID string) (*Transfer, error) ListStatus(ctx context.Context, status TransferStatus, limit int) ([]*Transfer, error) GetAssignOffset(ctx context.Context, userID, assetID string) (uint64, error) }
type WalletService ¶ added in v1.1.0
Click to show internal directories.
Click to hide internal directories.