Documentation ¶
Index ¶
Constants ¶
View Source
const ( Unknown = ttxdb.Unknown // Pending is the status of a transaction that has been submitted to the ledger Pending = ttxdb.Pending // Confirmed is the status of a transaction that has been confirmed by the ledger Confirmed = ttxdb.Confirmed // Deleted is the status of a transaction that has been deleted due to a failure to commit Deleted = ttxdb.Deleted )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager handles the databases
func NewManager ¶
func NewManager(sp view.ServiceProvider, kvs KVS) *Manager
NewManager creates a new Auditor manager.
type Owner ¶
type Owner struct {
// contains filtered or unexported fields
}
Owner is the interface for the owner service
func Get ¶
func Get(sp view.ServiceProvider, tms *token.ManagementService) *Owner
Get returns the Owner instance for the passed TMS
func New ¶
func New(sp view.ServiceProvider, tms *token.ManagementService) *Owner
New returns the Owner instance for the passed TMS
func (*Owner) Append ¶
func (a *Owner) Append(tx Transaction) error
Append adds the passed transaction to the database
func (*Owner) GetStatus ¶ added in v0.3.0
GetStatus return the status of the given transaction id. It returns an error if no transaction with that id is found
func (*Owner) GetTokenRequest ¶ added in v0.3.0
GetTokenRequest returns the token request bound to the passed transaction id, if available.
func (*Owner) NewQueryExecutor ¶
func (a *Owner) NewQueryExecutor() *QueryExecutor
NewQueryExecutor returns a new query executor
type QueryExecutor ¶
type QueryExecutor struct {
*ttxdb.QueryExecutor
}
QueryExecutor defines the interface for the query executor
type QueryTransactionsParams ¶
type QueryTransactionsParams = ttxdb.QueryTransactionsParams
type Transaction ¶
type Transaction interface { ID() string Network() string Channel() string Request() *token.Request }
Transaction models a token transaction
type TxStatusChangesListener ¶
type TxStatusChangesListener struct {
// contains filtered or unexported fields
}
func (*TxStatusChangesListener) OnStatusChange ¶
func (t *TxStatusChangesListener) OnStatusChange(txID string, status int) error
Click to show internal directories.
Click to hide internal directories.