Documentation
¶
Index ¶
- Constants
- func Close(closer Closer)
- func HasMovementsParams(params driver.QueryMovementsParams) cond.Condition
- func HasTokenDetails(params driver.QueryTokenDetailsParams, tokenTable common.Table) cond.Condition
- func HasTokens(colTxID, colIdx common.FieldName, ids ...*token.ID) cond.Condition
- func HasTransactionParams(params driver.QueryTransactionsParams, table common.Table) cond.Condition
- func HasValidationParams(params driver.QueryValidationRecordsParams) cond.Condition
- func IsExpiredToken(tokenRequests, tokenLocks common3.Table, leaseExpiry time.Duration) cond.Condition
- func TestAWAddMovement(t *testing.T, store transactionsStoreConstructor)
- func TestAWAddTokenRequest(t *testing.T, store transactionsStoreConstructor)
- func TestAWAddTransaction(t *testing.T, store transactionsStoreConstructor)
- func TestAWAddValidationRecord(t *testing.T, store transactionsStoreConstructor)
- func TestAddTransactionEndorsementAck(t *testing.T, store transactionsStoreConstructor)
- func TestGetStatus(t *testing.T, store transactionsStoreConstructor)
- func TestGetTokenRequest(t *testing.T, store transactionsStoreConstructor)
- func TestGetTransactionEndorsementAcks(t *testing.T, store transactionsStoreConstructor)
- func TestGetWalletID(t *testing.T, store walletStoreConstructor)
- func TestGetWalletIDs(t *testing.T, store walletStoreConstructor)
- func TestIdentityExists(t *testing.T, store walletStoreConstructor)
- func TestLoadMeta(t *testing.T, store walletStoreConstructor)
- func TestLock(t *testing.T, store tokenLockStoreConstructor)
- func TestQueryMovements(t *testing.T, store transactionsStoreConstructor, ...)
- func TestQueryTokenRequests(t *testing.T, store transactionsStoreConstructor, ...)
- func TestQueryTransactions(t *testing.T, store transactionsStoreConstructor)
- func TestQueryValidations(t *testing.T, store transactionsStoreConstructor, ...)
- func TestSetStatus(t *testing.T, store transactionsStoreConstructor)
- func TestStoreIdentity(t *testing.T, store walletStoreConstructor)
- func TestUnlockByTxID(t *testing.T, store tokenLockStoreConstructor)
- type AnyUUID
- type AtomicWrite
- func (w *AtomicWrite) AddMovement(ctx context.Context, rs ...driver.MovementRecord) error
- func (w *AtomicWrite) AddTokenRequest(ctx context.Context, txID string, tr []byte, ...) error
- func (w *AtomicWrite) AddTransaction(ctx context.Context, rs ...driver.TransactionRecord) error
- func (w *AtomicWrite) AddValidationRecord(ctx context.Context, txID string, meta map[string][]byte) error
- func (w *AtomicWrite) Commit() error
- func (w *AtomicWrite) Rollback()
- type Closer
- type Delete
- type IdentityConfigurationIterator
- type IdentityStore
- func (db *IdentityStore) AddConfiguration(ctx context.Context, wp driver.IdentityConfiguration) error
- func (db *IdentityStore) Close() error
- func (db *IdentityStore) ConfigurationExists(ctx context.Context, id, typ, url string) (bool, error)
- func (db *IdentityStore) CreateSchema() error
- func (db *IdentityStore) GetAuditInfo(ctx context.Context, id []byte) ([]byte, error)
- func (db *IdentityStore) GetExistingSignerInfo(ctx context.Context, ids ...tdriver.Identity) ([]string, error)
- func (db *IdentityStore) GetSchema() string
- func (db *IdentityStore) GetSignerInfo(ctx context.Context, identity []byte) ([]byte, error)
- func (db *IdentityStore) GetTokenInfo(ctx context.Context, id []byte) ([]byte, []byte, error)
- func (db *IdentityStore) IteratorConfigurations(ctx context.Context, configurationType string) (driver3.IdentityConfigurationIterator, error)
- func (db *IdentityStore) SignerInfoExists(ctx context.Context, id []byte) (bool, error)
- func (db *IdentityStore) StoreIdentityData(ctx context.Context, id []byte, identityAudit []byte, tokenMetadata []byte, ...) error
- func (db *IdentityStore) StoreSignerInfo(ctx context.Context, id, info []byte) error
- type Insert
- type PersistenceConstructor
- type QueryConstructorTraits
- type Select
- type TableNames
- type TokenLockStore
- func (db *TokenLockStore) Close() error
- func (db *TokenLockStore) CreateSchema() error
- func (db *TokenLockStore) GetSchema() string
- func (db *TokenLockStore) Lock(ctx context.Context, tokenID *token.ID, consumerTxID transaction.ID) error
- func (db *TokenLockStore) UnlockByTxID(ctx context.Context, consumerTxID transaction.ID) error
- type TokenStore
- func (db *TokenStore) Balance(ctx context.Context, walletID string, typ token.Type) (uint64, error)
- func (db *TokenStore) Close() error
- func (db *TokenStore) CreateSchema() error
- func (db *TokenStore) DeleteTokens(ctx context.Context, deletedBy string, ids ...*token.ID) error
- func (db *TokenStore) ExistsCertification(ctx context.Context, tokenID *token.ID) bool
- func (db *TokenStore) GetAllTokenInfos(ctx context.Context, ids []*token.ID) ([][]byte, error)
- func (db *TokenStore) GetCertifications(ctx context.Context, ids []*token.ID) ([][]byte, error)
- func (db *TokenStore) GetSchema() string
- func (db *TokenStore) GetTokenMetadata(ctx context.Context, ids []*token.ID) ([][]byte, error)
- func (db *TokenStore) GetTokenOutputs(ctx context.Context, ids []*token.ID, callback tdriver.QueryCallbackFunc) error
- func (db *TokenStore) GetTokenOutputsAndMeta(ctx context.Context, ids []*token.ID) ([][]byte, [][]byte, []token.Format, error)
- func (db *TokenStore) GetTokens(ctx context.Context, inputs ...*token.ID) ([]*token.Token, error)
- func (db *TokenStore) IsMine(ctx context.Context, txID string, index uint64) (bool, error)
- func (db *TokenStore) ListAuditTokens(ctx context.Context, ids ...*token.ID) ([]*token.Token, error)
- func (db *TokenStore) ListHistoryIssuedTokens(ctx context.Context) (*token.IssuedTokens, error)
- func (db *TokenStore) ListUnspentTokens(ctx context.Context) (*token.UnspentTokens, error)
- func (db *TokenStore) ListUnspentTokensBy(ctx context.Context, walletID string, typ token.Type) (*token.UnspentTokens, error)
- func (db *TokenStore) NewTokenDBTransaction() (driver.TokenStoreTransaction, error)
- func (db *TokenStore) PublicParams(ctx context.Context) ([]byte, error)
- func (db *TokenStore) PublicParamsByHash(ctx context.Context, rawHash tdriver.PPHash) ([]byte, error)
- func (db *TokenStore) QueryTokenDetails(ctx context.Context, params driver.QueryTokenDetailsParams) ([]driver.TokenDetails, error)
- func (db *TokenStore) SetSupportedTokenFormats(formats []token.Format) error
- func (db *TokenStore) SpendableTokensIteratorBy(ctx context.Context, walletID string, typ token.Type) (tdriver.SpendableTokensIterator, error)
- func (db *TokenStore) StoreCertifications(ctx context.Context, certifications map[*token.ID][]byte) error
- func (db *TokenStore) StorePublicParams(ctx context.Context, raw []byte) error
- func (db *TokenStore) StoreToken(ctx context.Context, tr driver.TokenRecord, owners []string) (err error)
- func (db *TokenStore) TransactionExists(ctx context.Context, id string) (bool, error)
- func (db *TokenStore) UnspentLedgerTokensIteratorBy(ctx context.Context) (tdriver.LedgerTokensIterator, error)
- func (db *TokenStore) UnspentTokensIterator(ctx context.Context) (tdriver.UnspentTokensIterator, error)
- func (db *TokenStore) UnspentTokensIteratorBy(ctx context.Context, walletID string, tokenType token.Type) (tdriver.UnspentTokensIterator, error)
- func (db *TokenStore) UnsupportedTokensIteratorBy(ctx context.Context, walletID string, tokenType token.Type) (tdriver.UnsupportedTokensIterator, error)
- func (db *TokenStore) WhoDeletedTokens(ctx context.Context, inputs ...*token.ID) ([]string, []bool, error)
- type TokenTransaction
- func (t *TokenTransaction) Commit() error
- func (t *TokenTransaction) Delete(ctx context.Context, tokenID token.ID, deletedBy string) error
- func (t *TokenTransaction) GetToken(ctx context.Context, tokenID token.ID, includeDeleted bool) (*token.Token, []string, error)
- func (t *TokenTransaction) Rollback() error
- func (t *TokenTransaction) SetSpendable(ctx context.Context, tokenID token.ID, spendable bool) error
- func (t *TokenTransaction) SetSpendableBySupportedTokenFormats(ctx context.Context, formats []token.Format) error
- func (t *TokenTransaction) StoreToken(ctx context.Context, tr driver.TokenRecord, owners []string) error
- type TransactionStore
- func (db *TransactionStore) AddTransactionEndorsementAck(ctx context.Context, txID string, endorser token.Identity, sigma []byte) (err error)
- func (db *TransactionStore) BeginAtomicWrite() (driver.AtomicWrite, error)
- func (db *TransactionStore) Close() error
- func (db *TransactionStore) CreateSchema() error
- func (db *TransactionStore) GetSchema() string
- func (db *TransactionStore) GetStatus(ctx context.Context, txID string) (driver.TxStatus, string, error)
- func (db *TransactionStore) GetTokenRequest(ctx context.Context, txID string) ([]byte, error)
- func (db *TransactionStore) GetTransactionEndorsementAcks(ctx context.Context, txID string) (map[string][]byte, error)
- func (db *TransactionStore) QueryMovements(ctx context.Context, params driver.QueryMovementsParams) (res []*driver.MovementRecord, err error)
- func (db *TransactionStore) QueryTokenRequests(ctx context.Context, params driver.QueryTokenRequestsParams) (driver.TokenRequestIterator, error)
- func (db *TransactionStore) QueryTransactions(ctx context.Context, params driver.QueryTransactionsParams, ...) (*driver3.PageIterator[*driver.TransactionRecord], error)
- func (db *TransactionStore) QueryValidations(ctx context.Context, params driver.QueryValidationRecordsParams) (driver.ValidationRecordsIterator, error)
- func (db *TransactionStore) SetStatus(ctx context.Context, txID string, status driver.TxStatus, message string) error
- type Update
- type WalletStore
- func (db *WalletStore) Close() error
- func (db *WalletStore) CreateSchema() error
- func (db *WalletStore) GetSchema() string
- func (db *WalletStore) GetWalletID(ctx context.Context, identity token.Identity, roleID int) (driver.WalletID, error)
- func (db *WalletStore) GetWalletIDs(ctx context.Context, roleID int) ([]driver.WalletID, error)
- func (db *WalletStore) IdentityExists(ctx context.Context, identity token.Identity, wID driver.WalletID, roleID int) bool
- func (db *WalletStore) LoadMeta(ctx context.Context, identity token.Identity, wID driver.WalletID, roleID int) ([]byte, error)
- func (db *WalletStore) StoreIdentity(ctx context.Context, identity token.Identity, eID string, wID driver.WalletID, ...) error
Constants ¶
const ( SelectStatement = `SELECT` SelectDistinctStatement = `SELECT DISTINCT` InsertStatement = `INSERT INTO` UpdateStatement = `UPDATE` DeleteStatement = `DELETE FROM` )
Variables ¶
This section is empty.
Functions ¶
func HasMovementsParams ¶ added in v0.5.0
func HasMovementsParams(params driver.QueryMovementsParams) cond.Condition
func HasTokenDetails ¶ added in v0.5.0
func HasTransactionParams ¶ added in v0.5.0
func HasValidationParams ¶ added in v0.5.0
func HasValidationParams(params driver.QueryValidationRecordsParams) cond.Condition
func IsExpiredToken ¶ added in v0.5.0
func TestAWAddMovement ¶ added in v0.5.0
func TestAWAddTokenRequest ¶ added in v0.5.0
func TestAWAddTransaction ¶ added in v0.5.0
func TestAWAddValidationRecord ¶ added in v0.5.0
func TestAddTransactionEndorsementAck ¶ added in v0.5.0
func TestGetStatus ¶ added in v0.5.0
func TestGetTokenRequest ¶ added in v0.5.0
func TestGetTransactionEndorsementAcks ¶ added in v0.5.0
func TestGetWalletID ¶ added in v0.5.0
func TestGetWalletIDs ¶ added in v0.5.0
func TestIdentityExists ¶ added in v0.5.0
func TestLoadMeta ¶ added in v0.5.0
func TestQueryMovements ¶ added in v0.5.0
func TestQueryMovements(t *testing.T, store transactionsStoreConstructor, traits QueryConstructorTraits)
func TestQueryTokenRequests ¶ added in v0.5.0
func TestQueryTokenRequests(t *testing.T, store transactionsStoreConstructor, traits QueryConstructorTraits)
func TestQueryTransactions ¶ added in v0.5.0
func TestQueryValidations ¶ added in v0.5.0
func TestQueryValidations(t *testing.T, store transactionsStoreConstructor, traits QueryConstructorTraits)
func TestSetStatus ¶ added in v0.5.0
func TestStoreIdentity ¶ added in v0.5.0
func TestUnlockByTxID ¶ added in v0.5.0
Types ¶
type AtomicWrite ¶
type AtomicWrite struct {
// contains filtered or unexported fields
}
func (*AtomicWrite) AddMovement ¶
func (w *AtomicWrite) AddMovement(ctx context.Context, rs ...driver.MovementRecord) error
func (*AtomicWrite) AddTokenRequest ¶
func (*AtomicWrite) AddTransaction ¶
func (w *AtomicWrite) AddTransaction(ctx context.Context, rs ...driver.TransactionRecord) error
func (*AtomicWrite) AddValidationRecord ¶
func (*AtomicWrite) Commit ¶
func (w *AtomicWrite) Commit() error
func (*AtomicWrite) Rollback ¶
func (w *AtomicWrite) Rollback()
type IdentityConfigurationIterator ¶
type IdentityConfigurationIterator struct {
// contains filtered or unexported fields
}
func (*IdentityConfigurationIterator) Close ¶
func (w *IdentityConfigurationIterator) Close() error
func (*IdentityConfigurationIterator) HasNext ¶
func (w *IdentityConfigurationIterator) HasNext() bool
func (*IdentityConfigurationIterator) Next ¶
func (w *IdentityConfigurationIterator) Next() (driver.IdentityConfiguration, error)
type IdentityStore ¶ added in v0.5.0
type IdentityStore struct {
// contains filtered or unexported fields
}
func NewCachedIdentityStore ¶ added in v0.5.0
func NewCachedIdentityStore(readDB, writeDB *sql.DB, tables TableNames, ci common3.CondInterpreter) (*IdentityStore, error)
func NewIdentityStore ¶ added in v0.5.0
func NewIdentityStore(readDB, writeDB *sql.DB, tables TableNames, signerInfoCache cache[bool], auditInfoCache cache[[]byte], ci common3.CondInterpreter) (*IdentityStore, error)
func (*IdentityStore) AddConfiguration ¶ added in v0.5.0
func (db *IdentityStore) AddConfiguration(ctx context.Context, wp driver.IdentityConfiguration) error
func (*IdentityStore) Close ¶ added in v0.5.0
func (db *IdentityStore) Close() error
func (*IdentityStore) ConfigurationExists ¶ added in v0.5.0
func (*IdentityStore) CreateSchema ¶ added in v0.5.0
func (db *IdentityStore) CreateSchema() error
func (*IdentityStore) GetAuditInfo ¶ added in v0.5.0
func (*IdentityStore) GetExistingSignerInfo ¶ added in v0.5.0
func (*IdentityStore) GetSchema ¶ added in v0.5.0
func (db *IdentityStore) GetSchema() string
func (*IdentityStore) GetSignerInfo ¶ added in v0.5.0
func (*IdentityStore) GetTokenInfo ¶ added in v0.5.0
func (*IdentityStore) IteratorConfigurations ¶ added in v0.5.0
func (db *IdentityStore) IteratorConfigurations(ctx context.Context, configurationType string) (driver3.IdentityConfigurationIterator, error)
func (*IdentityStore) SignerInfoExists ¶ added in v0.5.0
func (*IdentityStore) StoreIdentityData ¶ added in v0.5.0
func (*IdentityStore) StoreSignerInfo ¶ added in v0.5.0
func (db *IdentityStore) StoreSignerInfo(ctx context.Context, id, info []byte) error
type PersistenceConstructor ¶ added in v0.5.0
type QueryConstructorTraits ¶ added in v0.5.0
type Select ¶
type Select struct {
// contains filtered or unexported fields
}
func NewSelectDistinct ¶
type TableNames ¶ added in v0.5.0
type TableNames struct { Movements string Transactions string Requests string Validations string TransactionEndorseAck string Certifications string Tokens string Ownership string PublicParams string Wallets string IdentityConfigurations string IdentityInfo string Signers string TokenLocks string }
func GetTableNames ¶
func GetTableNames(prefix string, params ...string) (TableNames, error)
type TokenLockStore ¶ added in v0.5.0
type TokenLockStore struct { ReadDB *sql.DB WriteDB *sql.DB Table tokenLockTables Logger logging.Logger // contains filtered or unexported fields }
func NewTokenLockStore ¶ added in v0.5.0
func NewTokenLockStore(readDB, writeDB *sql.DB, tables TableNames, ci common3.CondInterpreter) (*TokenLockStore, error)
func (*TokenLockStore) Close ¶ added in v0.5.0
func (db *TokenLockStore) Close() error
func (*TokenLockStore) CreateSchema ¶ added in v0.5.0
func (db *TokenLockStore) CreateSchema() error
func (*TokenLockStore) GetSchema ¶ added in v0.5.0
func (db *TokenLockStore) GetSchema() string
func (*TokenLockStore) Lock ¶ added in v0.5.0
func (db *TokenLockStore) Lock(ctx context.Context, tokenID *token.ID, consumerTxID transaction.ID) error
func (*TokenLockStore) UnlockByTxID ¶ added in v0.5.0
func (db *TokenLockStore) UnlockByTxID(ctx context.Context, consumerTxID transaction.ID) error
type TokenStore ¶ added in v0.5.0
type TokenStore struct {
// contains filtered or unexported fields
}
func NewTokenStore ¶ added in v0.5.0
func NewTokenStore(readDB, writeDB *sql.DB, tables TableNames, ci common3.CondInterpreter) (*TokenStore, error)
func (*TokenStore) Balance ¶ added in v0.5.0
Balance returns the sun of the amounts, with 64 bits of precision, of the tokens with type and EID equal to those passed as arguments.
func (*TokenStore) Close ¶ added in v0.5.0
func (db *TokenStore) Close() error
func (*TokenStore) CreateSchema ¶ added in v0.5.0
func (db *TokenStore) CreateSchema() error
func (*TokenStore) DeleteTokens ¶ added in v0.5.0
DeleteTokens deletes multiple tokens at the same time (when spent, invalid or expired)
func (*TokenStore) ExistsCertification ¶ added in v0.5.0
func (*TokenStore) GetAllTokenInfos ¶ added in v0.5.0
GetAllTokenInfos retrieves the token information for the passed ids.
func (*TokenStore) GetCertifications ¶ added in v0.5.0
func (*TokenStore) GetSchema ¶ added in v0.5.0
func (db *TokenStore) GetSchema() string
func (*TokenStore) GetTokenMetadata ¶ added in v0.5.0
GetTokenMetadata retrieves the token metadata for the passed ids. For each id, the callback is invoked to unmarshal the token metadata
func (*TokenStore) GetTokenOutputs ¶ added in v0.5.0
func (db *TokenStore) GetTokenOutputs(ctx context.Context, ids []*token.ID, callback tdriver.QueryCallbackFunc) error
func (*TokenStore) GetTokenOutputsAndMeta ¶ added in v0.5.0
func (db *TokenStore) GetTokenOutputsAndMeta(ctx context.Context, ids []*token.ID) ([][]byte, [][]byte, []token.Format, error)
GetTokenOutputsAndMeta retrieves both the token output, metadata, and type for the passed ids.
func (*TokenStore) GetTokens ¶ added in v0.5.0
GetTokens returns the owned tokens and their identifier keys for the passed ids.
func (*TokenStore) IsMine ¶ added in v0.5.0
IsMine just checks if the token is in the local storage and not deleted
func (*TokenStore) ListAuditTokens ¶ added in v0.5.0
func (db *TokenStore) ListAuditTokens(ctx context.Context, ids ...*token.ID) ([]*token.Token, error)
ListAuditTokens returns the audited tokens associated to the passed ids
func (*TokenStore) ListHistoryIssuedTokens ¶ added in v0.5.0
func (db *TokenStore) ListHistoryIssuedTokens(ctx context.Context) (*token.IssuedTokens, error)
ListHistoryIssuedTokens returns the list of issued tokens
func (*TokenStore) ListUnspentTokens ¶ added in v0.5.0
func (db *TokenStore) ListUnspentTokens(ctx context.Context) (*token.UnspentTokens, error)
ListUnspentTokens returns the list of unspent tokens
func (*TokenStore) ListUnspentTokensBy ¶ added in v0.5.0
func (db *TokenStore) ListUnspentTokensBy(ctx context.Context, walletID string, typ token.Type) (*token.UnspentTokens, error)
ListUnspentTokensBy returns the list of unspent tokens, filtered by owner and token type
func (*TokenStore) NewTokenDBTransaction ¶ added in v0.5.0
func (db *TokenStore) NewTokenDBTransaction() (driver.TokenStoreTransaction, error)
func (*TokenStore) PublicParams ¶ added in v0.5.0
func (db *TokenStore) PublicParams(ctx context.Context) ([]byte, error)
func (*TokenStore) PublicParamsByHash ¶ added in v0.5.0
func (*TokenStore) QueryTokenDetails ¶ added in v0.5.0
func (db *TokenStore) QueryTokenDetails(ctx context.Context, params driver.QueryTokenDetailsParams) ([]driver.TokenDetails, error)
QueryTokenDetails returns details about owned tokens, regardless if they have been spent or not. Filters work cumulatively and may be left empty. If a token is owned by two enrollmentIDs and there is no filter on enrollmentID, the token will be returned twice (once for each owner).
func (*TokenStore) SetSupportedTokenFormats ¶ added in v0.5.0
func (db *TokenStore) SetSupportedTokenFormats(formats []token.Format) error
func (*TokenStore) SpendableTokensIteratorBy ¶ added in v0.5.0
func (db *TokenStore) SpendableTokensIteratorBy(ctx context.Context, walletID string, typ token.Type) (tdriver.SpendableTokensIterator, error)
SpendableTokensIteratorBy returns the minimum information about the tokens needed for the selector
func (*TokenStore) StoreCertifications ¶ added in v0.5.0
func (*TokenStore) StorePublicParams ¶ added in v0.5.0
func (db *TokenStore) StorePublicParams(ctx context.Context, raw []byte) error
func (*TokenStore) StoreToken ¶ added in v0.5.0
func (db *TokenStore) StoreToken(ctx context.Context, tr driver.TokenRecord, owners []string) (err error)
func (*TokenStore) TransactionExists ¶ added in v0.5.0
func (*TokenStore) UnspentLedgerTokensIteratorBy ¶ added in v0.5.0
func (db *TokenStore) UnspentLedgerTokensIteratorBy(ctx context.Context) (tdriver.LedgerTokensIterator, error)
UnspentLedgerTokensIteratorBy returns an iterator over all unspent ledger tokens
func (*TokenStore) UnspentTokensIterator ¶ added in v0.5.0
func (db *TokenStore) UnspentTokensIterator(ctx context.Context) (tdriver.UnspentTokensIterator, error)
UnspentTokensIterator returns an iterator over all unspent tokens
func (*TokenStore) UnspentTokensIteratorBy ¶ added in v0.5.0
func (db *TokenStore) UnspentTokensIteratorBy(ctx context.Context, walletID string, tokenType token.Type) (tdriver.UnspentTokensIterator, error)
UnspentTokensIteratorBy returns an iterator of unspent tokens owned by the passed id and whose type is the passed on. The token type can be empty. In that case, tokens of any type are returned.
func (*TokenStore) UnsupportedTokensIteratorBy ¶ added in v0.5.0
func (db *TokenStore) UnsupportedTokensIteratorBy(ctx context.Context, walletID string, tokenType token.Type) (tdriver.UnsupportedTokensIterator, error)
UnsupportedTokensIteratorBy returns the minimum information for upgrade about the tokens that are not supported
func (*TokenStore) WhoDeletedTokens ¶ added in v0.5.0
func (db *TokenStore) WhoDeletedTokens(ctx context.Context, inputs ...*token.ID) ([]string, []bool, error)
WhoDeletedTokens returns information about which transaction deleted the passed tokens. The bool array is an indicator used to tell if the token at a given position has been deleted or not
type TokenTransaction ¶
type TokenTransaction struct {
// contains filtered or unexported fields
}
func (*TokenTransaction) Commit ¶
func (t *TokenTransaction) Commit() error
func (*TokenTransaction) Rollback ¶
func (t *TokenTransaction) Rollback() error
func (*TokenTransaction) SetSpendable ¶
func (*TokenTransaction) SetSpendableBySupportedTokenFormats ¶
func (*TokenTransaction) StoreToken ¶
func (t *TokenTransaction) StoreToken(ctx context.Context, tr driver.TokenRecord, owners []string) error
type TransactionStore ¶ added in v0.5.0
type TransactionStore struct {
// contains filtered or unexported fields
}
func NewAuditTransactionStore ¶ added in v0.5.0
func NewAuditTransactionStore(readDB, writeDB *sql.DB, tables TableNames, ci common3.CondInterpreter, pi common3.PagInterpreter) (*TransactionStore, error)
func NewOwnerTransactionStore ¶ added in v0.5.0
func NewOwnerTransactionStore(readDB, writeDB *sql.DB, tables TableNames, ci common3.CondInterpreter, pi common3.PagInterpreter) (*TransactionStore, error)
func (*TransactionStore) AddTransactionEndorsementAck ¶ added in v0.5.0
func (*TransactionStore) BeginAtomicWrite ¶ added in v0.5.0
func (db *TransactionStore) BeginAtomicWrite() (driver.AtomicWrite, error)
func (*TransactionStore) Close ¶ added in v0.5.0
func (db *TransactionStore) Close() error
func (*TransactionStore) CreateSchema ¶ added in v0.5.0
func (db *TransactionStore) CreateSchema() error
func (*TransactionStore) GetSchema ¶ added in v0.5.0
func (db *TransactionStore) GetSchema() string
func (*TransactionStore) GetTokenRequest ¶ added in v0.5.0
func (*TransactionStore) GetTransactionEndorsementAcks ¶ added in v0.5.0
func (*TransactionStore) QueryMovements ¶ added in v0.5.0
func (db *TransactionStore) QueryMovements(ctx context.Context, params driver.QueryMovementsParams) (res []*driver.MovementRecord, err error)
func (*TransactionStore) QueryTokenRequests ¶ added in v0.5.0
func (db *TransactionStore) QueryTokenRequests(ctx context.Context, params driver.QueryTokenRequestsParams) (driver.TokenRequestIterator, error)
QueryTokenRequests returns an iterator over the token requests matching the passed params
func (*TransactionStore) QueryTransactions ¶ added in v0.5.0
func (db *TransactionStore) QueryTransactions(ctx context.Context, params driver.QueryTransactionsParams, pagination driver3.Pagination) (*driver3.PageIterator[*driver.TransactionRecord], error)
func (*TransactionStore) QueryValidations ¶ added in v0.5.0
func (db *TransactionStore) QueryValidations(ctx context.Context, params driver.QueryValidationRecordsParams) (driver.ValidationRecordsIterator, error)
type WalletStore ¶ added in v0.5.0
type WalletStore struct {
// contains filtered or unexported fields
}
func NewWalletStore ¶ added in v0.5.0
func NewWalletStore(readDB, writeDB *sql.DB, tables TableNames, ci common3.CondInterpreter) (*WalletStore, error)
func (*WalletStore) Close ¶ added in v0.5.0
func (db *WalletStore) Close() error
func (*WalletStore) CreateSchema ¶ added in v0.5.0
func (db *WalletStore) CreateSchema() error
func (*WalletStore) GetSchema ¶ added in v0.5.0
func (db *WalletStore) GetSchema() string