Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Configuration ¶
type Configuration struct {
// Ignore defines regular expressions for the files to ignore.
Ignore []string `yaml:"ignore"`
// Scripts defines custom scripts for the templates.
Scripts map[string]string `yaml:"scripts"`
// Variable defines the variables required by the templates.
Variables []Variable `yaml:"variables"`
}
Configuration represents the configuration for a repository.
type File ¶
type File struct {
// Bytes defines the content of the file.
Bytes []byte
// Info defines the info of the file.
Info os.FileInfo
// Path defines the relative path of the file.
Path string
}
File represents a file from a repository.
type Repository ¶
type Repository struct {
// Scripts defines the scripts for the repository.
Scripts map[string]string
// Variables defines the variables for the repository.
Variables []Variable
// contains filtered or unexported fields
}
Repository represents a template repository.
func Open ¶
func Open(repositoryURL string, configurationFile string) (*Repository, error)
Open returns a repository ready for processing.
func (*Repository) Close ¶
func (r *Repository) Close() error
Close frees up all resources associated within the repository.
type Variable ¶
type Variable struct {
// Name defines the name of the variable.
Name string `yaml:"name"`
// Description defines the description the variable.
Description string `yaml:"description"`
// Value defines the value of the variable.
Value string `yaml:"value"`
// Pattern defines a regex pattern for valid values.
Pattern string `yaml:"pattern"`
}
Variable represents a variable for substitution in a template.
Click to show internal directories.
Click to hide internal directories.