Documentation
¶
Index ¶
- Variables
- func Export() error
- func Guard(c *gin.Context)
- func Load(cfg config.Config) error
- func LoadAndExport(cfg config.Config) error
- func LoadData(data []byte, id string, root string) error
- func LoadFrom(dir string, prefix string) error
- func LoadID(id string, root string) error
- type ActionDSL
- type BindActionDSL
- type Column
- type DSL
- type FieldsDSL
- type LayoutDSL
- func (layout *LayoutDSL) BindForm(form *DSL, fields *FieldsDSL) error
- func (layout *LayoutDSL) BindModel(m *gou.Model, formID string, fields *FieldsDSL, option map[string]interface{})
- func (layout *LayoutDSL) BindTable(tab *table.DSL, formID string, fields *FieldsDSL) error
- func (layout *LayoutDSL) Xgen() (map[string]interface{}, error)
- type OperationLayoutDSL
- type SectionDSL
- type ViewLayoutDSL
Constants ¶
This section is empty.
Variables ¶
View Source
var Forms map[string]*DSL = map[string]*DSL{}
Forms the loaded form 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"`
Find *action.Process `json:"find,omitempty"`
Save *action.Process `json:"save,omitempty"`
Update *action.Process `json:"update,omitempty"`
Create *action.Process `json:"create,omitempty"`
Delete *action.Process `json:"delete,omitempty"`
BeforeFind *hook.Before `json:"before:find,omitempty"`
AfterFind *hook.After `json:"after:find,omitempty"`
BeforeSave *hook.Before `json:"before:save,omitempty"`
AfterSave *hook.After `json:"after:save,omitempty"`
BeforeCreate *hook.Before `json:"before:create,omitempty"`
AfterCreate *hook.After `json:"after:create,omitempty"`
BeforeDelete *hook.Before `json:"before:delete,omitempty"`
AfterDelete *hook.After `json:"after:delete,omitempty"`
BeforeUpdate *hook.Before `json:"before:update,omitempty"`
AfterUpdate *hook.After `json:"after:update,omitempty"`
}
ActionDSL the form 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
Form string `json:"form,omitempty"` // bind form
Option map[string]interface{} `json:"option,omitempty"` // bind option
}
BindActionDSL action.bind
type Column ¶
type Column struct {
Tabs []SectionDSL `json:"tabs,omitempty"`
component.InstanceDSL
}
Column table columns
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
}
DSL the form DSL
type FieldsDSL ¶
type FieldsDSL struct {
Form field.Columns `json:"form,omitempty"`
// contains filtered or unexported fields
}
FieldsDSL the form fields DSL
type LayoutDSL ¶
type LayoutDSL struct {
Primary string `json:"primary,omitempty"`
Operation *OperationLayoutDSL `json:"operation,omitempty"`
Form *ViewLayoutDSL `json:"form,omitempty"`
Config map[string]interface{} `json:"config,omitempty"`
}
LayoutDSL the form layout DSL
func (*LayoutDSL) BindModel ¶
func (layout *LayoutDSL) BindModel(m *gou.Model, formID 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 SectionDSL ¶
type SectionDSL struct {
Title string `json:"title,omitempty"`
Desc string `json:"desc,omitempty"`
Columns []Column `json:"columns,omitempty"`
}
SectionDSL layout.form.sections[*]
type ViewLayoutDSL ¶
type ViewLayoutDSL struct {
Props component.PropsDSL `json:"props,omitempty"`
Sections []SectionDSL `json:"sections,omitempty"`
}
ViewLayoutDSL layout.form
Click to show internal directories.
Click to hide internal directories.