Documentation ¶
Index ¶
- type TokenService
- func (s *TokenService) Create(ctx context.Context, token model.Token) (int64, error)
- func (s *TokenService) Delete(ctx context.Context, tokenID, userID int64) error
- func (s *TokenService) Get(ctx context.Context, tokenID, userID int64) (model.Token, error)
- func (s *TokenService) GetByAccount(ctx context.Context, account, password string) (model.Token, error)
- func (s *TokenService) GetByUserID(ctx context.Context, userID int64) ([]model.Token, error)
- type UserService
- func (s *UserService) Create(ctx context.Context, nickname, account, password string) (int64, error)
- func (s *UserService) GetByID(ctx context.Context, id int64) (model.User, error)
- func (s *UserService) GetLoginByAccount(ctx context.Context, account string) (model.Login, error)
- func (s *UserService) UpdateNickname(ctx context.Context, id int64, nickname string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TokenService ¶
type TokenService struct {
// contains filtered or unexported fields
}
func NewTokenService ¶
func NewTokenService(db *sql.DB, tokenDao *dao.Token) *TokenService
func (*TokenService) Delete ¶
func (s *TokenService) Delete(ctx context.Context, tokenID, userID int64) error
func (*TokenService) GetByAccount ¶
func (*TokenService) GetByUserID ¶
type UserService ¶
type UserService struct {
// contains filtered or unexported fields
}
func NewUserService ¶
func (*UserService) GetLoginByAccount ¶
func (*UserService) UpdateNickname ¶
Click to show internal directories.
Click to hide internal directories.