Documentation ¶
Index ¶
- func NewDB() (*sqlx.DB, error)
- func NewSQLConsumer(db *sqlx.DB) *consumerSQL
- func NewSQLProducer(db *sqlx.DB) *producerSQL
- type InSQL
- func (i *InSQL) Balance(ctx context.Context) (*entity.Balance, error)
- func (i *InSQL) BalanceAdd(ctx context.Context, s *entity.Balance) error
- func (i *InSQL) CardListGetUserID(ctx context.Context, u *entity.User) (*entity.CardList, error)
- func (i *InSQL) Delete(context.Context, *entity.User) error
- func (i *InSQL) Get(ctx context.Context, sh *entity.Prove) (*entity.Prove, error)
- func (i *InSQL) GetAdmin(u *entity.User) bool
- func (i *InSQL) GetAll(context.Context, *entity.User) (*entity.User, error)
- func (i *InSQL) GetAllUrls() (entity.CountURLs, error)
- func (i *InSQL) GetAllUsers() (entity.CountUsers, error)
- func (i *InSQL) GetBalance(ctx context.Context, u *entity.SolutionData) (float64, error)
- func (i *InSQL) GetByID(ctx context.Context, l string) (*entity.Authentication, error)
- func (i *InSQL) GetByLogin(ctx context.Context, l string) (*entity.Authentication, error)
- func (i *InSQL) GetSolution(ctx context.Context, s *entity.SolutionData) error
- func (i *InSQL) GroupList(ctx context.Context) (*entity.GroupList, error)
- func (i *InSQL) Post(ctx context.Context, sh *entity.Prove) error
- func (i *InSQL) Put(ctx context.Context, sh *entity.Prove) error
- func (i *InSQL) Read() error
- func (i *InSQL) Registry(ctx context.Context, a *entity.Authentication) error
- func (i *InSQL) Save() error
- func (i *InSQL) SaveCard(ctx context.Context, c *entity.Card) error
- func (i *InSQL) SaveGroup(ctx context.Context, c *entity.Group) error
- func (i *InSQL) SavePass(ctx context.Context, c *entity.Pass) error
- func (i *InSQL) SaveSolution(ctx context.Context, c *entity.Solution) error
- func (i *InSQL) SaveTask(ctx context.Context, c *entity.Task) error
- func (i *InSQL) SaveText(ctx context.Context, c *entity.Text) error
- func (i *InSQL) TaskKey(ctx context.Context, u *entity.User, t *entity.Task) (*entity.Task, error)
- func (i *InSQL) TaskList(ctx context.Context) (*entity.TaskList, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type InSQL ¶
type InSQL struct {
// contains filtered or unexported fields
}
func (*InSQL) BalanceAdd ¶
BalanceAdd пополнить баланс
func (*InSQL) CardListGetUserID ¶
CardListGetUserID вернуть список карт по UserID
func (*InSQL) GetAdmin ¶
GetAdmin вернёт nil, если пользователь является админом. Админом является тот кто первый зарегистрировался.
func (*InSQL) GetAllUsers ¶
func (i *InSQL) GetAllUsers() (entity.CountUsers, error)
func (*InSQL) GetBalance ¶
GetBalance получить информацию о кредитоспособности, если вернёт err!=nil - кредит исчерпан
func (*InSQL) GetByLogin ¶
func (*InSQL) GetSolution ¶
GetSolution обновление баланса пользователя по его id
func (*InSQL) SaveSolution ¶
Click to show internal directories.
Click to hide internal directories.