Versions in this module Expand all Collapse all v0 v0.2.1 Nov 15, 2016 v0.2.0 Nov 13, 2016 Changes in this version + const LOCALE + const MethodPatch + const MethodPost + const TypeHTML + const TypeMarkdown + func CfgAction(f cli.ActionFunc) func(c *cli.Context) error + func FromBytes(data []byte, val interface{}) error + func IocAction(fn func(*cli.Context, *inject.Graph) error) func(c *cli.Context) error + func IsProduction() bool + func JSON(fn func(*gin.Context) (interface{}, error)) gin.HandlerFunc + func Loop(fn func(en Engine) error) error + func Main(version string) error + func OpenLogger(tag string) (*syslog.Writer, error) + func RandomStr(n int) string + func Redirect(fn func(*gin.Context) (string, error)) gin.HandlerFunc + func Register(en ...Engine) + func Shell(cmd string, args ...string) error + func ToBytes(val interface{}) ([]byte, error) + type Aes struct + Cip cipher.Block + func (p *Aes) Decrypt(buf []byte) ([]byte, error) + func (p *Aes) Encrypt(buf []byte) ([]byte, error) + type Cache struct + Redis *redis.Pool + func (p *Cache) Flush() error + func (p *Cache) Get(key string, val interface{}) error + func (p *Cache) Keys() ([]string, error) + func (p *Cache) Set(key string, val interface{}, ttl uint) error + type CheckBox struct + Helper string + ID string + Label string + Options []Option + Readonly bool + func (p *CheckBox) Type() string + type DateField struct + Helper string + ID string + Label string + Readonly bool + Value time.Time + func (p *DateField) Type() string + type Dropdown struct + ID string + Label string + Links []Link + type EmailField struct + Helper string + ID string + Label string + Readonly bool + Value string + func (p *EmailField) Type() string + type Engine interface + Home func() gin.HandlerFunc + Init func(*inject.Graph) error + Mount func(*gin.Engine) + Shell func() []cli.Command + Worker func() + type Field interface + Type func() string + type Form struct + Action string + Fields []Field + ID string + Locale string + Method string + Title string + XSRF string + func (p *Form) Add(fields ...Field) + type HiddenField struct + ID string + Value interface{} + func (p *HiddenField) Type() string + type Hmac struct + Hash func() hash.Hash + Key []byte + func (p *Hmac) Chk(plain, code []byte) bool + func (p *Hmac) Sum(plain []byte) []byte + type I18n struct + Db *gorm.DB + func (p *I18n) Codes(lang string) []string + func (p *I18n) Del(lang string, code string) error + func (p *I18n) E(lang string, code string, args ...interface{}) error + func (p *I18n) Get(lang string, code string) (string, error) + func (p *I18n) Handler(c *gin.Context) + func (p *I18n) Languages() []string + func (p *I18n) Load(dir string) error + func (p *I18n) Locales(lang string) map[string]interface{} + func (p *I18n) Set(lang string, code, message string) error + func (p *I18n) T(lang string, code string, args ...interface{}) string + type Link struct + Href string + Label string + type Locale struct + Code string + Lang string + Message string + type Model struct + CreatedAt time.Time + ID uint + UpdatedAt time.Time + type Option struct + Name interface{} + Selected bool + Value interface{} + type PasswordField struct + Helper string + ID string + Label string + func (p *PasswordField) Type() string + type Radio struct + Helper string + ID string + Label string + Multi bool + Options []Option + Readonly bool + func (p *Radio) Type() string + type Select struct + Helper string + ID string + Label string + Multi bool + Options []Option + Readonly bool + func (p *Select) Type() string + type Ssha struct + func (p *Ssha) Chk(plain, code string) (bool, error) + func (p *Ssha) Sum(plain string, num uint) (string, error) + type TextField struct + Helper string + ID string + Label string + Readonly bool + Value string + func (p *TextField) Type() string + type Textarea struct + Helper string + ID string + Label string + Readonly bool + Value string + func (p *Textarea) Type() string