Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BadRequest ¶
type BadRequest struct { Message string // usually nil, but may be used to transport an error that has occurred while // trying to interpret parameter data. Inner error }
BadRequest is an error resulting from getting a request whose parameters are generally or in the current state invalid.
func (*BadRequest) Error ¶
func (br *BadRequest) Error() string
type Context ¶
Context gives access to data available in the server thread. This is a read-only view of data required for serialization and state initialization.
Details on Fonts and Heroes are available in the display thread via render.Context.
type Error ¶
Error is an error that can be sent as HTTP response.
This is used as error type on funcs that are invoked as part of handling an HTTP request.
type InternalError ¶
type InternalError struct { // may be empty; if not, describes the circumstances in which the error was // encountered. Description string // may be nil; if not, describes the error that has occurred Inner error }
InternalError describes an unexpected internal error. This should be used for problems with external systems (e.g. file system).
func (*InternalError) Error ¶
func (ie *InternalError) Error() string
type Loader ¶
type Loader interface { // Load invalidates the Loader's state and replaces it with the given YAML // data. // // If the YAML data is invalid, an error is returned and the Loader's previous // state must be preserved. Load(node *yaml.Node, ctx Context) error }
Loader describes an object whose state can be loaded from YAML data.
type MessageSender ¶
MessageSender is used to send warnings and errors issued at startup to the client to be shown on the main page.
type NotFound ¶
type NotFound struct {
Name string
}
NotFound is an error resulting from referencing an unknown ID either in the URL or in parameters.
type Persister ¶
type Persister interface { // Persist returns a view of the data that can be written to persistent // storage in YAML format, possibly as part of a larger structure. // // If you need to manually serialize the structure, return a *yaml.Node. // Generally, if the returned value implements yaml.Marshaler, that will be // used for serialization. Persist(ctx Context) interface{} }
Persister describes an object whose state can be persisted into a YAML stream.