runner

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2020 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Unzip

func Unzip(r io.Reader, path string) error

func Zip

func Zip(w io.Writer, dir string) error

Types

type Blob

type Blob interface {
	Get(project string, workspace string) (io.ReadCloser, error)
	Put(project string, workspace string, source io.ReadSeeker) error
}

func NewBlobLocal

func NewBlobLocal(root string) Blob

func NewBlobS3

func NewBlobS3(bucket string, prefix string) Blob

type BlobLocal

type BlobLocal struct {
	// contains filtered or unexported fields
}

func (*BlobLocal) Get

func (b *BlobLocal) Get(project string, workspace string) (io.ReadCloser, error)

func (*BlobLocal) Put

func (b *BlobLocal) Put(project string, workspace string, source io.ReadSeeker) error

type BlobMock

type BlobMock struct {
	mock.Mock
}

func NewBlobMock

func NewBlobMock() *BlobMock

func (*BlobMock) Get

func (m *BlobMock) Get(project string, workspace string) (io.ReadCloser, error)

func (*BlobMock) Put

func (m *BlobMock) Put(project string, workspace string, source io.ReadSeeker) error

type BlobS3

type BlobS3 struct {
	// contains filtered or unexported fields
}

func (*BlobS3) Get

func (b *BlobS3) Get(project string, workspace string) (io.ReadCloser, error)

func (*BlobS3) Put

func (b *BlobS3) Put(project string, workspace string, source io.ReadSeeker) error

type Runner

type Runner struct {
	// contains filtered or unexported fields
}

func NewRunner

func NewRunner(projects map[string]*api.Project, client api.SchedulerClient, git utils.Git, tf Terraform, blob Blob) *Runner

func (*Runner) Apply

func (r *Runner) Apply(project string, workspace string) error

func (*Runner) Plan

func (r *Runner) Plan(project string, workspace string) error

type Terraform

type Terraform interface {
	Plan(option TerraformOption, workspace string, vars []string, varfiles []string, destroy bool) ([]byte, error)
	Apply(option TerraformOption, destroy bool) error
}

func NewTerraform

func NewTerraform() Terraform

type TerraformImpl

type TerraformImpl struct {
}

func (*TerraformImpl) Apply

func (t *TerraformImpl) Apply(option TerraformOption, destroy bool) error

func (*TerraformImpl) Plan

func (t *TerraformImpl) Plan(option TerraformOption, workspace string, vars []string, varfiles []string, destroy bool) ([]byte, error)

type TerraformMock

type TerraformMock struct {
	mock.Mock
}

func NewTerraformMock

func NewTerraformMock() *TerraformMock

func (*TerraformMock) Apply

func (m *TerraformMock) Apply(option TerraformOption, destroy bool) error

func (*TerraformMock) Plan

func (m *TerraformMock) Plan(option TerraformOption, workspace string, vars []string, varfiles []string, destroy bool) ([]byte, error)

type TerraformOption

type TerraformOption struct {
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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