Documentation ¶
Index ¶
Constants ¶
View Source
const ( //DefaultGithubURL - the default url for a github repo DefaultGithubURL = "https://api.github.com" //DownloadURLElement - element in json response used for file download DownloadURLElement = "download_url" )
Variables ¶
View Source
var (
//DefaultConfigPath - the default path for the deployment config file
DefaultConfigPath = "config.yml"
)
Functions ¶
This section is empty.
Types ¶
type AppConfig ¶
type AppConfig struct {
Deployments []Deployment
}
AppConfig - a config object for a single app
type ApplicationDeployments ¶
ApplicationDeployments - the root object for a config.yml
func (*ApplicationDeployments) GetDeployment ¶
func (s *ApplicationDeployments) GetDeployment(appName, deploymentName string) (deployment Deployment)
GetDeployment - get the deployment details for the given app.deployment
func (*ApplicationDeployments) ListApps ¶
func (s *ApplicationDeployments) ListApps() (appNameList []string)
ListApps - list the apps available in the configuration file
func (*ApplicationDeployments) ListDeployments ¶
func (s *ApplicationDeployments) ListDeployments(appName string) (deploymentList []string)
ListDeployments - list the deployments available for the given application
type ConfigFetcher ¶
type ConfigFetcher struct { GithubOauthToken string ClientRepo ghClientDoer GithubURL string GithubOrg string Repo string Branch string }
ConfigFetcher - an object that can fetch remote config files
func (*ConfigFetcher) Fetch ¶
func (s *ConfigFetcher) Fetch(filePath string) (buf *bytes.Buffer, err error)
Fetch - executes a remote fetch against the given filepath in the repo
func (*ConfigFetcher) FetchConfig ¶
func (s *ConfigFetcher) FetchConfig() (appD *ApplicationDeployments, err error)
FetchConfig - executes a fetch using the default configpath value and parses the response into a applicationDeployment object
func (*ConfigFetcher) UseOauthClient ¶
func (s *ConfigFetcher) UseOauthClient()
UseOauthClient - adds the oauth2 github token to the client
type Deployment ¶
type Deployment struct { Name string URL string Space string Org string Path string PushCmd string `yaml:"push_cmd"` }
Deployment - a deployment object
type GithubContentResponse ¶ added in v1.0.2
type GithubContentResponse struct {
DownloadURL string `json:"download_url"`
}
Click to show internal directories.
Click to hide internal directories.