Documentation
¶
Index ¶
- type Context
- func (c *Context) Admin() bool
- func (c *Context) CheckXsrf() (ok bool)
- func (c *Context) Error(i interface{})
- func (c *Context) Exec()
- func (c *Context) Forbidden()
- func (c *Context) Form(name string) string
- func (c *Context) FormSlice(name string) []string
- func (c *Context) Forwarded() (ret string)
- func (c *Context) LogSetCookie(msg string, err error)
- func (c *Context) LoggedOn() (ok bool)
- func (c *Context) Login(u *core.User, remember string)
- func (c *Context) Method() string
- func (c *Context) NotFound()
- func (c *Context) Path() string
- func (c *Context) Redirect(uri string, code int)
- func (c *Context) Referer() string
- func (c *Context) RefererURI() string
- func (c *Context) Remember() string
- func (c *Context) SetCookie(claims jwt.Claims, d time.Duration)
- func (c *Context) SetHeader(name, value string)
- func (c *Context) Template(name string)
- func (c *Context) Totp() string
- func (c *Context) User() string
- func (c *Context) Var(name string) (ret string)
- func (c *Context) Write(buf []byte) (err error)
- type HTTPServer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Context ¶
type Context struct { Request *http.Request Response http.ResponseWriter Srv *HTTPServer T *template.Template Status int Err error Time time.Time Token jwt.Token Data webData }
func (*Context) LogSetCookie ¶
func (*Context) RefererURI ¶
type HTTPServer ¶
type HTTPServer struct { Config *core.Config DB *db.DB JWT *jwt.JWT // contains filtered or unexported fields }
func NewHTTPServer ¶
func NewHTTPServer(cfg *core.Config, l net.Listener) (srv *HTTPServer)
func (*HTTPServer) Start ¶
func (s *HTTPServer) Start() (err error)
func (*HTTPServer) Stop ¶
func (s *HTTPServer) Stop() error
Click to show internal directories.
Click to hide internal directories.