Documentation ¶
Index ¶
- type AccountRepository
- func (r *AccountRepository) Create(ctx context.Context, acc *domain.Account) error
- func (r *AccountRepository) Delete(ctx context.Context, id string) error
- func (r *AccountRepository) FindAllByUserID(ctx context.Context, userID string, limit, offset int) ([]domain.Account, error)
- func (r *AccountRepository) FindByID(ctx context.Context, id string) (*domain.Account, error)
- func (r *AccountRepository) Update(ctx context.Context, acc *domain.Account) error
- type AdminRepository
- func (r *AdminRepository) Create(ctx context.Context, admin *domain.Admin) error
- func (r *AdminRepository) Delete(ctx context.Context, id string) error
- func (r *AdminRepository) FindAll(ctx context.Context, limit, offset int) ([]domain.Admin, error)
- func (r *AdminRepository) FindByEmail(ctx context.Context, email string) (*domain.Admin, error)
- func (r *AdminRepository) FindByID(ctx context.Context, id string) (*domain.Admin, error)
- func (r *AdminRepository) Update(ctx context.Context, admin *domain.Admin) error
- type Database
- type FeeRepository
- func (r *FeeRepository) CalculateFee(ctx context.Context, feeType domain.FeeType, currency domain.CurrencyCode, ...) (*utils.BigDecimal, error)
- func (r *FeeRepository) Create(ctx context.Context, t *domain.Fee) error
- func (r *FeeRepository) Delete(ctx context.Context, id string) error
- func (r *FeeRepository) FindAll(ctx context.Context, limit, offset int) ([]domain.Fee, error)
- func (r *FeeRepository) FindAllByType(ctx context.Context, feeType domain.FeeType, limit, offset int) ([]domain.Fee, error)
- func (r *FeeRepository) FindByID(ctx context.Context, id string) (*domain.Fee, error)
- func (r *FeeRepository) Update(ctx context.Context, t *domain.Fee) error
- type TransactionRepository
- func (r *TransactionRepository) Create(ctx context.Context, txn *domain.Transaction) error
- func (r *TransactionRepository) FindAll(ctx context.Context, limit, offset int) ([]domain.Transaction, error)
- func (r *TransactionRepository) FindByID(ctx context.Context, id int64) (*domain.Transaction, error)
- type UserRepository
- func (r *UserRepository) Create(ctx context.Context, u *domain.User) error
- func (r *UserRepository) Delete(ctx context.Context, id string) error
- func (r *UserRepository) FindAll(ctx context.Context, limit, offset int) ([]domain.User, error)
- func (r *UserRepository) FindByEmail(ctx context.Context, email string) (*domain.User, error)
- func (r *UserRepository) FindByID(ctx context.Context, id string) (*domain.User, error)
- func (r *UserRepository) FindByIDWithAccounts(ctx context.Context, id string) (*domain.User, error)
- func (r *UserRepository) Update(ctx context.Context, u *domain.User) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccountRepository ¶
type AccountRepository struct {
// contains filtered or unexported fields
}
func NewAccountRepository ¶
func NewAccountRepository(db *pgxpool.Pool) *AccountRepository
func (*AccountRepository) Delete ¶
func (r *AccountRepository) Delete(ctx context.Context, id string) error
func (*AccountRepository) FindAllByUserID ¶
type AdminRepository ¶
type AdminRepository struct {
// contains filtered or unexported fields
}
func NewAdminRepository ¶
func NewAdminRepository(db *pgxpool.Pool) *AdminRepository
func (*AdminRepository) Delete ¶
func (r *AdminRepository) Delete(ctx context.Context, id string) error
func (*AdminRepository) FindByEmail ¶
type Database ¶
func NewDatabase ¶
type FeeRepository ¶
type FeeRepository struct {
// contains filtered or unexported fields
}
func NewFeeRepository ¶
func NewFeeRepository(db *pgxpool.Pool) *FeeRepository
func (*FeeRepository) CalculateFee ¶
func (r *FeeRepository) CalculateFee(ctx context.Context, feeType domain.FeeType, currency domain.CurrencyCode, amount *utils.BigDecimal) (*utils.BigDecimal, error)
func (*FeeRepository) FindAllByType ¶
type TransactionRepository ¶
type TransactionRepository struct {
// contains filtered or unexported fields
}
func NewTransactionRepository ¶
func NewTransactionRepository(db *pgxpool.Pool) *TransactionRepository
func (*TransactionRepository) Create ¶
func (r *TransactionRepository) Create(ctx context.Context, txn *domain.Transaction) error
func (*TransactionRepository) FindAll ¶
func (r *TransactionRepository) FindAll(ctx context.Context, limit, offset int) ([]domain.Transaction, error)
func (*TransactionRepository) FindByID ¶
func (r *TransactionRepository) FindByID(ctx context.Context, id int64) (*domain.Transaction, error)
type UserRepository ¶
type UserRepository struct {
// contains filtered or unexported fields
}
func NewUserRepository ¶
func NewUserRepository(db *pgxpool.Pool) *UserRepository
func (*UserRepository) Delete ¶
func (r *UserRepository) Delete(ctx context.Context, id string) error
func (*UserRepository) FindByEmail ¶
func (*UserRepository) FindByIDWithAccounts ¶
Click to show internal directories.
Click to hide internal directories.