Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var BufferStatusHandler bufferStatusHandler
View Source
var ( // ErrParser is thrown when a request object is of the wrong type ErrParser error = errParse{} )
View Source
var HomeHandler homeHandler
View Source
var MP3StreamHandler mp3StreamHandler
View Source
var NowPlayingHandler nowPlayingHandler
View Source
var StatusHandler statusHandler
View Source
var WAVStreamHandler wavStreamHandler
Functions ¶
This section is empty.
Types ¶
type Handler ¶ added in v0.5.0
type Handler interface { // DecodeRequest turns a HTTP request into a domain-specific request type DecodeRequest(*http.Request) (Request, error) // A RequestHandler is a monadic definition of a request handler. The inputs // are the current state of the world, and a handler-specific request type, // and the output is the new state of the world (which may or may not be the // same), a handler-specific response type, and/or an error. HandleRequest(State, Request) (State, Response, error) }
A Handler handles requests
type Request ¶ added in v0.5.0
type Request interface {
FlaggedAsRequest()
}
A Request flags any request type
Click to show internal directories.
Click to hide internal directories.