usecases

package
v0.0.0-...-23b4f48 Latest Latest
Warning

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

Go to latest
Published: May 6, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SigninArgs

type SigninArgs struct {
	Email    *string `validate:"omitempty,email"`
	Username *string `validate:"omitempty,username"`

	Password string `validate:"password"`
}

type SigninOutput

type SigninOutput struct {
	JWT string
}

type SignupArgs

type SignupArgs struct {
	Name     string `validate:"name"`
	Email    string `validate:"email"`
	Username string `validate:"username"`
	Password string `validate:"password"`
}

type Usecases

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

func NewUsecases

func NewUsecases(
	validator *validator.Validate,
	cache types.KVStore,
	usersRespository coreTypes.UsersRepository,
	tokenService token.TokenService,
) *Usecases

func (*Usecases) GetUserIDFromJWT

func (u *Usecases) GetUserIDFromJWT(ctx context.Context, jwt string) (*types.ID, error)

func (*Usecases) Signin

func (u *Usecases) Signin(ctx context.Context, args *SigninArgs) (*SigninOutput, error)

func (*Usecases) Signup

func (u *Usecases) Signup(ctx context.Context, args *SignupArgs) (*SigninOutput, error)

Jump to

Keyboard shortcuts

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