auth

package
v0.0.0-...-8c446f2 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const CtxUserKey = "auth"

Variables

View Source
var (
	ErrUserNotFound       = errors.New("user not found")
	ErrInvalidAccessToken = errors.New("invalid access token")
)

Functions

This section is empty.

Types

type AuthRepository

type AuthRepository interface {
	CreateUser(ctx context.Context, user *models.User) error
	GetUser(ctx context.Context, username, password string) (*models.User, error)
}

type UseCase

type UseCase interface {
	SignUp(ctx context.Context, data *models.User) error
	SignIn(ctx context.Context, username, password string) (string, error)
	ParseToken(ctx context.Context, accessToken string) (*models.User, error)
}

Directories

Path Synopsis
delivery
repository

Jump to

Keyboard shortcuts

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