service

package
v0.0.0-...-220d790 Latest Latest
Warning

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

Go to latest
Published: May 12, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Wallet

type Wallet struct {
	// contains filtered or unexported fields
}

func (*Wallet) Create

func (w *Wallet) Create(ctx context.Context, userID int) (string, error)

func (*Wallet) GetBalance

func (w *Wallet) GetBalance(ctx context.Context, userID int) (float64, error)

func (*Wallet) History

func (w *Wallet) History(ctx context.Context, userID int, Type string, startTime, endTime time.Time) ([]models.Transaction, error)

func (*Wallet) Transaction

func (w *Wallet) Transaction(ctx context.Context, transaction models.Transaction) (string, float64, error)

type Walleter

type Walleter interface {
	Create(ctx context.Context, userID int) (string, error)
	GetBalance(ctx context.Context, userID int) (float64, error)
	Transaction(ctx context.Context, transaction models.Transaction) (string, float64, error)
	History(ctx context.Context, userID int, Type string, startTime, endTime time.Time) ([]models.Transaction, error)
}

func NewWallet

func NewWallet(logger *zap.Logger, walletService client.RPCWalleter) Walleter

Jump to

Keyboard shortcuts

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