Documentation ¶
Index ¶
- Variables
- func GetResource(req *http.Request) (string, string)
- func JoinSliceString(class []string) string
- func LoadLocale(locale string) i18n.TranslateFunc
- func ParsePostForm(req *http.Request, s interface{}) error
- func ParseRequest(req *http.Request, s interface{}) error
- func ParseUrlValues(query url.Values, s interface{}) error
- func Render(res http.ResponseWriter, filename string, render string, data interface{}) []byte
- type Element
- type Form
- type Option
- type Validator
Constants ¶
This section is empty.
Variables ¶
View Source
var LanguagePath string = ""
View Source
var Locale string = "en-US"
View Source
var T i18n.TranslateFunc
View Source
var TemplatePath string = ""
Functions ¶
func JoinSliceString ¶
func LoadLocale ¶
func LoadLocale(locale string) i18n.TranslateFunc
func ParsePostForm ¶
ParsePostForm parses a net/http Request into url.Values so it can use ParseUrlValues to parse the request
func ParseRequest ¶
ParseRequest parses a net/http Request into url.Values so it can use ParseUrlValues to parse the request
func ParseUrlValues ¶
ParseUrlValues parses url.Values into the s interface using the reflect package. It also checks for the form struct tags so they can be used as fieldnames instead of the variable names. It returns the error if parsing failed.
Types ¶
type Element ¶
type Element struct { ID string Class []string Type string Name string Label string Value interface{} Placeholder string Required bool Autofocus bool NoValidate bool Multiple bool TabIndex int64 Valid bool Data map[string]string Options []*Option Validators []Validator Errors []error }
func NewElement ¶
func NewElement() *Element
type Form ¶
type Form struct { ID string Class []string Method string Action string Data map[string]string Valid bool Validate bool Locale string Render string Errors []error Success []string Messages []string Elements []*Element }
func CreateFormByJson ¶
CreateFormByJson creates a NewForm() and fills it using the form json provided
Click to show internal directories.
Click to hide internal directories.