Documentation ¶
Overview ¶
* This handles everything to do with stencilsets and stencils for fastfood
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Framework ¶
type Framework interface { // Initializes the framework // gives the framework the opportunity to set things up for later Init(FrameworkOptions) error // Generate Empty generates a new base directory and files for a framework // it returns a slice of files that were modified and an error // Takes an array of directories and an array of templates GenerateBase() ([]string, error) // Generate Stencil generates a stencil and returns a slice of // files that were modified and an error // Accepts a stencil name, a stencilset and options GenerateStencil(string, StencilSet, map[string]string) ([]string, error) }
type FrameworkOptions ¶
type Manifest ¶
type Manifest struct { API int `json:"api"` Framework string Path string StencilSets map[string]struct { Name string Manifest string Help string `json:"help"` // contains filtered or unexported fields } `json:"stencil_sets"` Base struct { Files []string `json:"files"` Directories []string `json:"directories"` } }
func NewManifest ¶
type RawStencilSet ¶
type RawStencilSet struct {
Stencils map[string]json.RawMessage
}
type StencilSet ¶
type StencilSet struct { Name string `json:"id"` APIVersion int `json:"api"` BasePath string DefaultStencil string `json:"default_stencil"` Raw json.RawMessage Opts map[string]Option `json:"options"` Stencils map[string]struct { Raw json.RawMessage Opts map[string]Option `json:"options"` } `json:"stencils"` }
func NewStencilSet ¶
func NewStencilSet(file string) (StencilSet, error)
Return a new stencil set and error
func (*StencilSet) MergeOpts ¶
Merge all of the options from a given map with the defaults from the stencil and stencilset
func (*StencilSet) Valid ¶
func (s *StencilSet) Valid() (bool, error)
Return true if the type exists in types
type Template ¶
func NewTemplate ¶
Given a name, an interface, and the template content returns a Template
func (*Template) CleanNewlines ¶
func (t *Template) CleanNewlines()
Source Files ¶
Click to show internal directories.
Click to hide internal directories.