handler

package
v0.0.0-...-1353794 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2025 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddHandlerResponseEncoder

func AddHandlerResponseEncoder(w http.ResponseWriter, statusCode int, id string, err error)

func GetByIdHandlerRequestDecoder

func GetByIdHandlerRequestDecoder(r *http.Request) (req string, err error)

func GetByIdHandlerResponseEncoder

func GetByIdHandlerResponseEncoder(w http.ResponseWriter, statusCode int, inventory domain.Inventory, err error)

func InventoryRoutes

func InventoryRoutes(han *handlers) *mux.Router

func NewHandlers

func NewHandlers(svc contracts.SvcContracts) *handlers

Types

type AddHandlerRequest

type AddHandlerRequest struct {
	domain.Inventory
}

func AddHandlerRequestDecoder

func AddHandlerRequestDecoder(r *http.Request) (req AddHandlerRequest, err error)

type AddHandlerResponse

type AddHandlerResponse struct {
	Id string `json:"id"`
}

type GetByIdHandlerRequest

type GetByIdHandlerRequest struct {
	Id string `query:"id"`
}

type GetByIdHandlerResponse

type GetByIdHandlerResponse struct {
	domain.Inventory
}

Jump to

Keyboard shortcuts

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