Documentation ¶
Index ¶
- func Add(subcomponent core.Component) (err error)
- func Execute()
- func FindComponent(keyword string) error
- func Generate(startPath string, environments []string, validate bool) (components []core.Component, err error)
- func GetFabrikateComponents(codeResults []github.CodeResult) []string
- func Install(path string) (err error)
- func PrintVersion()
- func Remove(subcomponent core.Component) (err error)
- func Set(environment string, subcomponent string, pathValuePairStrings []string, ...) (err error)
- func SplitPathParts(path string) (pathParts []string, err error)
- func SplitPathValuePairs(pathValuePairStrings []string) (pathValuePairs []core.PathValuePair, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Add ¶
Add implements the 'add' command in Fabrikate. It takes a spec for the new subcomponent, loads the previous component (if any), adds the subcomponent, and serializes the new component back out.
func Execute ¶
func Execute()
Execute adds all child commands to the root command and sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.
func FindComponent ¶
FindComponent finds fabrikate components in the fabrikate-definitions repository that are related to the given keyword.
func Generate ¶
func Generate(startPath string, environments []string, validate bool) (components []core.Component, err error)
Generate implements the 'generate' command. It takes a set of environments and a validation flag and iterates through the component tree, generating components as it reaches them, and writing all of the generated manifests at the very end.
func GetFabrikateComponents ¶
func GetFabrikateComponents(codeResults []github.CodeResult) []string
GetFabrikateComponents returns a unique list of fabrikate components from a github search result
func Install ¶
Install implements the 'install' command. It installs the component at the given path and all of its subcomponents by iterating the component subtree.
func PrintVersion ¶
func PrintVersion()
PrintVersion prints the current version of Fabrikate being used.
func Remove ¶
Remove implements the `remove` command. Taking in a list of subcomponent names, this function will load the root component and attempt to remove any subcomponents with names matching those provided.
func Set ¶
func Set(environment string, subcomponent string, pathValuePairStrings []string, noNewConfigKeys bool, inputFile string) (err error)
Set implements the 'set' command. It takes an environment, a set of config path / value strings (and a subcomponent if the config should be set on a subcomponent versus the component itself) and sets the config in the appropriate config file, writing the result out to disk at the end.
func SplitPathParts ¶
SplitPathParts splits path string at . while ignoring string literals enclosed in quotes (".") and returns an array //
func SplitPathValuePairs ¶
func SplitPathValuePairs(pathValuePairStrings []string) (pathValuePairs []core.PathValuePair, err error)
SplitPathValuePairs splits array of key/value pairs and returns array of path value pairs ([] PathValuePair) //
Types ¶
This section is empty.