Version: v1.0.2 Latest Latest

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

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




View Source
const (
	//DefaultGithubURL - the default url for a github repo
	DefaultGithubURL = ""
	//DownloadURLElement - element in json response used for file download
	DownloadURLElement = "download_url"


View Source
var (
	//DefaultConfigPath - the default path for the deployment config file
	DefaultConfigPath = "config.yml"


This section is empty.


type AppConfig

type AppConfig struct {
	Deployments []Deployment

AppConfig - a config object for a single app

type ApplicationDeployments

type ApplicationDeployments struct {
	Applications map[string]AppConfig

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"`

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL