service

package
v1.1.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrEmptyItems = errors.New("empty items")

ErrEmptyItems is returned when items is zero or empty.

Functions

func NewRouter

func NewRouter(p *packer.Packer) *http.ServeMux

Types

type HTTPError added in v1.0.0

type HTTPError interface {
	// StatusCode returns the status code of the error.
	StatusCode() int
	// Message returns the message of the error.
	Message() string
}

HTTPError represents an HTTP error.

type Pack

type Pack struct {
	Box      uint `json:"box" format:"uint" example:"50"`
	Quantity uint `json:"quantity" format:"uint" example:"3"`
}

Pack represents a pack of items.

type PackRequest

type PackRequest struct {
	Items uint `json:"items" format:"uint" example:"543"`
}

PackRequest represents a request to pack items.

type PackResponse

type PackResponse struct {
	Packs []Pack `json:"packs,omitempty"`
}

PackResponse represents a response to a pack request.

Directories

Path Synopsis
Package assets handles generated static.
Package assets handles generated static.

Jump to

Keyboard shortcuts

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