usecase

package
v0.0.0-...-a02da8a Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccountUseCase

type AccountUseCase interface {
	Login(ctx context.Context, cmd LoginCommand) (ticket string, failedCount uint32, err error)
	CreateToken(ctx context.Context, cmd CreateTokenCommand) (token string, err error)
	Authorize(ctx context.Context, cmd AuthorizeCommand) (*model.UserJWTClaims, error)
}

func NewAccountUseCase

func NewAccountUseCase(config AccountUseCaseConfig, redisManager manager.RedisManager, userService service.UserService) AccountUseCase

type AccountUseCaseConfig

type AccountUseCaseConfig struct {
	JWTKey string
}

type AuthorizeCommand

type AuthorizeCommand struct {
	Token string
}

type CreateTokenCommand

type CreateTokenCommand struct {
	Ticket string
}

type LoginCommand

type LoginCommand struct {
	Username string
	Password string
}

Jump to

Keyboard shortcuts

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