Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrValidationFailed = errors.New("failed validation of request body")
Functions ¶
This section is empty.
Types ¶
type AuthHandler ¶
type AuthHandler struct {
// contains filtered or unexported fields
}
func NewAuthHandler ¶
func NewAuthHandler( userService UserServicer, tokenService TokenServicer, logger *logger.MyLogger, timeout time.Duration, ) (*AuthHandler, error)
func (*AuthHandler) DummyLogin ¶
func (h *AuthHandler) DummyLogin(w http.ResponseWriter, r *http.Request)
func (*AuthHandler) Login ¶
func (h *AuthHandler) Login(w http.ResponseWriter, r *http.Request)
func (*AuthHandler) Register ¶
func (h *AuthHandler) Register(w http.ResponseWriter, r *http.Request)
type PVZHandler ¶
type PVZHandler struct {
// contains filtered or unexported fields
}
func NewPvzHandler ¶
func NewPvzHandler( pvzService PVZServicer, receptionService ReceptionServicer, productService ProductServicer, logger *logger.MyLogger, timeout time.Duration, ) (*PVZHandler, error)
func (*PVZHandler) CloseReception ¶
func (h *PVZHandler) CloseReception(w http.ResponseWriter, r *http.Request)
func (*PVZHandler) CreatePvz ¶
func (h *PVZHandler) CreatePvz(w http.ResponseWriter, r *http.Request)
func (*PVZHandler) DeleteLastProduct ¶
func (h *PVZHandler) DeleteLastProduct(w http.ResponseWriter, r *http.Request)
func (*PVZHandler) GetPVZ ¶
func (h *PVZHandler) GetPVZ(w http.ResponseWriter, r *http.Request)
type PVZServicer ¶
type PVZServicer interface {
CreatePVZ(ctx context.Context, payload dto.PostPvzJSONRequestBody) (*dto.PVZ, error)
GetPVZWithReceptionsFiltered(ctx context.Context, payload dto.GetPvzParams) []dto.PVZWithReceptions
}
type ProductHandler ¶
type ProductHandler struct {
// contains filtered or unexported fields
}
func NewProductHandler ¶
func NewProductHandler( productService ProductServicer, logger *logger.MyLogger, timeout time.Duration, ) (*ProductHandler, error)
func (*ProductHandler) CreateProduct ¶
func (h *ProductHandler) CreateProduct(w http.ResponseWriter, r *http.Request)
type ProductServicer ¶
type ReceptionHandler ¶
type ReceptionHandler struct {
// contains filtered or unexported fields
}
func NewReceptionHandler ¶
func NewReceptionHandler(receptionService ReceptionServicer, logger *logger.MyLogger, timeout time.Duration) (*ReceptionHandler, error)
func (*ReceptionHandler) CreateReception ¶
func (h *ReceptionHandler) CreateReception(w http.ResponseWriter, r *http.Request)
type ReceptionServicer ¶
Click to show internal directories.
Click to hide internal directories.