Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ProviderSet = wire.NewSet(NewGreeterUsecase)
ProviderSet is biz providers.
Functions ¶
This section is empty.
Types ¶
type Transaction ¶
type Transaction struct {
TxId int64
TxNo string
TxType string
UserId int64
Quantity int
TxStatus string
TxDate time.Time
TxAmount float64
PaymentId int64
TxItems []*TxItem
}
Transaction is a Transaction model.
type TransactionRepo ¶
type TransactionRepo interface {
Save(context.Context, *Transaction) (*Transaction, error)
Update(context.Context, *Transaction) (*Transaction, error)
FindByID(context.Context, int64) (*Transaction, error)
ListByHello(context.Context, string) ([]*Transaction, error)
ListAll(context.Context) ([]*Transaction, error)
}
TransactionRepo is a Greater repo.
type TransactionUsecase ¶
type TransactionUsecase struct {
// contains filtered or unexported fields
}
TransactionUsecase is a Transaction usecase.
func NewTransactionUsecase ¶
func NewTransactionUsecase(repo TransactionRepo, logger log.Logger) *TransactionUsecase
NewTransactionUsecase new a Transaction usecase.
func (*TransactionUsecase) CreateTransaction ¶
func (uc *TransactionUsecase) CreateTransaction(ctx context.Context, g *Transaction) (*Transaction, error)
CreateTransaction creates a Transaction, and returns the new Transaction.
Click to show internal directories.
Click to hide internal directories.