template

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2020 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetFiles added in v0.2.0

func GetFiles(templatePath string) (*list.List, error)

GetFiles get files from template path

func GetTemplates

func GetTemplates() []string

GetTemplates get templates

func UpdateAllTemplates added in v0.1.3

func UpdateAllTemplates(downloader downloader.Downloader) error

UpdateAllTemplates update all templates

func UpdateAllTemplatesWithGit added in v0.2.0

func UpdateAllTemplatesWithGit() error

UpdateAllTemplatesWithGit update all templates with git

func UpdateTemplate

func UpdateTemplate(name string, downloader downloader.Downloader) error

UpdateTemplate update template

func UpdateTemplateWithGit added in v0.2.0

func UpdateTemplateWithGit(name string) error

UpdateTemplateWithGit update template with Git

Types

type Config added in v0.2.0

type Config struct {
	Parameters Parameters `yaml:"parameters" json:"parameters"`
	Git        Git        `yaml:"git" json:"git"`
}

Config appboot config from appboot.yaml

func GetConfigFromYaml added in v0.2.0

func GetConfigFromYaml(yamlPath string) (config *Config, err error)

GetConfig get config from yaml path

func GetTemplateConfig added in v0.2.0

func GetTemplateConfig(template string) *Config

GetTemplateConfig get template config

type File added in v0.2.0

type File struct {
	Path    string
	Content string
}

File file in template

type FloatParameter added in v0.2.0

type FloatParameter struct {
	Key     string  `yaml:"key" json:"key"`
	Default float64 `yaml:"default" json:"default"`
	Min     float64 `yaml:"min" json:"min"`
	Max     float64 `yaml:"max" json:"max"`
}

FloatParameter float parameter

func (*FloatParameter) UnmarshalYAML added in v0.2.0

func (p *FloatParameter) UnmarshalYAML(unmarshal func(interface{}) error) error

type Git added in v0.2.0

type Git struct {
	Prefix string `yaml:"prefix" json:"prefix"`
}

Git git

type IntParameter added in v0.2.0

type IntParameter struct {
	Key     string `yaml:"key" json:"key"`
	Default int64  `yaml:"default" json:"default"`
	Min     int64  `yaml:"min" json:"min"`
	Max     int64  `yaml:"max" json:"max"`
}

IntParameter int parameter

func (*IntParameter) UnmarshalYAML added in v0.2.0

func (p *IntParameter) UnmarshalYAML(unmarshal func(interface{}) error) error

type Parameters added in v0.2.0

type Parameters struct {
	StringParameters []StringParameter `yaml:"string" json:"string"`
	IntParameters    []IntParameter    `yaml:"int" json:"int"`
	FloatParameters  []FloatParameter  `yaml:"float" json:"float"`
}

Parameters parameters

type StringParameter added in v0.2.0

type StringParameter struct {
	Key     string `yaml:"key" json:"key"`
	Default string `yaml:"default" json:"default"`
}

StringParameter string parameter

Jump to

Keyboard shortcuts

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