Documentation ¶
Index ¶
- Constants
- func EncodeForm(form interface{}) (url.Values, error)
- func LoadTemplates(node *embed.FS, theme string) error
- func SetSessionKey(secret string) error
- func Static(router *mux.Router, path string, dir string)
- func StaticFS(router *mux.Router, path string, fs embed.FS)
- func Wrap(f HandlerFunc) http.HandlerFunc
- type Context
- func (p *Context) Abort(status int, err error)
- func (p *Context) Data(status int, content_type string, body []byte)
- func (p *Context) GetSession(name string) (*sessions.Session, error)
- func (p *Context) HTML(status int, name string, data any)
- func (p *Context) JSON(status int, value any)
- func (p *Context) ParseForm(form interface{}) error
- func (p *Context) SaveSession(session *sessions.Session) error
- func (p *Context) String(status int, body string)
- func (p *Context) Vars() map[string]string
- func (p *Context) XML(status int, value any)
- type H
- type HandlerFunc
Constants ¶
View Source
const ( APPLICATION_GRPC_PROTO = "application/grpc+proto" APPLICATION_XML = "application/xml" APPLICATION_JSON = "application/json" TEXT_XML = "text/xml" TEXT_PLAIN_UTF8 = "text/plain; charset=utf-8" TEXT_HTML_UTF8 = "text/html; charset=utf-8" JWT_ISSUER = "palm.atropa" JWT_BEARER = "Bearer " HTTP_CONTENT_TYPE_HEADER = "Content-Type" HTTP_FORWARDED_FOR_HEADER = "X-Forwarded-For" HTTP_AUTHORIZATION_HEADER = "Authorization" HTTP_COOKIE_HEADER = "Cookie" GRPC_AUTHORIZATION_HEADER = "authorization" GRPC_ACCEPT_LANGUAGE_HEADER = "accept-language" GRPC_X_FORWARDED_FOR_HEADER = "x-forwarded-for" )
https://www.iana.org/assignments/media-types/media-types.xhtml https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types
Variables ¶
This section is empty.
Functions ¶
func EncodeForm ¶
func SetSessionKey ¶
func Wrap ¶
func Wrap(f HandlerFunc) http.HandlerFunc
Types ¶
type HandlerFunc ¶
type HandlerFunc = func(c *Context)
Click to show internal directories.
Click to hide internal directories.