auth

package
v0.0.0-...-9808740 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handlers

type Handlers interface {
	Register() echo.HandlerFunc
	Login() echo.HandlerFunc
	Logout() echo.HandlerFunc
	Update() echo.HandlerFunc
	Delete() echo.HandlerFunc
	GetUserByID() echo.HandlerFunc
	FindByName() echo.HandlerFunc
	GetUsers() echo.HandlerFunc
	GetMe() echo.HandlerFunc
	GetCSRFToken() echo.HandlerFunc
}

Auth HTTP Handlers interface

type RedisRepository

type RedisRepository interface {
	GetByIDCtx(ctx context.Context, key string) (*models.UserWithRole, error)
	SetUserCtx(ctx context.Context, key string, seconds int, user *models.UserWithRole) error
	DeleteUserCtx(ctx context.Context, key string) error
}

Auth Redis repository interface

type Repository

type Repository interface {
	Register(ctx context.Context, user *models.User) (*models.UserWithRole, error)
	Update(ctx context.Context, user *models.User) (*models.User, error)
	Delete(ctx context.Context, userID int) error
	GetByID(ctx context.Context, userID int) (*models.UserWithRole, error)
	FindByName(ctx context.Context, name string, query *utils.PaginationQuery) (*models.UsersList, error)
	FindByEmail(ctx context.Context, userEmail string) (*models.User, error)
	FindByUsername(ctx context.Context, username string) (*models.UserWithRole, error)
	GetUsers(ctx context.Context, pq *utils.PaginationQuery) (*models.UsersList, error)
}

Auth repository interface

type UseCase

type UseCase interface {
	Register(ctx context.Context, user *dto.RegisterUserRequest) (*models.UserWithToken, error)
	Login(ctx context.Context, user *dto.LoginUserRequest) (*models.UserWithToken, error)
	Update(ctx context.Context, user *models.User) (*models.User, error)
	Delete(ctx context.Context, userID int) error
	GetByID(ctx context.Context, userID int) (*models.UserWithRole, error)
	FindByName(ctx context.Context, name string, query *utils.PaginationQuery) (*models.UsersList, error)
	GetUsers(ctx context.Context, pq *utils.PaginationQuery) (*models.UsersList, error)
}

Auth repository interface

Directories

Path Synopsis
delivery
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.

Jump to

Keyboard shortcuts

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