Documentation ¶
Index ¶
- Constants
- func JSON(w http.ResponseWriter, status int, data interface{}) error
- func NewHandler(handler Handler) http.HandlerFunc
- func NoContent(w http.ResponseWriter) error
- func RunServer(ctx context.Context, options ServerOptions) error
- func String(w http.ResponseWriter, status int, data string) error
- type Error
- type Handler
- type Response
- type ServerOptions
Constants ¶
View Source
const (
DefaultShutdownTimeout = time.Second * 5
)
Variables ¶
This section is empty.
Functions ¶
func NewHandler ¶
func NewHandler(handler Handler) http.HandlerFunc
func NoContent ¶
func NoContent(w http.ResponseWriter) error
Types ¶
type Error ¶ added in v1.0.0
type Error struct { Type string `json:"type,omitempty"` Description string `json:"description"` Field string `json:"field,omitempty"` }
func NewValidationErrors ¶ added in v1.0.0
Click to show internal directories.
Click to hide internal directories.