Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Environment ¶
type Environment struct { BaseImportPath string // Base import path for templates Inherits []string // Environments to inherit configs from User *EnvironmentUserConfig // User info for templates }
Specifies the environment for template generation.
func (*Environment) Merge ¶
func (config *Environment) Merge(other *Environment)
Merges other into config. Inherits are not merged, as this is used to eliminate inheritence.
type EnvironmentUserConfig ¶
type EnvironmentUserConfig struct { Name string // A real name or pseudonym Email string // An email address (potentially malformed) }
User (project author) details. All fields are optional.
func (*EnvironmentUserConfig) Merge ¶
func (config *EnvironmentUserConfig) Merge(other *EnvironmentUserConfig)
type Environments ¶
type Environments map[string]*Environment
A set of uniquely named environments.
func (Environments) Validate ¶
func (config Environments) Validate() (err error)
Validates the following for each environment
- The name must not contain spaces
- The environment must be valid (see Environment.Validate)
- All inherited environments must exist.
type ExternalTemplate ¶
type ExternalTemplate string
func (ExternalTemplate) Validate ¶
func (config ExternalTemplate) Validate() (err error)
type Gonew ¶
type Gonew struct { Default Defaults Environments Environments ExternalTemplates []ExternalTemplate Projects Projects }
func (Gonew) Environment ¶
func (config Gonew) Environment(name string) (*Environment, error)
func (*Gonew) MarshalFileJSON ¶
func (*Gonew) UnmarshalFileJSON ¶
type HookConfig ¶
type HookConfig struct { Cwd string // The working directory Cammonds should be executed from. Commands []string // A list of commands executed in order. }
func (*HookConfig) Merge ¶
func (config *HookConfig) Merge(other *ProjectHooksConfig)
type Project ¶
type Project struct { Inherits []string // Projects to inherit config from Hooks *ProjectHooksConfig // Hooks that run at specific times Files map[string]*ProjectFileConfig // Project file specifications }
type ProjectFileConfig ¶
type ProjectFileConfig struct { Path string // a template Type string // a 'filetype' that can be used in templates Templates []string // template names }
func (*ProjectFileConfig) Merge ¶
func (config *ProjectFileConfig) Merge(other *ProjectFileConfig)
type ProjectHooksConfig ¶
type ProjectHooksConfig struct { Pre []*HookConfig // Hooks that run before the project is generated. Post []*HookConfig // Hooks that run after the project is generated. }
func (*ProjectHooksConfig) Merge ¶
func (config *ProjectHooksConfig) Merge(other *ProjectHooksConfig)
Click to show internal directories.
Click to hide internal directories.