Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Run ¶
func Run(bind string, port int, env *Environment)
Types ¶
type AddMessage ¶
type Environment ¶
type Environment struct {
Storage *dnsStorage.DnsStorage
}
type Error ¶
Error represents a handler error. It provides methods for a HTTP status code and embeds the built-in error interface.
func HandleApiNotFound ¶
func HandleApiNotFound(env *Environment, w http.ResponseWriter, r *http.Request) Error
func HandleGetHosts ¶
func HandleGetHosts(env *Environment, w http.ResponseWriter, r *http.Request) Error
func HandleWsHosts ¶
func HandleWsHosts(env *Environment, w http.ResponseWriter, r *http.Request) Error
type Handler ¶
type Handler struct { Env *Environment Handle HandlerHandleFunc }
type HandlerHandleFunc ¶
type HandlerHandleFunc func(e *Environment, w http.ResponseWriter, r *http.Request) Error
type HttpRoute ¶
type HttpRoute struct { Name string Method string Pattern string HandlerFunc HandlerHandleFunc }
type HttpRoutes ¶
type HttpRoutes []HttpRoute
type RemoveMessage ¶
type StatusError ¶
StatusError represents an error with an associated HTTP status code.
func (StatusError) Error ¶
func (statusError StatusError) Error() string
func (StatusError) Status ¶
func (statusError StatusError) Status() int
type WsRoute ¶
type WsRoute struct { Name string Pattern string HandlerFunc HandlerHandleFunc }
Click to show internal directories.
Click to hide internal directories.