Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccountApp ¶
type AccountApp interface { CreateAccount(ctx context.Context, input dto.AccountInput) (err error) AddBalance(ctx context.Context, input dto.AddBalanceInput) (err error) GetAccounts(ctx context.Context, take, skip int64) (accounts []entity.Account, totalRecords int64, err error) GetAccountByUUID(ctx context.Context, accountUUID string) (account entity.Account, err error) GetLoggedAccount(ctx context.Context) (account entity.Account, err error) GetLoggedAccountID(ctx context.Context) (accountID int64, err error) }
type AccountRepo ¶
type AccountRepo interface { AddTransfer(ctx context.Context, transferUUID string, accountOriginID, accountDestinationID int64, amount float64) (transferID int64, err error) CreateAccount(ctx context.Context, account entity.Account) (createdID int64, err error) GetAccountByDocument(ctx context.Context, encryptedCPF string) (account entity.Account, err error) GetAccounts(ctx context.Context, take, skip int64) (accounts []entity.Account, totalRecords int64, err error) GetAccountByUUID(ctx context.Context, accountUUID string) (account entity.Account, err error) GetAccountIDByUUID(ctx context.Context, accountUUID string) (accountID int64, err error) GetTransfersByAccountID(ctx context.Context, accountID, take, skip int64, origin bool) (transfers []entity.Transfer, totalRecords int64, err error) UpdateAccountBalance(ctx context.Context, accountID int64, balance float64) (err error) }
type AuthApp ¶
type AuthApp interface { Login(ctx context.Context, input dto.LoginInput) (account entity.Account, err error) CreateSession(ctx context.Context, session dto.Session) (err error) GetSessionByUUID(ctx context.Context, sessionUUID string) (session dto.Session, err error) Logout(ctx context.Context, accessToken string) (err error) }
type CacheManager ¶
type CacheManager interface { GetItem(ctx context.Context, key string) ([]byte, error) SetItem(ctx context.Context, key string, data []byte) error SetItemWithExpiration(ctx context.Context, key string, data []byte, expiration time.Duration) error GetString(ctx context.Context, key string) (string, error) SetString(ctx context.Context, key string, data string) error SetStringWithExpiration(ctx context.Context, key string, data string, expiration time.Duration) error GetInt(ctx context.Context, key string) (data int64, err error) Increase(ctx context.Context, key string) error GetStruct(ctx context.Context, key string, data any) error SetStruct(ctx context.Context, key string, data any) error SetStructWithExpiration(ctx context.Context, key string, data any, expiration time.Duration) error GetExpiration(ctx context.Context, key string) (time.Duration, error) SetExpiration(ctx context.Context, key string, expiration time.Duration) error Delete(ctx context.Context, keys ...string) error CleanAll(ctx context.Context) error GetAllKeys(ctx context.Context, pattern string) ([]string, error) }
CacheManager defines the main caching interface
- Get methods can return domain.ErrCacheMiss
type DataManager ¶
type DataManager interface { WithTransaction(ctx context.Context, fn func(r DataManager) error) error Account() AccountRepo Auth() AuthRepo }
DataManager holds the methods that manipulates the main data.
Click to show internal directories.
Click to hide internal directories.