resource

package
v0.10.2 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2017 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Generator added in v0.10.1

type Generator struct {
	App           meta.App  `json:"app"`
	Name          meta.Name `json:"name"`
	Model         meta.Name `json:"model"`
	SkipMigration bool      `json:"skip_migration"`
	SkipModel     bool      `json:"skip_model"`
	MimeType      string    `json:"mime_type"`
	FilesPath     string    `json:"files_path"`
	ActionsPath   string    `json:"actions_path"`
	Props         []Prop    `json:"props"`
	Args          []string  `json:"args"`
}

Generator for generating a new resource

func New

func New(modelName string, args ...string) (Generator, error)

New constructs new options for generating a resource

func (Generator) Run added in v0.10.1

func (res Generator) Run(root string, data makr.Data) error

Run generates a new actions/resource file and a stub test.

func (Generator) Validate added in v0.10.1

func (o Generator) Validate() error

Validate that the options have what you need to build a new resource

type Prop added in v0.10.1

type Prop struct {
	Name meta.Name
	Type string
}

Prop of a model. Starts as name:type on the command line.

func (Prop) String added in v0.10.1

func (m Prop) String() string

String representation of Prop

Jump to

Keyboard shortcuts

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