Documentation ¶
Overview ¶
Package accountdbout defines the output database adapters for the Account resource.
Index ¶
- type Repository
- func (repository *Repository) Add(ctx context.Context, data user.Account) (*user.Account, error)
- func (repository *Repository) All(ctx context.Context, filters user.AccountFilters) (*user.AccountCollection, error)
- func (repository *Repository) Filter(applicationID string) user.AccountFilters
- func (repository *Repository) Get(ctx context.Context, id user.AccountID) (*user.Account, error)
- func (repository *Repository) Remove(ctx context.Context, id user.AccountID) (*user.Account, error)
- func (repository *Repository) RemoveAllForAddress(ctx context.Context, applicationID string, address address.Address) (*user.AccountCollection, error)
- type RepositoryOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Repository ¶
type Repository struct {
// contains filtered or unexported fields
}
Repository implementation of account.AccountStorage
func NewRepository ¶
func NewRepository(options RepositoryOptions) (*Repository, error)
NewRepository creates a Repository with the given options
func (*Repository) All ¶
func (repository *Repository) All(ctx context.Context, filters user.AccountFilters) (*user.AccountCollection, error)
All retrieves all Accounts from the storage.
func (*Repository) Filter ¶
func (repository *Repository) Filter(applicationID string) user.AccountFilters
Filter creates a new filter for the provided application.
func (*Repository) RemoveAllForAddress ¶
func (repository *Repository) RemoveAllForAddress(ctx context.Context, applicationID string, address address.Address) (*user.AccountCollection, error)
RemoveAllForAddress all Account for a given address and application from storage.
type RepositoryOptions ¶
type RepositoryOptions struct {
Infra *accountdb.AccountRepositoryInfra
}
RepositoryOptions configures a Repository
Click to show internal directories.
Click to hide internal directories.