Documentation
¶
Index ¶
- Variables
- func Export() error
- func Guard(c *gin.Context)
- func Load(cfg config.Config) error
- func LoadAndExport(cfg config.Config) error
- func LoadFile(root string, file string) error
- func LoadID(id string, root string) error
- type ActionDSL
- type BindActionDSL
- type DSL
- type FieldsDSL
- type LayoutDSL
- func (layout *LayoutDSL) BindModel(m *model.Model, listID string, fields *FieldsDSL, ...)
- func (layout *LayoutDSL) BindTable(tab *table.DSL, listID string, fields *FieldsDSL) error
- func (layout *LayoutDSL) Clone() (*LayoutDSL, error)
- func (layout *LayoutDSL) Xgen(data map[string]interface{}, excludes map[string]bool, ...) (*LayoutDSL, error)
- type OperationLayoutDSL
- type ViewLayoutDSL
Constants ¶
This section is empty.
Variables ¶
View Source
var Lists map[string]*DSL = map[string]*DSL{}
Lists the loaded list widgets
Functions ¶
Types ¶
type ActionDSL ¶
type ActionDSL struct {
Bind *BindActionDSL `json:"bind,omitempty"`
Setting *action.Process `json:"setting,omitempty"`
Component *action.Process `json:"component,omitempty"`
Upload *action.Process `json:"upload,omitempty"`
Download *action.Process `json:"download,omitempty"`
Get *action.Process `json:"get,omitempty"`
Save *action.Process `json:"save,omitempty"`
BeforeGet *hook.Before `json:"before:find,omitempty"`
AfterGet *hook.After `json:"after:find,omitempty"`
BeforeSave *hook.Before `json:"before:save,omitempty"`
AfterSave *hook.After `json:"after:save,omitempty"`
}
ActionDSL the list action DSL
func (*ActionDSL) SetDefaultProcess ¶
func (act *ActionDSL) SetDefaultProcess()
SetDefaultProcess set the default value of action
type BindActionDSL ¶
type BindActionDSL struct {
Model string `json:"model,omitempty"` // bind model
Store string `json:"store,omitempty"` // bind store
Table string `json:"table,omitempty"` // bind table
Option map[string]interface{} `json:"option,omitempty"` // bind option
}
BindActionDSL action.bind
type DSL ¶
type DSL struct {
ID string `json:"id,omitempty"`
Root string `json:"-"`
Name string `json:"name,omitempty"`
Action *ActionDSL `json:"action"`
Layout *LayoutDSL `json:"layout"`
Fields *FieldsDSL `json:"fields"`
Config map[string]interface{} `json:"config,omitempty"`
CProps field.CloudProps `json:"-"`
compute.Computable
*mapping.Mapping
}
DSL the list DSL
type FieldsDSL ¶
type FieldsDSL struct {
List field.Columns `json:"list,omitempty"`
// contains filtered or unexported fields
}
FieldsDSL the list fields DSL
type LayoutDSL ¶
type LayoutDSL struct {
List *ViewLayoutDSL `json:"list,omitempty"`
Config map[string]interface{} `json:"config,omitempty"`
}
LayoutDSL the list layout DSL
func (*LayoutDSL) BindModel ¶
func (layout *LayoutDSL) BindModel(m *model.Model, listID string, fields *FieldsDSL, option map[string]interface{})
BindModel bind model
type OperationLayoutDSL ¶
type OperationLayoutDSL struct {
Preset map[string]map[string]interface{} `json:"preset,omitempty"`
Actions []component.ActionDSL `json:"actions,omitempty"`
}
OperationLayoutDSL layout.operation
type ViewLayoutDSL ¶
type ViewLayoutDSL struct {
Props component.PropsDSL `json:"props,omitempty"`
Columns []component.InstanceDSL `json:"columns,omitempty"`
}
ViewLayoutDSL layout.list
Click to show internal directories.
Click to hide internal directories.