survey

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 19, 2017 License: MIT Imports: 9 Imported by: 0

Documentation

Index

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

func (*Field) TableName

func (*Field) TableName() string

TableName table name

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

func (*Form) Available

func (p *Form) Available() bool

Available available?

func (*Form) TableName

func (*Form) TableName() string

TableName table name

type Plugin

type Plugin struct {
	nut.Controller
}

Plugin controller

func (*Plugin) CreateField

func (p *Plugin) CreateField()

CreateField create @router /fields [post]

func (*Plugin) CreateForm

func (p *Plugin) CreateForm()

CreateForm create @router /forms [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) EditForm

func (p *Plugin) EditForm()

EditForm edit @router /forms/edit/:id [get]

func (*Plugin) GetHome

func (p *Plugin) GetHome()

GetHome home @router / [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) NewField

func (p *Plugin) NewField()

NewField new card @router /fields/new [get]

func (*Plugin) NewForm

func (p *Plugin) NewForm()

NewForm new card @router /forms/new [get]

func (*Plugin) ShowForm

func (p *Plugin) ShowForm()

ShowForm show @router /forms/:id [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]

type Record

type Record struct {
	ID        uint      `orm:"column(id)" json:"id"`
	Value     string    `json:"value"`
	UpdatedAt time.Time `orm:"auto_now" json:"updatedAt"`
	CreatedAt time.Time `orm:"auto_now_add" json:"createdAt"`

	Form *Form `orm:"rel(fk)"`
}

Record record

func (*Record) TableName

func (*Record) TableName() string

TableName table name

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL