Documentation
¶
Index ¶
- Constants
- 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
- type Cache
- type CheckBox
- type DateField
- type Dropdown
- type EmailField
- type Engine
- type Field
- type Form
- type HiddenField
- type Hmac
- type I18n
- 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
- type Locale
- type Model
- type Option
- type PasswordField
- type Radio
- type Select
- type Ssha
- type TextField
- type Textarea
Constants ¶
View Source
const ( //MethodPost post method MethodPost = "post" //MethodPatch patch method MethodPatch = "patch" //TypeMarkdown markdown type TypeMarkdown = "markdown" //TypeHTML html type TypeHTML = "html" )
View Source
const LOCALE = "locale"
LOCALE locale key
Variables ¶
This section is empty.
Functions ¶
func CfgAction ¶
func CfgAction(f cli.ActionFunc) func(c *cli.Context) error
CfgAction config action
func JSON ¶
func JSON(fn func(*gin.Context) (interface{}, error)) gin.HandlerFunc
JSON json response
Types ¶
type EmailField ¶
EmailField text
type Engine ¶
type Engine interface { //Home home Home() gin.HandlerFunc //Init init ioc objects Init(*inject.Graph) error //Mount web points Mount(*gin.Engine) //Shell command line Shell() []cli.Command //Worker register worker Worker() }
Engine web engine
type Form ¶
type Form struct { XSRF string Locale string ID string Title string Action string Method string Fields []Field }
Form form model
type Locale ¶
type Locale struct { Model Lang string `json:"lang"` Code string `json:"code"` Message string `json:"message"` }
Locale locale model
type Model ¶
type Model struct { ID uint `json:"id" gorm:"primary_key"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` }
Model basic db model
type PasswordField ¶
PasswordField text
type Radio ¶
type Radio struct { ID string Label string Multi bool Readonly bool Options []Option Helper string }
Radio radio
type Select ¶
type Select struct { ID string Label string Multi bool Readonly bool Options []Option Helper string }
Select select
Click to show internal directories.
Click to hide internal directories.