auth

package
v0.0.0-...-ec225d0 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthController

type AuthController struct {
	AuthUserUseCase AuthUserUseCase
}

Implementation of the repository in this service.

func (*AuthController) GetNewAccessToken

func (h *AuthController) GetNewAccessToken(c *fiber.Ctx) error

type AuthRequest

type AuthRequest struct {
	Email    string `json:"email"`
	Password string `json:"password"`
}

func (AuthRequest) ValidateLoginInput

func (r AuthRequest) ValidateLoginInput() error

type AuthResponse

type AuthResponse struct {
	User  user.User `json:"user"`
	Token string    `json:"token"`
}

type AuthUserUseCase

type AuthUserUseCase interface {
	Execute(ctx context.Context, auth AuthRequest) (AuthResponse, error)
}

func NewAuthUserUseCase

func NewAuthUserUseCase(r user.UserRepository) AuthUserUseCase

Create a new 'service' or 'use-case' for 'User' entity.

Jump to

Keyboard shortcuts

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