usecases

package
v0.0.12 Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2024 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type InvalidateTokenUseCase

type InvalidateTokenUseCase interface {
	InvalidateToken(token string) error
}

func NewInvalidateTokenUseCase

func NewInvalidateTokenUseCase(
	log log.LogRusEntry,
	tokenService token.TokenService,
	sendLogout rbt.RabbitPublisher[string],
) InvalidateTokenUseCase

type SignInRequest

type SignInRequest struct {
	Password string `json:"password" binding:"required"`
	Login    string `json:"login" binding:"required"`
}

type SignInUseCase

type SignInUseCase interface {
	SignIn(request *SignInRequest) (*TokenResponse, error)
}

func NewSignInUseCase

func NewSignInUseCase(userService user.UserService, tokenService token.TokenService) SignInUseCase

type SignUpRequest

type SignUpRequest struct {
	Name     string `json:"name" binding:"required"`
	Password string `json:"password" binding:"required"`
	Login    string `json:"login" binding:"required"`
}

type SignUpUseCase

type SignUpUseCase interface {
	SignUp(request *SignUpRequest) (*TokenResponse, error)
}

func NewSignUpUseCase

func NewSignUpUseCase(userService user.UserService, tokenService token.TokenService) SignUpUseCase

type TokenResponse

type TokenResponse struct {
	Token string `json:"token"`
}

Jump to

Keyboard shortcuts

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