Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrInsufficientFunds = errors.Forbidden("insufficient funds")
)
Functions ¶
func RegisterProviders ¶
Types ¶
type Balance ¶
func NewBalance ¶
func NewBalance(input NewBalanceInput) *Balance
type BalanceGetResponse ¶
type CreateBalanceRequest ¶
type NewBalanceInput ¶
type Repository ¶
type Service ¶
type Service interface { FindByUserID(userID uint) (*BalanceGetResponse, error) Reserve(request BalanceTransactionRequest) (*BalanceGetResponse, error) Release(request BalanceTransactionRequest) (*BalanceGetResponse, error) Commit(request BalanceTransactionRequest) (*BalanceGetResponse, error) Rollback(request BalanceTransactionRequest) (*BalanceGetResponse, error) }
func NewService ¶
func NewService(params ServiceParams) Service
type ServiceParams ¶
type ServiceParams struct { dig.In Repository Repository }
Click to show internal directories.
Click to hide internal directories.