Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Envelope ¶
type Envelope interface {
// Return a status code.
//
// This could be a HTTP status code or any other integer that makes
// sense in this context; e.g. Unix error code.
Status() int
// Return HTTP headers.
Headers() http.Header
// Return the envelope's body.
Body() any
}
Envelope interface.
type Error ¶
func (*Error) MarshalJSON ¶
type Success ¶
type Success struct {
Data any
Count int64
Elapsed time.Duration
// contains filtered or unexported fields
}
func NewSuccess ¶
func (*Success) MarshalJSON ¶
Click to show internal directories.
Click to hide internal directories.