templates

package
v2.0.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2017 License: Apache-2.0 Imports: 7 Imported by: 9

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Deployments added in v1.1.0

func Deployments(env, branch string) ([]string, error)

Deployments returns a list of deployments for the given environment

func InitGit added in v1.1.0

func InitGit(config *GitConfig)

InitGit initializes the git templates service with the global git service

func Pods

func Pods(env, branch string) ([]string, error)

Pods returns a list of pods for the given environment

Types

type GitConfig added in v1.1.0

type GitConfig struct {
	EnvContentsPaths map[string]string
}

GitConfig is the configuration for the git tempaltes service

type Service

type Service interface {
	Deployments(env, branch string) ([]string, error)
	Deployment(env, branch, name string) (Template, error)
	Pods(env, branch string) ([]string, error)
	Pod(env, branch, name string) (Template, error)
	Environment(branch string) (Template, error)
}

Service is a template service that returns controller and pod templates for given environments

type Template

type Template string

Template is a yaml string template of a controller of a pod

func Deployment added in v1.1.0

func Deployment(env, branch, name string) (Template, error)

Deployment returns a deployment for the given environment

func Environment added in v1.1.0

func Environment(branch string) (Template, error)

Environment returns an environment template for the given branch

func Pod

func Pod(env, branch, name string) (Template, error)

Pod returns a list of pods for the given environment

func (Template) Parse

func (t Template) Parse(into interface{}) error

Parse parses template into the given interface

func (Template) Populate

func (t Template) Populate(data interface{}) (Template, error)

Populate populates the template with variables and returns a new Template instance

Jump to

Keyboard shortcuts

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