loader

package
v3.0.2+incompatible Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2018 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// StagingEnvironment is used to apply a namespace
	StagingEnvironment = "staging"
	// ProductionEnvironment is used to apply a namespace
	ProductionEnvironment = "production"
)

Variables

This section is empty.

Functions

func ReplaceVariablesInFile

func ReplaceVariablesInFile(fileSystem afero.Fs, path string, functionCall Callable) error

Types

type Bitbucket

type Bitbucket struct {
	ClientID       string `yaml:"client_id"`
	ClientSecret   string `yaml:"client_secret"`
	Username       string `yaml:"username"`
	RepositoryName string `yaml:"repository_name"`
	ApiUrl         string `yaml:"api_url"`
	TokenUrl       string `yaml:"token_url"`
}

type BranchLoader

type BranchLoader struct {
}

func (*BranchLoader) LoadBranches

func (b *BranchLoader) LoadBranches(bitbucket Bitbucket) ([]string, error)

type BranchLoaderInterface

type BranchLoaderInterface interface {
	LoadBranches(bitbucket Bitbucket) ([]string, error)
}

type Callable

type Callable func([]string) error

type Cleanup

type Cleanup struct {
	ImagePath string `yaml:"image_path"`
}

type Cluster

type Cluster struct {
	Type      string
	ProjectID string `yaml:"project_id" validate:"required"`
	ClusterID string `yaml:"cluster_id" validate:"required"`
	Zone      string
}

type Config

type Config struct {
	KubernetesConfigFilepath string `yaml:"kubernetes_config_filepath"`
	Endpoints                Endpoints
	Cluster                  Cluster
	Bitbucket                Bitbucket
	Cleanup                  Cleanup
	DNS                      DNSConfig `yaml:"dns"`
	Database                 Database
	Namespace                Namespace `validate:"required"`
}

Config for the kube-helper

type ConfigLoader

type ConfigLoader interface {
	LoadConfigFromPath(filepath string) (Config, error)
}

ConfigLoader API

func NewConfigLoader

func NewConfigLoader() ConfigLoader

NewConfigLoader is the constructor method and returns a service which implements ConfigLoader

type DNSConfig

type DNSConfig struct {
	ProjectID    string   `yaml:"project_id"`
	ManagedZone  string   `yaml:"managed_zone"`
	DomainSuffix string   `yaml:"domain_suffix"`
	BaseDomain   string   `yaml:"base_domain"`
	DomainSpacer string   `yaml:"domain_spacer"`
	CNameSuffix  []string `yaml:"cname_suffix"`
}

type Database

type Database struct {
	Instance             string
	BaseName             string `yaml:"base_name"`
	PrefixBranchDatabase string `yaml:"prefix_branch_database"`
	Bucket               string
}

type Endpoints

type Endpoints struct {
	Enabled bool
}

type Namespace

type Namespace struct {
	Prefix string
}

type ReplaceFunc

type ReplaceFunc func(fileSystem afero.Fs, path string, functionCall Callable) error

Jump to

Keyboard shortcuts

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