pgen

package
v0.0.0-...-802ef12 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateProject

func GenerateProject(root string, project *ProjectTemplate, definitions map[string]interface{}) error

Types

type ProjectFile

type ProjectFile struct {
	Path    string
	Content string
}

type ProjectTemplate

type ProjectTemplate struct {
	Files       []ProjectFile
	Directories []string
	Variables   []TemplateVariable
}

func LoadFromJson

func LoadFromJson(data []byte) (*ProjectTemplate, error)

func LoadFromYaml

func LoadFromYaml(data []byte) (*ProjectTemplate, error)

func (*ProjectTemplate) Equals

func (t *ProjectTemplate) Equals(other *ProjectTemplate) bool

type RenderedTemplate

type RenderedTemplate struct {
	Files       []ProjectFile
	Directories []string
}

func RenderTemplate

func RenderTemplate(input *ProjectTemplate, userVars map[string]interface{}) (*RenderedTemplate, error)

func (*RenderedTemplate) Equals

func (r *RenderedTemplate) Equals(other *RenderedTemplate) bool

type TemplateVariable

type TemplateVariable struct {
	Identifier       string
	Representation   string
	ShortDescription string
	LongDescription  string
	Default          string
}

func (*TemplateVariable) Equals

func (tv *TemplateVariable) Equals(other *TemplateVariable) bool

Jump to

Keyboard shortcuts

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