services

package
v0.0.0-...-8b35975 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 18, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccountService

type AccountService interface {
	GetAccount(ctx context.Context, id int) (*models.Account, error)
	CreateAccount(ctx context.Context, accountReq *models.CreateAccountReq) (*models.Account, error)
}

type Service

type Service struct {
	AccountService     AccountService
	UserService        UserService
	TransactionService TransactionService
}

func InitServiceFactory

func InitServiceFactory(repo *repositories.Repository) *Service

InitServiceFactory initialize services factory

type TransactionService

type TransactionService interface {
	GetUserTransactions(ctx context.Context, req *models.GetUserTransactionsReq) ([]models.UserTransactionResp, error)
	CreateUserTransaction(ctx context.Context, req *models.CreateUserTransactionReq) (*models.UserTransactionResp, error)
	UpdateUserTransactions(ctx context.Context, req *models.UpdateUserTransactionsReq) ([]models.UserTransactionResp, error)
	UpdateUserAccountTransactions(ctx context.Context, req *models.UpdateUserAccountTransactionsReq) ([]models.UserTransactionResp, error)
	DeleteUserTransactions(ctx context.Context, userID int) error
	DeleteUserAccountTransactions(ctx context.Context, userID, accountID int) error
	DeleteTransactionByID(ctx context.Context, transactionID int) error
}

type UserService

type UserService interface {
	CreateUser(ctx context.Context, userReq *models.CreateUserReq) error
	GetByUsername(ctx context.Context, username string) (*models.User, error)
	Login(ctx context.Context, userReq *models.LoginReq) (*models.LoginResp, error)
}

Directories

Path Synopsis
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL