Documentation ¶
Index ¶
- Variables
- type Account
- type Storage
- func (s *Storage) AddAccount(ctx context.Context, account adding.Account) (string, error)
- func (s *Storage) AddToken(ctx context.Context, token authenticating.Token) error
- func (s *Storage) AddTransfer(ctx context.Context, transfer adding.Transfer) (string, error)
- func (s *Storage) Connect(ctx context.Context)
- func (s *Storage) CreateIndexes(ctx context.Context)
- func (s *Storage) Disconnect(ctx context.Context)
- func (s *Storage) GetAccountByCPF(ctx context.Context, cpf string) (listing.Account, error)
- func (s *Storage) GetAccountByID(ctx context.Context, id string) (listing.Account, error)
- func (s *Storage) GetAccounts(ctx context.Context) ([]listing.Account, error)
- func (s *Storage) GetTokenByID(ctx context.Context, id primitive.ObjectID) (authenticating.Token, error)
- func (s *Storage) GetTransfersByKey(ctx context.Context, transferKey string, transferValue string) ([]listing.Transfer, error)
- func (s *Storage) UpdateAccounts(ctx context.Context, accounts []updating.Account) error
- type Transfer
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrCPFAlreadyExists = errors.New("this cpf could not be inserted in our DB")
View Source
var ErrNoAccountWasFound = errors.New("no account was found with the given filter parameters")
View Source
var ErrNoTokenWasFound = errors.New("no token was found with the given filter parameters")
Functions ¶
This section is empty.
Types ¶
type Storage ¶
type Storage struct {
// contains filtered or unexported fields
}
func NewStorageFromEnv ¶
func (*Storage) AddAccount ¶
func (*Storage) AddTransfer ¶
func (*Storage) CreateIndexes ¶
func (*Storage) Disconnect ¶
func (*Storage) GetAccountByCPF ¶
func (*Storage) GetAccountByID ¶
func (*Storage) GetAccounts ¶
func (*Storage) GetTokenByID ¶
func (*Storage) GetTransfersByKey ¶
Click to show internal directories.
Click to hide internal directories.