plugin

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2015 License: Apache-2.0 Imports: 12 Imported by: 0

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

func ReplaceEnvVars(args []string) (res []string)

Types

type CmdRunner added in v1.0.1

type CmdRunner interface {
	Run() error
}

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

Jump to

Keyboard shortcuts

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