Documentation ¶
Index ¶
- type AccountApplicationAddresses
- type AccountCreateDB
- type AccountDB
- type AccountDBFilter
- type AccountID
- type AccountRepositoryInfra
- func (repository *AccountRepositoryInfra) Add(ctx context.Context, db AccountCreateDB) (*AccountDB, error)
- func (repository *AccountRepositoryInfra) Get(ctx context.Context, input AccountID) ([]AccountDB, error)
- func (repository *AccountRepositoryInfra) List(ctx context.Context, filters AccountDBFilter) ([]AccountDB, error)
- func (repository *AccountRepositoryInfra) Remove(ctx context.Context, input AccountID) (*persistence.ExecuteStmtWithStorageResultOutput, error)
- func (repository *AccountRepositoryInfra) RemoveAllForAddress(ctx context.Context, input AccountApplicationAddresses) (*persistence.ExecuteStmtWithStorageResultOutput, error)
- type AccountRepositoryInfraOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccountApplicationAddresses ¶
type AccountApplicationAddresses struct { // Address is the Ethereum account to interact with the network Address string `storage:"address"` // ApplicationID the ID of the Application associated to this account ApplicationID string `storage:"application_id"` }
AccountApplicationAddresses filters a list of accounts based on their Application
type AccountCreateDB ¶
type AccountCreateDB struct { // AccountDB is the data struct of the resource in the database AccountDB }
AccountCreateDB is the data struct of the creation of a resource in the database
type AccountDB ¶
type AccountDB struct { // InternalResourceID is the ID used to reference a resource internally in the application InternalResourceID string `storage:"internal_resource_id"` // Address is the Ethereum account to interact with the network Address string `storage:"address"` // ApplicationID the ID of the Application associated to this account ApplicationID string `storage:"application_id"` // UserID the ID of the User associated to this account UserID string `storage:"user_id"` // CreationDate is the timestamp of the moment of the creation of the resource CreationDate int64 `storage:"creation_date"` // LastUpdate is the timestamp of the moment of the last edition of the resource LastUpdate int64 `storage:"last_update"` }
AccountDB is the data struct of the resource in the database
type AccountDBFilter ¶
type AccountDBFilter struct { // AccountDB is the data struct of the resource in the database AccountDB // FilterGroup is a collection of filters FilterGroup *persistence.FilterGroup `valid:"optional"` }
AccountDBFilter to filter lists of resources from the database
func (*AccountDBFilter) AppendFilter ¶
func (filter *AccountDBFilter) AppendFilter(theFilter persistence.Filter)
AppendFilter Append filter.
type AccountID ¶
type AccountID struct { // Address is the Ethereum account to interact with the network Address string `storage:"address"` // ApplicationID the ID of the Application associated to this account ApplicationID string `storage:"application_id"` // UserID the ID of the User associated to this account UserID string `storage:"user_id"` }
AccountID is the primary key of an Account in the database
type AccountRepositoryInfra ¶
type AccountRepositoryInfra struct {
// contains filtered or unexported fields
}
func ProvideAccountRepositoryInfra ¶
func ProvideAccountRepositoryInfra(options AccountRepositoryInfraOptions) (*AccountRepositoryInfra, error)
func (*AccountRepositoryInfra) Add ¶
func (repository *AccountRepositoryInfra) Add(ctx context.Context, db AccountCreateDB) (*AccountDB, error)
func (*AccountRepositoryInfra) List ¶
func (repository *AccountRepositoryInfra) List(ctx context.Context, filters AccountDBFilter) ([]AccountDB, error)
func (*AccountRepositoryInfra) Remove ¶
func (repository *AccountRepositoryInfra) Remove(ctx context.Context, input AccountID) (*persistence.ExecuteStmtWithStorageResultOutput, error)
func (*AccountRepositoryInfra) RemoveAllForAddress ¶
func (repository *AccountRepositoryInfra) RemoveAllForAddress(ctx context.Context, input AccountApplicationAddresses) (*persistence.ExecuteStmtWithStorageResultOutput, error)
type AccountRepositoryInfraOptions ¶
type AccountRepositoryInfraOptions struct {
GenericStorage persistence.Storage
}
Click to show internal directories.
Click to hide internal directories.