Versions in this module Expand all Collapse all v0 v0.1.0 Jan 6, 2021 Changes in this version + const HeaderContentType + const HeaderXForwardedProto + const HeaderXForwardedProtocol + const HeaderXForwardedSsl + const HeaderXUrlScheme + const MimeFormData + const MimeFormUrlencoded + const MimeHTML + const MimeJSON + var DocGomd = &embed.File + var DocHtml = &embed.File + var DocIndexGohtml = &embed.File + func IsMapErrorHandled(w http.ResponseWriter, req *http.Request, err error, status *int) (handled bool) + func Render(w http.ResponseWriter, data interface{}, status *int) + type Context struct + func (c *Context) AbsURL() string + func (c *Context) Bind(value interface{}) error + func (c *Context) GetFormBool(name string) bool + func (c *Context) GetFormFloat(name string) float64 + func (c *Context) GetFormInt(name string) int64 + func (c *Context) IsTLS() bool + func (c *Context) MapBad(code, format string, args ...interface{}) *Map + func (c *Context) MapUnhandled(code, format string, args ...interface{}) *Map + func (c *Context) RealIp() string + func (c *Context) Scheme() string + type Doc struct + Description string + Errors map[int]M + Input interface{} + InputParams []DocParamItem + Name string + Output interface{} + Path string + func (ad *Doc) Markdown(path string) (md []byte, html string) + type DocParamItem struct + Description string + Example string + Name string + Required bool + Type string + type Empty struct + Code string + type HandlerFunc func(*Context) (interface{}, error) + type M map[string]interface + func (m M) Del(key string) M + func (m M) Get(key string) (interface{}, bool) + func (m M) MarshalBinary() ([]byte, error) + func (m M) Merge(maps ...M) M + func (m M) Set(key string, val interface{}) M + func MapOK() M + type Map struct + func MapBad(code, format string, args ...interface{}) *Map + func MapForbidden(code, format string, args ...interface{}) *Map + func MapStatus(status int) *Map + func MapUnauthorized(code, format string, args ...interface{}) *Map + func MapUnhandled(code, format string, args ...interface{}) *Map + func NewMap(maps ...M) *Map + func Redirect(status int, redirectTo string) *Map + func (m *Map) Basic(code, format string, args ...interface{}) *Map + func (m *Map) Del(key string) *Map + func (m *Map) Error() string + func (m *Map) Merge(maps ...M) *Map + func (m *Map) PopStatus(status *int) bool + func (m *Map) Redirect(status *int, redirectTo *string) bool + func (m *Map) Set(key string, val interface{}) *Map + func (m *Map) SetCode(code string) *Map + func (m *Map) SetData(data interface{}) *Map + func (m *Map) SetEx(err error) *Map + func (m *Map) SetMessage(format string, args ...interface{}) *Map + func (m *Map) SetStatus(status int) *Map + func (m Map) MarshalBinary() ([]byte, error) + func (m Map) MarshalJSON() ([]byte, error) + func (m Map) String() string + type Matched struct + FPR string + Node *Node + Params map[string]string + TSR string + type Mux struct + func New(opts ...Options) *Mux + func NewServices(services ...interface{}) *Mux + func (m *Mux) Handle(method, pattern string, handler HandlerFunc) + func (m *Mux) HandleService(pathPrefix string, svc interface{}) + func (m *Mux) HandleServices(ss ...interface{}) + func (m *Mux) ServeHTTP(w http.ResponseWriter, req *http.Request) + func (m *Mux) SetBasicAuth(auth M) + func (m *Mux) Start(addr string) error + func (m *Mux) StartWith(s Server) error + type Node struct + func (n *Node) GetAllow() string + func (n *Node) GetDescendants() []*Node + func (n *Node) GetHandler(method string) interface{} + func (n *Node) GetMethods() []string + func (n *Node) GetPattern() string + func (n *Node) Handle(method string, handler interface{}) + type Options struct + FixedPathRedirect bool + IgnoreCase bool + TrailingSlashRedirect bool + type Params map[string]string + type Printer interface + Printf func(format string, args ...interface{}) + type Server interface + Start func(handler http.Handler) error