Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Generator ¶
type Generator struct{}
Generator allows to identify resource as a plugin
func (Generator) Generate ¶
Generate generates the actions, model, templates and migration files from the given attrs app/actions/name.go app/actions/name_test.go app/models/name.go app/models/name_test.go app/templates/name/index.plush.html app/templates/name/new.plush.html app/templates/name/edit.plush.html app/templates/name/show.plush.html migrations/name.up.fizz migrations/name.down.fizz
func (Generator) InvocationName ¶
InvocationName is used to identify the generator when the generate command is called.
type Resource ¶
type Resource struct { Actions []name.Ident Name name.Ident Model model.Model ModelPkg string Args []string // contains filtered or unexported fields }
Resource model struct
func (*Resource) GenerateActions ¶
GenerateActions generates the actions for the resource
func (*Resource) GenerateMigrations ¶
GenerateModel generates the migrations for the resource
func (*Resource) GenerateModel ¶
GenerateModel generates the model for the resource
func (*Resource) GenerateTemplates ¶
GenerateModel generates the templates for the resource