service

package
v0.13.0-alpha.41 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 19, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

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) Create

func (s *TokenService) Create(ctx context.Context, token model.Token) (int64, error)

func (*TokenService) Delete

func (s *TokenService) Delete(ctx context.Context, tokenID, userID int64) error

func (*TokenService) Get

func (s *TokenService) Get(ctx context.Context, tokenID, userID int64) (model.Token, error)

func (*TokenService) GetByAccount

func (s *TokenService) GetByAccount(ctx context.Context, account, password string) (model.Token, error)

func (*TokenService) GetByUserID

func (s *TokenService) GetByUserID(ctx context.Context, userID int64) ([]model.Token, error)

type UserService

type UserService struct {
	// contains filtered or unexported fields
}

func NewUserService

func NewUserService(db *sql.DB, userDao *dao.User, loginDao *dao.Login) *UserService

func (*UserService) Create

func (s *UserService) Create(ctx context.Context, nickname, account, password string) (int64, error)

func (*UserService) GetByID

func (s *UserService) GetByID(ctx context.Context, id int64) (model.User, error)

func (*UserService) GetLoginByAccount

func (s *UserService) GetLoginByAccount(ctx context.Context, account string) (model.Login, error)

func (*UserService) UpdateNickname

func (s *UserService) UpdateNickname(ctx context.Context, id int64, nickname string) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL