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: 17 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewUserHandlers

func NewUserHandlers(v1 *echo.Group, commands CommandBus, queries QueryBus, jwt *jwt.JWT, logger logger.Logger)

Types

type CommandBus

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

type QueryBus

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

type UserHandlers

type UserHandlers struct {
	Commands CommandBus
	Queries  QueryBus
	Jwt      *jwt.JWT

	Logger logger.Logger
	// contains filtered or unexported fields
}

func (*UserHandlers) Delete

func (h *UserHandlers) Delete(c echo.Context) error

func (*UserHandlers) Fetch

func (h *UserHandlers) Fetch(c echo.Context) error

Fetch godoc @Summary Fetch users @Description Fetch users handler @Tags User @Accept json @Produce json @Success 201 {object} entity.User @Router /user [get]

func (*UserHandlers) GetByID

func (h *UserHandlers) GetByID(c echo.Context) error

GetByID godoc @Summary Get by id user @Description Get by id user handler @Tags User @Accept json @Produce json @Param id path int true "user_id" @Success 200 {object} entity.User @Router /user/{id} [get]

func (*UserHandlers) GetMe

func (h *UserHandlers) GetMe(c echo.Context) error

GetMe godoc @Summary Get current user @Description Get current user handler @Tags User @Accept json @Produce json @Success 200 {object} entity.User @Router /me [get]

func (*UserHandlers) Update

func (h *UserHandlers) Update(c echo.Context) error

Update godoc @Summary Update user @Description Update user handler @Tags User @Accept json @Produce json @Success 200 {object} entity.User @Router /user/{id} [post]

Jump to

Keyboard shortcuts

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