Versions in this module Expand all Collapse all v0 v0.1.0 Jul 1, 2026 Changes in this version + const ContentType + const DefaultMaxBodyBytes + const DetailBadRequest + const DetailDeviceNotFound + const DetailForbidden + const DetailInternalServerError + const DetailNotFound + const DetailUnauthorized + var ErrBodyTooLarge = errors.New("request body too large") + var ErrMissingData = errors.New(`missing "data" key in request body`) + func DecodeData(r io.Reader, maxBytes int64, dst any) error + func WriteBadRequest(w http.ResponseWriter) error + func WriteData(w http.ResponseWriter, status int, v any) error + func WriteDeviceNotFound(w http.ResponseWriter) error + func WriteError(w http.ResponseWriter, status int, detail string) error + func WriteFieldErrors(w http.ResponseWriter, status int, fields map[string][]string) error + func WriteForbidden(w http.ResponseWriter) error + func WriteInternalServerError(w http.ResponseWriter) error + func WriteNotFound(w http.ResponseWriter) error + func WriteUnauthorized(w http.ResponseWriter) error