Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ByteWriter ¶
type ByteWriter struct {
// contains filtered or unexported fields
}
ByteWriter provides a convenience struct for returning a byte slice as a response
func NewByteWriter ¶
func NewByteWriter(typ, encoding string, data []byte) *ByteWriter
func (*ByteWriter) Encode ¶
func (b *ByteWriter) Encode(w http.ResponseWriter) error
type DecoderFunc ¶
DecoderFunc is a function that decodes a request into a struct
type Empty ¶
type Empty struct{}
Empty provides a convenience struct for returning an empty response
func (*Empty) StatusCode ¶
type Encoder ¶
type Encoder interface {
Encode(w http.ResponseWriter) error
}
type StatusCoder ¶
type StatusCoder interface {
StatusCode() int
}
type TargetFunc ¶
TargetFunc is a function that handles the request and returns a response, ideally we shouldn't have to use the http.Request, but sometimes we need it to fetch query parameters, headers, or similar
Click to show internal directories.
Click to hide internal directories.