v1

package
v0.0.0-...-0de0edb Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAuthHandlers

func NewAuthHandlers(
	publicMountPoint *echo.Group,
	privateMountPoint *echo.Group,
	commands CommandBus,
	queries QueryBus,
	cfg *config.Config,
	jwt *jwt.JWT,
	logger logger.Logger,
)

Types

type AuthHandlers

type AuthHandlers struct {
	Cfg      *config.Config
	Commands CommandBus
	Queries  QueryBus
	Jwt      *jwt.JWT
	Logger   logger.Logger
}

func (*AuthHandlers) Login

func (a *AuthHandlers) Login(c echo.Context) error

Login godoc @Summary Login user @Description Login user handler @Tags Auth @Accept json @Produce json @Success 200 {object} entity.Token @Router /auth/login [post] TOFIX: refactor function

func (*AuthHandlers) Logout

func (a *AuthHandlers) Logout(c echo.Context) error

func (*AuthHandlers) RefreshToken

func (a *AuthHandlers) RefreshToken(c echo.Context) error

type CommandBus

type CommandBus interface {
	Dispatch(context.Context, core.Command) (any, error)
}

type QueryBus

type QueryBus interface {
	Ask(context.Context, core.Query) (any, error)
}

Jump to

Keyboard shortcuts

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