Documentation ¶
Index ¶
- Variables
- type DBStorage
- func (ds *DBStorage) Close() error
- func (ds *DBStorage) CreateOrder(ctx context.Context, login string, order models.Order) error
- func (ds *DBStorage) CreateUser(ctx context.Context, user models.User) error
- func (ds *DBStorage) DispatchGetOrders(ctx context.Context, status string) ([]string, error)
- func (ds *DBStorage) DispatchUpdateOrder(ctx context.Context, order models.Order) error
- func (ds *DBStorage) GetBalance(ctx context.Context, login string) (*types.Balance, error)
- func (ds *DBStorage) GetOrderLogs(ctx context.Context, login string) ([]models.OrderLog, error)
- func (ds *DBStorage) GetOrders(ctx context.Context, login string) ([]models.Order, error)
- func (ds *DBStorage) GetUser(ctx context.Context, login string) (*models.User, error)
- func (ds *DBStorage) InitDB() error
- func (ds *DBStorage) WithdrawOrder(ctx context.Context, login string, orderLog models.OrderLog) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrInvalidLoginPassword = errors.New("invalid login/password")
View Source
var ErrNoOrders = errors.New("orders not found")
View Source
var ErrNotEnoughFunds = errors.New("not enough funds")
View Source
var ErrOrderExists = errors.New("order early uploaded")
View Source
var ErrOrderExistsAnother = errors.New("order early uploaded another user")
View Source
var ErrUserAlreadyExists = errors.New("user with such credentials already exist")
Functions ¶
This section is empty.
Types ¶
type DBStorage ¶
func (*DBStorage) CreateOrder ¶
func (*DBStorage) CreateUser ¶
func (*DBStorage) DispatchGetOrders ¶
func (*DBStorage) DispatchUpdateOrder ¶
func (*DBStorage) GetBalance ¶
func (*DBStorage) GetOrderLogs ¶
Click to show internal directories.
Click to hide internal directories.