api

package
v0.25.0 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2023 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func E

func E(w http.ResponseWriter, r *http.Request, status int, err error)

Types

type BuildRequest

type BuildRequest struct {
	Building string `json:"building"`
	Amount   int    `json:"string,omitempty"`
}

type CommonResponse

type CommonResponse struct {
	Status     int
	StatusText string
	Message    string
}

type ErrorResponse

type ErrorResponse struct {
	Status     int
	StatusText string
	Error      error
}

type Router

type Router struct {
	chi.Router
	// contains filtered or unexported fields
}

func NewRouter

func NewRouter(c *cluster.Cluster) *Router

func (*Router) Build

func (rt *Router) Build(w http.ResponseWriter, r *http.Request)

func (*Router) Index

func (rt *Router) Index(w http.ResponseWriter, r *http.Request)

func (*Router) Inventory

func (rt *Router) Inventory(w http.ResponseWriter, r *http.Request)

Jump to

Keyboard shortcuts

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