Documentation
¶
Index ¶
- type AppContext
- func (app *AppContext) RenderError(w http.ResponseWriter, status int)
- func (app *AppContext) RenderNotFound(w http.ResponseWriter)
- func (app *AppContext) RenderTemplate(w http.ResponseWriter, name string, data interface{})
- func (a *AppContext) SendEmail(toEmail, status, jobURL string, jid int64) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AppContext ¶
type AppContext struct { DB *sqlx.DB Decoder *schema.Decoder Tmpldir string // contains filtered or unexported fields }
func NewAppContext ¶
func NewAppContext() (*AppContext, error)
func (*AppContext) RenderError ¶
func (app *AppContext) RenderError(w http.ResponseWriter, status int)
Render error template and write HTTP status
func (*AppContext) RenderNotFound ¶
func (app *AppContext) RenderNotFound(w http.ResponseWriter)
Render 404 template
func (*AppContext) RenderTemplate ¶
func (app *AppContext) RenderTemplate(w http.ResponseWriter, name string, data interface{})
Render template t using template parameters in data.
Click to show internal directories.
Click to hide internal directories.