Documentation ¶
Index ¶
- type AccountService
- func (s *AccountService) CreateAccount(ctx context.Context, userID string, currency domain.CurrencyCode, ...) (*domain.Account, error)
- func (s *AccountService) DeleteAccount(ctx context.Context, id string) error
- func (s *AccountService) Deposit(ctx context.Context, id string, amount string) (*domain.Account, error)
- func (s *AccountService) GetAccount(ctx context.Context, id string) (*domain.Account, error)
- func (s *AccountService) GetAccounts(ctx context.Context, userID string, limit, offset int) ([]domain.Account, error)
- func (s *AccountService) UpdateAccount(ctx context.Context, id string, currency domain.CurrencyCode, balance string) (*domain.Account, error)
- func (s *AccountService) Withdraw(ctx context.Context, id string, amount string) (*domain.Account, error)
- type AdminService
- func (s *AdminService) Login(ctx context.Context, email string) error
- func (s *AdminService) RefreshToken(ctx context.Context, tokenString string) (string, error)
- func (s *AdminService) SignUp(ctx context.Context, email string) (*domain.Admin, error)
- func (s *AdminService) VerifyAdmin(ctx context.Context, email, code string) (string, error)
- type FeeService
- func (s *FeeService) CreateFee(ctx context.Context, amount string, feeType domain.FeeType, ...) (*domain.Fee, error)
- func (s *FeeService) DeleteFee(ctx context.Context, id string) error
- func (s *FeeService) GetFees(ctx context.Context, limit, offset int) ([]domain.Fee, error)
- func (s *FeeService) UpdateFee(ctx context.Context, id, amount string, feeType domain.FeeType, ...) (*domain.Fee, error)
- type TransactionService
- func (s *TransactionService) GetTransactionByID(ctx context.Context, id int64) (*domain.Transaction, error)
- func (s *TransactionService) GetTransactions(ctx context.Context, limit, offset int) ([]domain.Transaction, error)
- func (s *TransactionService) Transfer(ctx context.Context, fromAccountID, toAccountID string, ...) error
- type UserService
- func (s *UserService) CreateUser(ctx context.Context, firstName, lastName, email string) (*domain.User, error)
- func (s *UserService) DeleteUser(ctx context.Context, id string) error
- func (s *UserService) GetUserByEmail(ctx context.Context, email string) (*domain.User, error)
- func (s *UserService) GetUserByID(ctx context.Context, id string) (*domain.User, error)
- func (s *UserService) GetUserByIDWithAccounts(ctx context.Context, id string) (*domain.User, error)
- func (s *UserService) ListUsers(ctx context.Context, limit, offset int) ([]domain.User, error)
- func (s *UserService) UpdateUser(ctx context.Context, id string, firstName, lastName, email string) (*domain.User, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccountService ¶
type AccountService struct {
// contains filtered or unexported fields
}
func NewAccountService ¶
func NewAccountService(accountRepo *repository.AccountRepository, userRepo *repository.UserRepository, feeRepo *repository.FeeRepository, mailService *utils.MailService) *AccountService
func (*AccountService) CreateAccount ¶
func (s *AccountService) CreateAccount(ctx context.Context, userID string, currency domain.CurrencyCode, amount string) (*domain.Account, error)
func (*AccountService) DeleteAccount ¶
func (s *AccountService) DeleteAccount(ctx context.Context, id string) error
func (*AccountService) GetAccount ¶
func (*AccountService) GetAccounts ¶
func (*AccountService) UpdateAccount ¶
func (s *AccountService) UpdateAccount(ctx context.Context, id string, currency domain.CurrencyCode, balance string) (*domain.Account, error)
type AdminService ¶
type AdminService struct {
// contains filtered or unexported fields
}
func NewAdminService ¶
func NewAdminService(adminRepo *repository.AdminRepository, redisClient *redis.Client, mailService *utils.MailService) *AdminService
func (*AdminService) RefreshToken ¶
func (*AdminService) VerifyAdmin ¶
type FeeService ¶
type FeeService struct {
// contains filtered or unexported fields
}
func NewFeeService ¶
func NewFeeService(feeRepo *repository.FeeRepository) *FeeService
type TransactionService ¶
type TransactionService struct {
// contains filtered or unexported fields
}
func NewTransactionService ¶
func NewTransactionService(transactionRepo *repository.TransactionRepository, accountRepo *repository.AccountRepository) *TransactionService
func (*TransactionService) GetTransactionByID ¶
func (s *TransactionService) GetTransactionByID(ctx context.Context, id int64) (*domain.Transaction, error)
func (*TransactionService) GetTransactions ¶
func (s *TransactionService) GetTransactions(ctx context.Context, limit, offset int) ([]domain.Transaction, error)
func (*TransactionService) Transfer ¶
func (s *TransactionService) Transfer(ctx context.Context, fromAccountID, toAccountID string, amount, fee *utils.BigDecimal) error
type UserService ¶
type UserService struct {
// contains filtered or unexported fields
}
func NewUserService ¶
func NewUserService(userRepo *repository.UserRepository) *UserService
func (*UserService) CreateUser ¶
func (*UserService) DeleteUser ¶
func (s *UserService) DeleteUser(ctx context.Context, id string) error
func (*UserService) GetUserByEmail ¶
func (*UserService) GetUserByID ¶
func (*UserService) GetUserByIDWithAccounts ¶
func (*UserService) UpdateUser ¶
Click to show internal directories.
Click to hide internal directories.