Documentation ¶
Overview ¶
The web package contains all the code to provide Inbucket's web GUI
Index ¶
- Variables
- func Initialize(cfg config.WebConfig, ds smtpd.DataStore)
- func MailboxDelete(w http.ResponseWriter, req *http.Request, ctx *Context) (err error)
- func MailboxDownloadAttach(w http.ResponseWriter, req *http.Request, ctx *Context) (err error)
- func MailboxHtml(w http.ResponseWriter, req *http.Request, ctx *Context) (err error)
- func MailboxIndex(w http.ResponseWriter, req *http.Request, ctx *Context) (err error)
- func MailboxLink(w http.ResponseWriter, req *http.Request, ctx *Context) (err error)
- func MailboxList(w http.ResponseWriter, req *http.Request, ctx *Context) (err error)
- func MailboxPurge(w http.ResponseWriter, req *http.Request, ctx *Context) (err error)
- func MailboxShow(w http.ResponseWriter, req *http.Request, ctx *Context) (err error)
- func MailboxSource(w http.ResponseWriter, req *http.Request, ctx *Context) (err error)
- func MailboxViewAttach(w http.ResponseWriter, req *http.Request, ctx *Context) (err error)
- func ParseTemplate(name string, partial bool) (*template.Template, error)
- func RenderJson(w http.ResponseWriter, data interface{}) error
- func RenderPartial(name string, w http.ResponseWriter, data interface{}) error
- func RenderTemplate(name string, w http.ResponseWriter, data interface{}) error
- func RootIndex(w http.ResponseWriter, req *http.Request, ctx *Context) (err error)
- func RootStatus(w http.ResponseWriter, req *http.Request, ctx *Context) (err error)
- func Start()
- func Stop()
- type Context
- type JsonMessage
- type JsonMessageBody
- type JsonMessageHeader
Constants ¶
This section is empty.
Variables ¶
View Source
var DataStore smtpd.DataStore
View Source
var Router *mux.Router
View Source
var TemplateFuncs = template.FuncMap{
"friendlyTime": friendlyTime,
"reverse": reverse,
"textToHtml": textToHtml,
}
Functions ¶
func Initialize ¶
Initialize sets up things for unit tests or the Start() method
func MailboxDelete ¶
func MailboxDownloadAttach ¶
func MailboxHtml ¶
func MailboxIndex ¶
func MailboxLink ¶
func MailboxList ¶
func MailboxPurge ¶
func MailboxShow ¶
func MailboxSource ¶
func MailboxViewAttach ¶
func ParseTemplate ¶
ParseTemplate loads the requested template along with _base.html, caching the result (if configured to do so)
func RenderJson ¶
func RenderJson(w http.ResponseWriter, data interface{}) error
func RenderPartial ¶
func RenderPartial(name string, w http.ResponseWriter, data interface{}) error
RenderPartial fetches the named template and renders it to the provided ResponseWriter.
func RenderTemplate ¶
func RenderTemplate(name string, w http.ResponseWriter, data interface{}) error
RenderTemplate fetches the named template and renders it to the provided ResponseWriter.
func RootStatus ¶
Types ¶
type Context ¶
type JsonMessage ¶
type JsonMessageBody ¶
type JsonMessageBody struct {
Text, Html string
}
Click to show internal directories.
Click to hide internal directories.