Documentation
¶
Index ¶
- func WithDB(ctx context.Context, db DB) context.Context
- type DB
- type Login
- func (l *Login) Create(ctx context.Context, login model.Login) (int64, error)
- func (l *Login) DeleteByID(ctx context.Context, id int64) error
- func (l *Login) GetByAccount(ctx context.Context, account string) (model.Login, error)
- func (l *Login) GetByID(ctx context.Context, id int64) (model.Login, error)
- func (l *Login) InitTable(ctx context.Context) error
- type Token
- func (t *Token) Create(ctx context.Context, token model.Token) (int64, error)
- func (t *Token) DeleteByID(ctx context.Context, tokenID, userID int64) error
- func (t *Token) GetByAccount(ctx context.Context, account, password string) (model.Token, error)
- func (t *Token) GetByID(ctx context.Context, tokenID, userID int64) (model.Token, error)
- func (t *Token) GetByUserID(ctx context.Context, userID int64) ([]model.Token, error)
- func (t *Token) InitTable(ctx context.Context) error
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DB ¶
type Token ¶
type Token struct{}
func (*Token) DeleteByID ¶
func (*Token) GetByAccount ¶
func (*Token) GetByUserID ¶
Click to show internal directories.
Click to hide internal directories.