Documentation ¶
Index ¶
- type Controller
- func (c *Controller) Error(w http.ResponseWriter, r *http.Request, code int, str string)
- func (c *Controller) GetCookieUser(w http.ResponseWriter, r *http.Request) (user.User, error)
- func (c *Controller) GetCookieUser2(w http.ResponseWriter, r *http.Request) (user.User, error)
- func (c *Controller) HTML(w http.ResponseWriter, r *http.Request, tmpl *template.Template, ...)
- func (c *Controller) JSON(w http.ResponseWriter, r *http.Request, data interface{})
- func (c *Controller) SetCookieUser(w http.ResponseWriter, r *http.Request, user user.User)
- func (c *Controller) String(w http.ResponseWriter, r *http.Request, str string)
- type KeyCookie
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Controller ¶
type Controller struct {
// contains filtered or unexported fields
}
func New ¶
func New(log *log.Logger, db dber) *Controller
func (*Controller) Error ¶
func (c *Controller) Error(w http.ResponseWriter, r *http.Request, code int, str string)
func (*Controller) GetCookieUser ¶
func (c *Controller) GetCookieUser(w http.ResponseWriter, r *http.Request) (user.User, error)
func (*Controller) GetCookieUser2 ¶
func (c *Controller) GetCookieUser2(w http.ResponseWriter, r *http.Request) (user.User, error)
TODO: You know why this is bad, change it.
func (*Controller) HTML ¶
func (c *Controller) HTML(w http.ResponseWriter, r *http.Request, tmpl *template.Template, data interface{})
TODO: You know why this is bad, change it.
func (*Controller) JSON ¶
func (c *Controller) JSON(w http.ResponseWriter, r *http.Request, data interface{})
TODO: You know why this is bad, change it.
func (*Controller) SetCookieUser ¶
func (c *Controller) SetCookieUser(w http.ResponseWriter, r *http.Request, user user.User)
func (*Controller) String ¶
func (c *Controller) String(w http.ResponseWriter, r *http.Request, str string)
Click to show internal directories.
Click to hide internal directories.