Documentation ¶
Index ¶
- type ContextOpts
- type GFlowsConfig
- func (config *GFlowsConfig) GetAllDependencies() []string
- func (config *GFlowsConfig) GetAllLibs() []string
- func (config *GFlowsConfig) GetTemplateArrayProperty(workflowName string, selector func(config *GFlowsTemplateConfig) []string) []string
- func (config *GFlowsConfig) GetTemplateDeps(workflowName string) []string
- func (config *GFlowsConfig) GetTemplateLibs(workflowName string) []string
- func (config *GFlowsConfig) GetWorkflowBoolProperty(workflowName string, defaultValue bool, ...) bool
- func (config *GFlowsConfig) GetWorkflowStringProperty(workflowName string, selector func(config *GFlowsWorkflowConfig) string) string
- type GFlowsContext
- func (context *GFlowsContext) GetPathInfo(localPath string) (*pkg.PathInfo, error)
- func (context *GFlowsContext) LibsDir() string
- func (context *GFlowsContext) ResolvePath(path string) string
- func (context *GFlowsContext) ResolvePaths(paths []string) []string
- func (context *GFlowsContext) WorkflowsDir() string
- type GFlowsTemplateConfig
- type GFlowsWorkflowConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ContextOpts ¶
type ContextOpts struct { ConfigPath string EnableColors bool Debug bool Engine string AllowNoContext bool }
func CreateContextOpts ¶
func CreateContextOpts(cmd *cobra.Command) ContextOpts
CreateContextOpts - creates ContextOpts from flags and environment variables
type GFlowsConfig ¶
type GFlowsConfig struct { GithubDir string `yaml:"githubDir"` Workflows struct { Defaults GFlowsWorkflowConfig Overrides map[string]*GFlowsWorkflowConfig } Templates struct { Engine string Defaults GFlowsTemplateConfig Overrides map[string]*GFlowsTemplateConfig } }
GFlowsConfig - type of current gflows context
func LoadConfig ¶
func LoadConfig(fs *afero.Afero, logger *io.Logger, opts ContextOpts) (config *GFlowsConfig, err error)
LoadConfig - finds and returns the GFlowsConfig
func (*GFlowsConfig) GetAllDependencies ¶
func (config *GFlowsConfig) GetAllDependencies() []string
func (*GFlowsConfig) GetAllLibs ¶
func (config *GFlowsConfig) GetAllLibs() []string
func (*GFlowsConfig) GetTemplateArrayProperty ¶
func (config *GFlowsConfig) GetTemplateArrayProperty(workflowName string, selector func(config *GFlowsTemplateConfig) []string) []string
func (*GFlowsConfig) GetTemplateDeps ¶
func (config *GFlowsConfig) GetTemplateDeps(workflowName string) []string
func (*GFlowsConfig) GetTemplateLibs ¶
func (config *GFlowsConfig) GetTemplateLibs(workflowName string) []string
func (*GFlowsConfig) GetWorkflowBoolProperty ¶
func (config *GFlowsConfig) GetWorkflowBoolProperty(workflowName string, defaultValue bool, selector func(config *GFlowsWorkflowConfig) *bool) bool
func (*GFlowsConfig) GetWorkflowStringProperty ¶
func (config *GFlowsConfig) GetWorkflowStringProperty(workflowName string, selector func(config *GFlowsWorkflowConfig) string) string
type GFlowsContext ¶
type GFlowsContext struct { Dir string ConfigPath string GitHubDir string Config *GFlowsConfig EnableColors bool }
GFlowsContext - current command context
func NewContext ¶
func NewContext(fs *afero.Afero, logger *io.Logger, opts ContextOpts) (*GFlowsContext, error)
func (*GFlowsContext) GetPathInfo ¶
func (context *GFlowsContext) GetPathInfo(localPath string) (*pkg.PathInfo, error)
func (*GFlowsContext) LibsDir ¶
func (context *GFlowsContext) LibsDir() string
func (*GFlowsContext) ResolvePath ¶
func (context *GFlowsContext) ResolvePath(path string) string
ResolvePath - returns paths relative to the working directory (since paths in configs may be written relative to the context directory instead)
func (*GFlowsContext) ResolvePaths ¶
func (context *GFlowsContext) ResolvePaths(paths []string) []string
ResolvePaths - returns an array of resolved paths
func (*GFlowsContext) WorkflowsDir ¶
func (context *GFlowsContext) WorkflowsDir() string
type GFlowsTemplateConfig ¶
type GFlowsWorkflowConfig ¶
Click to show internal directories.
Click to hide internal directories.