Documentation ¶
Overview ¶
Package flight provides an abstraction around commonly used features.
Index ¶
- type Info
- func (c *Info) FlashError(err error)
- func (c *Info) FlashNotice(message string)
- func (c *Info) FlashSuccess(message string)
- func (c *Info) FlashWarning(message string)
- func (c *Info) FormValid(fields ...string) bool
- func (c *Info) Param(name string) string
- func (c *Info) Redirect(urlStr string)
- func (c *Info) Repopulate(v map[string]interface{}, fields ...string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Info ¶
Info holds the commonly used information.
func Context ¶
func Context(w http.ResponseWriter, r *http.Request) *Info
Context returns commonly used information.
func (*Info) FlashError ¶
FlashError saves an error flash and logs the error.
func (*Info) FlashNotice ¶
FlashNotice saves a notice flash.
func (*Info) FlashSuccess ¶
FlashSuccess saves a success flash.
func (*Info) FlashWarning ¶
FlashWarning saves a warning flash.
func (*Info) FormValid ¶
FormValid determines if the user submitted all the required fields and then saves an error flash. Returns true if form is valid.
func (*Info) Repopulate ¶
Repopulate fills the forms on the page after the user submits.
Click to show internal directories.
Click to hide internal directories.