Documentation ¶
Index ¶
Constants ¶
View Source
const ( //Prefix - default prefix identifier for a ENV Var in command Prefix = "${" //Suffix - default suffix identifier for a ENV Var in command Suffix = "}" //TokenEnvName - env var name to store your github oauth token TokenEnvName = "GH_TOKEN" //CFUserEnvName - env var name to store your cf user CFUserEnvName = "CF_USER" //CFPassEnvName - env var name to store your cf user's password CFPassEnvName = "CF_PASS" )
Variables ¶
View Source
var ( //ErrInvalidArgs - invalid argument error ErrInvalidArgs = errors.New("invalid arguments") //Logger - default logger object Logger logger = log.New(os.Stdout, "[DeployCloudPlugin]", log.Lshortfile) //MakeConfigFetcher - function to create the default config fetcher (github oauth) MakeConfigFetcher = func(token, org, repo, branch, url string) (configFetcher *remoteconfig.ConfigFetcher) { configFetcher = &remoteconfig.ConfigFetcher{ GithubOauthToken: token, GithubOrg: org, Repo: repo, Branch: branch, GithubURL: url, } configFetcher.UseOauthClient() return } MakeCmdRunner = func(args ...string) CmdRunner { runner := exec.Command(args[0], args[1:]...) runner.Stdout = os.Stdout runner.Stderr = os.Stderr return runner } )
Functions ¶
func ReplaceEnvVars ¶ added in v1.0.2
Types ¶
type DeployCloudPlugin ¶
type DeployCloudPlugin struct { Errors []error // contains filtered or unexported fields }
DeployCloudPlugin - deploy cloud plugin object
func (*DeployCloudPlugin) GetMetadata ¶
func (s *DeployCloudPlugin) GetMetadata() plugin.PluginMetadata
GetMetadata - cf cli plugin metadata definition
func (*DeployCloudPlugin) Run ¶
func (s *DeployCloudPlugin) Run(cliConnection plugin.CliConnection, args []string)
Run - cf cli required Run method
Click to show internal directories.
Click to hide internal directories.