mock

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: May 30, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PreparedTransaction

type PreparedTransaction struct{}

func (*PreparedTransaction) AddCounterparty

func (p *PreparedTransaction) AddCounterparty(*models.Counterparty) error

func (*PreparedTransaction) AddEnvelope

func (*PreparedTransaction) Commit

func (p *PreparedTransaction) Commit() error

func (*PreparedTransaction) Created

func (p *PreparedTransaction) Created() bool

func (*PreparedTransaction) Fetch

func (*PreparedTransaction) Rollback

func (p *PreparedTransaction) Rollback() error

func (*PreparedTransaction) Update

type Store

type Store struct{}

Store implements the store.Store interface implemented as an in-memory mock interface for testing and development purposes.

func Open

func Open(uri *dsn.DSN) (*Store, error)

func (*Store) Close

func (s *Store) Close() error

func (*Store) CreateAPIKey

func (s *Store) CreateAPIKey(context.Context, *models.APIKey) error

func (*Store) CreateAccount

func (s *Store) CreateAccount(context.Context, *models.Account) error

func (*Store) CreateCounterparty

func (s *Store) CreateCounterparty(context.Context, *models.Counterparty) error

func (*Store) CreateCryptoAddress

func (s *Store) CreateCryptoAddress(context.Context, *models.CryptoAddress) error

func (*Store) CreateSecureEnvelope

func (s *Store) CreateSecureEnvelope(context.Context, *models.SecureEnvelope) error

func (*Store) CreateTransaction

func (s *Store) CreateTransaction(context.Context, *models.Transaction) error

func (*Store) CreateUser

func (s *Store) CreateUser(context.Context, *models.User) error

func (*Store) DeleteAPIKey

func (s *Store) DeleteAPIKey(ctx context.Context, keyID ulid.ULID) error

func (*Store) DeleteAccount

func (s *Store) DeleteAccount(ctx context.Context, id ulid.ULID) error

func (*Store) DeleteCounterparty

func (s *Store) DeleteCounterparty(ctx context.Context, counterpartyID ulid.ULID) error

func (*Store) DeleteCryptoAddress

func (s *Store) DeleteCryptoAddress(ctx context.Context, accountID, cryptoAddressID ulid.ULID) error

func (*Store) DeleteSecureEnvelope

func (s *Store) DeleteSecureEnvelope(ctx context.Context, txID uuid.UUID, envID ulid.ULID) error

func (*Store) DeleteTransaction

func (s *Store) DeleteTransaction(context.Context, uuid.UUID) error

func (*Store) DeleteUser

func (s *Store) DeleteUser(ctx context.Context, userID ulid.ULID) error

func (*Store) LatestSecureEnvelope added in v0.14.0

func (s *Store) LatestSecureEnvelope(ctx context.Context, txID uuid.UUID, direction string) (*models.SecureEnvelope, error)

func (*Store) ListAPIKeys

func (s *Store) ListAPIKeys(context.Context, *models.PageInfo) (*models.APIKeyPage, error)

func (*Store) ListAccounts

func (s *Store) ListAccounts(context.Context, *models.PageInfo) (*models.AccountsPage, error)

func (*Store) ListCounterparties

func (s *Store) ListCounterparties(ctx context.Context, page *models.PageInfo) (*models.CounterpartyPage, error)

func (*Store) ListCounterpartySourceInfo

func (s *Store) ListCounterpartySourceInfo(ctx context.Context, source string) ([]*models.CounterpartySourceInfo, error)

func (*Store) ListCryptoAddresses

func (s *Store) ListCryptoAddresses(ctx context.Context, accountID ulid.ULID, page *models.PageInfo) (*models.CryptoAddressPage, error)

func (*Store) ListSecureEnvelopes

func (s *Store) ListSecureEnvelopes(ctx context.Context, txID uuid.UUID, page *models.PageInfo) (*models.SecureEnvelopePage, error)

func (*Store) ListTransactions

func (s *Store) ListTransactions(context.Context, *models.PageInfo) (*models.TransactionPage, error)

func (*Store) ListUsers

func (s *Store) ListUsers(ctx context.Context, page *models.PageInfo) (*models.UserPage, error)

func (*Store) LookupCounterparty

func (s *Store) LookupCounterparty(ctx context.Context, commonName string) (*models.Counterparty, error)

func (*Store) PrepareTransaction

func (s *Store) PrepareTransaction(context.Context, uuid.UUID) (models.PreparedTransaction, error)

func (*Store) RetrieveAPIKey

func (s *Store) RetrieveAPIKey(ctx context.Context, clientIDOrKeyID any) (*models.APIKey, error)

func (*Store) RetrieveAccount

func (s *Store) RetrieveAccount(ctx context.Context, id ulid.ULID) (*models.Account, error)

func (*Store) RetrieveCounterparty

func (s *Store) RetrieveCounterparty(ctx context.Context, counterpartyID ulid.ULID) (*models.Counterparty, error)

func (*Store) RetrieveCryptoAddress

func (s *Store) RetrieveCryptoAddress(ctx context.Context, accountID, cryptoAddressID ulid.ULID) (*models.CryptoAddress, error)

func (*Store) RetrieveSecureEnvelope

func (s *Store) RetrieveSecureEnvelope(ctx context.Context, txID uuid.UUID, envID ulid.ULID) (*models.SecureEnvelope, error)

func (*Store) RetrieveTransaction

func (s *Store) RetrieveTransaction(context.Context, uuid.UUID) (*models.Transaction, error)

func (*Store) RetrieveUser

func (s *Store) RetrieveUser(ctx context.Context, emailOrUserID any) (*models.User, error)

func (*Store) SetUserPassword

func (s *Store) SetUserPassword(ctx context.Context, userID ulid.ULID, password string) (err error)

func (*Store) UpdateAPIKey

func (s *Store) UpdateAPIKey(context.Context, *models.APIKey) error

func (*Store) UpdateAccount

func (s *Store) UpdateAccount(context.Context, *models.Account) error

func (*Store) UpdateCounterparty

func (s *Store) UpdateCounterparty(context.Context, *models.Counterparty) error

func (*Store) UpdateCryptoAddress

func (s *Store) UpdateCryptoAddress(context.Context, *models.CryptoAddress) error

func (*Store) UpdateSecureEnvelope

func (s *Store) UpdateSecureEnvelope(context.Context, *models.SecureEnvelope) error

func (*Store) UpdateTransaction

func (s *Store) UpdateTransaction(context.Context, *models.Transaction) error

func (*Store) UpdateUser

func (s *Store) UpdateUser(context.Context, *models.User) error

func (*Store) UseTravelAddressFactory

func (s *Store) UseTravelAddressFactory(models.TravelAddressFactory)

Jump to

Keyboard shortcuts

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