owner

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// 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 Entry

type Entry struct {
	TMSID token.TMSID
}

type KVS

type KVS interface {
	Exists(id string) bool
	Put(id string, state interface{}) error
	Get(id string, state interface{}) error
}

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.

func (*Manager) Owner

func (cm *Manager) Owner(tms *token.ManagementService) (*Owner, error)

Owner returns the Owner for the given TMS

func (*Manager) Restore

func (cm *Manager) Restore() error

type Owner

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

Owner is the interface for the owner service

func Get

Get returns the Owner instance for the passed TMS

func New

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

func (a *Owner) NewQueryExecutor() *QueryExecutor

NewQueryExecutor returns a new query executor

func (*Owner) SetStatus

func (a *Owner) SetStatus(txID string, status TxStatus) error

SetStatus sets the status of the audit records with the passed transaction id to the passed status

type QueryExecutor

type QueryExecutor struct {
	*ttxdb.QueryExecutor
}

QueryExecutor defines the interface for the query executor

func (*QueryExecutor) Done

func (a *QueryExecutor) Done()

Done closes the query executor. It must be called when the query executor is no longer needed.

func (*QueryExecutor) NewHoldingsFilter

func (a *QueryExecutor) NewHoldingsFilter() *ttxdb.HoldingsFilter

NewHoldingsFilter returns a new filter for holdings

func (*QueryExecutor) NewPaymentsFilter

func (a *QueryExecutor) NewPaymentsFilter() *ttxdb.PaymentsFilter

NewPaymentsFilter returns a new filter for payments

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 TxStatus

type TxStatus = ttxdb.TxStatus

TxStatus is the status of a transaction

type TxStatusChangesListener

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

func (*TxStatusChangesListener) OnStatusChange

func (t *TxStatusChangesListener) OnStatusChange(txID string, status int) error

Jump to

Keyboard shortcuts

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