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
- func (l *Login) UpdatePassword(ctx context.Context, id int64, newPassword string) error
- type Registry
- func (r *Registry) Create(ctx context.Context, registry model.Registry) (int64, error)
- func (r *Registry) DeleteByID(ctx context.Context, registryID, userID int64) error
- func (r *Registry) GetByDomain(ctx context.Context, domain string) (model.Registry, error)
- func (r *Registry) GetByID(ctx context.Context, registryID, userID int64) (model.Registry, error)
- func (r *Registry) GetByUserID(ctx context.Context, userID int64) ([]model.Registry, error)
- func (r *Registry) InitTable(ctx context.Context) error
- func (r *Registry) UpdateByID(ctx context.Context, registryID, userID int64, registry model.Registry) 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, userID int64, 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 Registry ¶
type Registry struct{}
func NewRegistry ¶
func NewRegistry() *Registry
func (*Registry) DeleteByID ¶
func (*Registry) GetByDomain ¶
func (*Registry) GetByUserID ¶
type Token ¶
type Token struct{}
func (*Token) DeleteByID ¶
func (*Token) GetByAccount ¶
func (*Token) GetByUserID ¶
Click to show internal directories.
Click to hide internal directories.