cmd

package
v0.17.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 9, 2020 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Add

func Add(subcomponent core.Component) (err error)

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

func FindComponent(keyword string) error

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

func Install(path string) (err error)

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

func Remove(subcomponent core.Component) (err error)

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

func SplitPathParts(path string) (pathParts []string, err error)

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL