Documentation ¶
Index ¶
- Constants
- func Create(app Application, force bool, beforeScripts []string, afterScripts []string, ...) error
- func CreateWithCallback(app Application, force bool, beforeScripts []string, afterScripts []string, ...) error
- func GetTemplates() []string
- func GetTemplatesGitHash() string
- func UpdateAllTemplates() error
- func UpdateAllTemplatesWithDownloader(downloader Downloader) error
- func UpdateTemplate(name string) error
- func UpdateTemplateWithDownloader(name string, downloader Downloader) error
- type Application
- type Callback
- type CreateCallback
- type Downloader
- type FloatParameter
- type IntParameter
- type Parameter
- type Scripts
- type SelectParameter
- type StringParameter
- type TemplateConfig
Constants ¶
const ( // Name template Name Name = "Name" // Path template Path Path = "Path" // ConfigFolder appboot configuration items ConfigFolder = "appboot" )
Variables ¶
This section is empty.
Functions ¶
func Create ¶
func Create(app Application, force bool, beforeScripts []string, afterScripts []string, skipBeforeScripts bool, skipAfterScripts bool) error
Create an application
func CreateWithCallback ¶
func CreateWithCallback(app Application, force bool, beforeScripts []string, afterScripts []string, skipBeforeScripts bool, skipAfterScripts bool, callback *CreateCallback) error
CreateWithCallback create an application with callback
func GetTemplatesGitHash ¶ added in v0.5.0
func GetTemplatesGitHash() string
func UpdateAllTemplates ¶
func UpdateAllTemplates() error
UpdateAllTemplates update all templates with git
func UpdateAllTemplatesWithDownloader ¶
func UpdateAllTemplatesWithDownloader(downloader Downloader) error
UpdateAllTemplatesWithDownloader update all templates
func UpdateTemplate ¶
UpdateTemplate update template with Git
func UpdateTemplateWithDownloader ¶
func UpdateTemplateWithDownloader(name string, downloader Downloader) error
UpdateTemplateWithDownloader update template
Types ¶
type Application ¶
Application data struct
func (Application) CreateFiles ¶
func (app Application) CreateFiles() error
CreateFiles create files
func (*Application) Description ¶
func (app *Application) Description() string
Description application description
func (*Application) GetParameters ¶
func (app *Application) GetParameters() (map[string]string, error)
GetParameters get application parameters
func (*Application) GetTemplatePath ¶
func (app *Application) GetTemplatePath() string
GetTemplatePath application template path
type CreateCallback ¶
CreateCallback create callback
type Downloader ¶
Downloader downloader interface
type FloatParameter ¶
type FloatParameter struct { Parameter Min float64 `yaml:"min" json:"min"` Max float64 `yaml:"max" json:"max"` Default float64 `yaml:"default" json:"default"` }
FloatParameter float parameter
type IntParameter ¶
type IntParameter struct { Parameter Min int `yaml:"min" json:"min"` Max int `yaml:"max" json:"max"` Default int `yaml:"default" json:"default"` }
IntParameter int parameter
type Scripts ¶ added in v0.4.0
type Scripts struct { Before []string `yaml:"before" json:"before"` After []string `yaml:"after" json:"after"` }
Scripts scripts
type SelectParameter ¶
type SelectParameter struct { Parameter Options []string `yaml:"options" json:"options"` Default string `yaml:"default" json:"default"` }
SelectParameter select parameter
type StringParameter ¶
type TemplateConfig ¶
type TemplateConfig struct { Parameters []interface{} `yaml:"parameters" json:"parameters"` Desc string `yaml:"desc" json:"desc"` Scripts Scripts `yaml:"scripts" json:"scripts"` }
TemplateConfig appboot config from appboot.yaml
func GetTemplateConfig ¶
func GetTemplateConfig(template string) (*TemplateConfig, error)
GetTemplateConfig get template config
func GetTemplateConfigFromYaml ¶
func GetTemplateConfigFromYaml(yamlPath string) (config *TemplateConfig, err error)
GetTemplateConfigFromYaml get config from yaml path
func (*TemplateConfig) UnmarshalYAML ¶ added in v0.4.0
func (p *TemplateConfig) UnmarshalYAML(unmarshal func(interface{}) error) error
UnmarshalYAML unmarshalYAML