app

package
v0.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 26, 2021 License: GPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

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.

func (*AppContext) SendEmail added in v0.0.2

func (a *AppContext) SendEmail(toEmail, status, jobURL string, jid int64) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL