helper

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: May 29, 2020 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddMessage

func AddMessage(ctx core.HTTPContext, messageType, content string)

AddMessage to context

func FieldForm

func FieldForm(fields api.FieldMap, values map[string]interface{}) (string, error)

FieldForm renders a form based on a map of fields

func FieldFormValues

func FieldFormValues(ctx core.HTTPContext, fields api.FieldMap) (map[string]interface{}, error)

FieldFormValues retrieves post data from form created with FieldForm

func JetTpl

func JetTpl() *jet.Set

JetTpl returns the instance of the template engine

func Render

func Render(ctx core.HTTPContext, name string, vars map[string]interface{})

Render template to context

func RenderString

func RenderString(name string, vars map[string]interface{}) (string, error)

RenderString converts template to string

Types

type Message

type Message struct {
	// Type of message
	//  valid values: danger, info, warning, success
	Type string
	// Content of message
	Content string
}

Message to show on web page (error, warning, ...)

Jump to

Keyboard shortcuts

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