Documentation ¶
Index ¶
- type Field
- type Form
- type Plugin
- func (p *Plugin) CreateField()
- func (p *Plugin) CreateForm()
- func (p *Plugin) CreateRecord()
- func (p *Plugin) DestroyField()
- func (p *Plugin) DestroyForm()
- func (p *Plugin) DestroyRecord()
- func (p *Plugin) EditField()
- func (p *Plugin) EditForm()
- func (p *Plugin) GetHome()
- func (p *Plugin) IndexFields()
- func (p *Plugin) IndexForms()
- func (p *Plugin) IndexRecords()
- func (p *Plugin) NewField()
- func (p *Plugin) NewForm()
- func (p *Plugin) ShowForm()
- func (p *Plugin) UpdateField()
- func (p *Plugin) UpdateForm()
- type Record
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Field ¶
type Field struct { ID uint `orm:"column(id)" json:"id"` Body string `json:"body"` Type string `json:"type"` Name string `json:"name"` Label string `json:"label"` Value string `json:"value"` Required bool `json:"required"` SortOrder int `json:"sortOrder"` UpdatedAt time.Time `orm:"auto_now" json:"updatedAt"` CreatedAt time.Time `orm:"auto_now_add" json:"createdAt"` Form *Form `orm:"rel(fk)"` }
Field field
type Form ¶
type Form struct { ID uint `orm:"column(id)" json:"id"` UID string `orm:"column(uid)" json:"uid"` Mode string `json:"mode"` Title string `json:"title"` Body string `json:"body"` Type string `json:"type"` StartUp time.Time `json:"startUp"` ShutDown time.Time `json:"shutDown"` UpdatedAt time.Time `orm:"auto_now" json:"updatedAt"` CreatedAt time.Time `orm:"auto_now_add" json:"createdAt"` User *nut.User `orm:"rel(fk)" json:"user"` Fields []*Field `orm:"reverse(many)" json:"fields"` Records []*Record `orm:"reverse(many)" json:"records"` }
Form form
type Plugin ¶
type Plugin struct {
nut.Controller
}
Plugin controller
func (*Plugin) CreateField ¶
func (p *Plugin) CreateField()
CreateField create @router /fields [post]
func (*Plugin) CreateRecord ¶
func (p *Plugin) CreateRecord()
CreateRecord create @router /records [post]
func (*Plugin) DestroyField ¶
func (p *Plugin) DestroyField()
DestroyField remove @router /fields/:id [delete]
func (*Plugin) DestroyForm ¶
func (p *Plugin) DestroyForm()
DestroyForm remove @router /forms/:id [delete]
func (*Plugin) DestroyRecord ¶
func (p *Plugin) DestroyRecord()
DestroyRecord remove @router /records/:id [delete]
func (*Plugin) EditField ¶
func (p *Plugin) EditField()
EditField edit @router /fields/edit/:id [get]
func (*Plugin) IndexFields ¶
func (p *Plugin) IndexFields()
IndexFields list all cards @router /fields [get]
func (*Plugin) IndexForms ¶
func (p *Plugin) IndexForms()
IndexForms list all cards @router /forms [get]
func (*Plugin) IndexRecords ¶
func (p *Plugin) IndexRecords()
IndexRecords index @router /records [get]
func (*Plugin) UpdateField ¶
func (p *Plugin) UpdateField()
UpdateField update @router /fields/:id [post]
func (*Plugin) UpdateForm ¶
func (p *Plugin) UpdateForm()
UpdateForm update @router /forms/:id [post]
Click to show internal directories.
Click to hide internal directories.