handlers

package
v0.0.0-...-88c6f24 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2025 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Error

func Error(w http.ResponseWriter, r *http.Request, message any, code int)

func Response

func Response(w http.ResponseWriter, r *http.Request, v any, status int)

Types

type AddProductRequest

type AddProductRequest struct {
	Point       uuid.UUID         `json:"pvzId"`
	ProductType point.ProductType `json:"type"`
}

type CreateReceptionRequest

type CreateReceptionRequest struct {
	Point uuid.UUID `json:"pvzId"`
}

type ErrorMessage

type ErrorMessage struct {
	Message string `json:"message,omitempty"`
}

type LoginHandler

type LoginHandler struct {
	// contains filtered or unexported fields
}

func NewLogin

func NewLogin(auth auth.Authorizer, users user.Repository, logger *zap.SugaredLogger) *LoginHandler

func (*LoginHandler) Dummy

func (h *LoginHandler) Dummy(w http.ResponseWriter, r *http.Request)

func (*LoginHandler) Login

func (h *LoginHandler) Login(w http.ResponseWriter, r *http.Request)

func (*LoginHandler) Register

func (h *LoginHandler) Register(w http.ResponseWriter, r *http.Request)

type PointHandler

type PointHandler struct {
	// contains filtered or unexported fields
}

func NewPoint

func NewPoint(auth auth.Authorizer, points point.Repository, logger *zap.SugaredLogger) *PointHandler

func (*PointHandler) AddProduct

func (h *PointHandler) AddProduct(w http.ResponseWriter, r *http.Request)

func (*PointHandler) CloseReception

func (h *PointHandler) CloseReception(w http.ResponseWriter, r *http.Request)

func (*PointHandler) CreatePoint

func (h *PointHandler) CreatePoint(w http.ResponseWriter, r *http.Request)

func (*PointHandler) CreateReception

func (h *PointHandler) CreateReception(w http.ResponseWriter, r *http.Request)

func (*PointHandler) DeleteProduct

func (h *PointHandler) DeleteProduct(w http.ResponseWriter, r *http.Request)

func (*PointHandler) GetPointsList

func (h *PointHandler) GetPointsList(w http.ResponseWriter, r *http.Request)

Jump to

Keyboard shortcuts

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