handler

package
v0.0.0-...-b637c75 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2023 License: MIT Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddAdditionalEnvironment

func AddAdditionalEnvironment(requestEnv map[string]string, responseEnv map[string]string)

Types

type Exit

type Exit bool

Exit represents a planned exit without the need for further output.

func (Exit) Error

func (Exit) Error() string

Error outputs and empty string - the reason for failure will have already been output to the user.

type Handler

type Handler struct {
	ReleaseFolder string

	InputStream   io.Reader
	OutputStream  io.Writer
	ErrorStream   io.Writer
	ReleaseLoader common.ReleaseLoader
	ReleaseSaver  common.ReleaseSaver
	// contains filtered or unexported fields
}

Handler handles config requests.

func New

func New(opts *Opts) *Handler

New returns a new handler.

func (*Handler) AddDeployAccountCredentialsValue

func (h *Handler) AddDeployAccountCredentialsValue(request *common.PrepareTerraformRequest, team string, responseEnv map[string]string) error

func (*Handler) CheckAWSResources

func (h *Handler) CheckAWSResources() bool

CheckAWSResources checks that the Release Bucket, Tf State Bucket & Tf Locks Table are present

func (*Handler) CheckInputConfiguration

func (h *Handler) CheckInputConfiguration(config map[string]interface{}, inputEnv map[string]string) bool

CheckInputConfiguration checks config from cdflow.yaml and the input environment

func (*Handler) ConfigureRelease

func (h *Handler) ConfigureRelease(request *common.ConfigureReleaseRequest, response *common.ConfigureReleaseResponse) error

ConfigureRelease runs before the release to provide and check config.

func (*Handler) PrepareTerraform

func (h *Handler) PrepareTerraform(request *common.PrepareTerraformRequest, response *common.PrepareTerraformResponse, releaseDir string) error

func (*Handler) Setup

func (h *Handler) Setup(request *common.SetupRequest, response *common.SetupResponse) error

Setup handles a setup request in order to pipeline setup.

func (*Handler) UploadRelease

func (h *Handler) UploadRelease(request *common.UploadReleaseRequest, response *common.UploadReleaseResponse, configureReleaseRequest *common.ConfigureReleaseRequest, releaseDir string) error

type Opts

type Opts struct {
	S3Client       s3iface.S3API
	DynamoDBClient dynamodbiface.DynamoDBAPI
	ECRClient      ecriface.ECRAPI
	ReleaseDir     string
	InputStream    io.Reader
	OutputStream   io.Writer
	ErrorStream    io.Writer
	ReleaseSaver   common.ReleaseSaver
	ReleaseLoader  common.ReleaseLoader
}

Opts are the options for creating a new handler.

Jump to

Keyboard shortcuts

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