interfaces

package
v3.0.0+incompatible Latest Latest
Warning

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

Go to latest
Published: May 1, 2018 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Action

type Action interface {
	Initially() error
	Execute() error
	Verify() error
	Success() error
	Undo() error
	Finally() error
}

type ActionCreator

type ActionCreator interface {
	SetUp() error
	CleanUp()
	OnStart() error
	OnFinish(environment S.Environment, response io.ReadWriter, err error) DeployResponse
	Create(environment S.Environment, response io.ReadWriter, foundationURL string) (Action, error)
	InitiallyError(initiallyErrors []error) error
	ExecuteError(executeErrors []error) error
	UndoError(executeErrors, undoErrors []error) error
	SuccessError(successErrors []error) error
}

type Authorization

type Authorization struct {
	Username string
	Password string
}

type Binding

type Binding interface {
	Accepts(event interface{}) bool
	Emit(event interface{}) error
}

type BlueGreener

type BlueGreener interface {
	Execute(
		actionCreator ActionCreator,
		environment S.Environment,
		response io.ReadWriter,
	) error
}

type CFContext

type CFContext struct {
	Environment  string
	Organization string
	Space        string
	Application  string
	UUID         string
	SkipSSL      bool
}

type Client added in v0.7.0

type Client interface {
	Get(url string) (*http.Response, error)
}

Client is an interface for http.Client.

type Controller

type Controller interface {
	RunDeployment(deployment *Deployment, response *bytes.Buffer) DeployResponse

	RunDeploymentViaHttp(g *gin.Context)

	PutRequestHandler(g *gin.Context)
}

type Courier

type Courier interface {
	Login(foundationURL, username, password, org, space string, skipSSL bool) ([]byte, error)
	Delete(appName string) ([]byte, error)
	Push(appName, appLocation, hostname string, instances uint16) ([]byte, error)
	Rename(oldName, newName string) ([]byte, error)
	MapRoute(appName, domain, hostname string) ([]byte, error)
	MapRouteWithPath(appName, domain, hostname, path string) ([]byte, error)
	UnmapRoute(appName, domain, hostname string) ([]byte, error)
	UnmapRouteWithPath(appName, domain, hostname, path string) ([]byte, error)
	DeleteRoute(domain, hostname string) ([]byte, error)
	CreateService(service, plan, name string) ([]byte, error)
	BindService(appName, serviceName string) ([]byte, error)
	UnbindService(appName, serviceName string) ([]byte, error)
	DeleteService(serviceName string) ([]byte, error)
	Start(appName string) ([]byte, error)
	Stop(appName string) ([]byte, error)
	Restage(appName string) ([]byte, error)
	Logs(appName string) ([]byte, error)
	Exists(appName string) bool
	Cups(appName string, body string) ([]byte, error)
	Uups(appName string, body string) ([]byte, error)
	Domains() ([]string, error)
	CleanUp() error
}

Courier interface.

type DeployResponse

type DeployResponse struct {
	StatusCode     int
	DeploymentInfo *structs.DeploymentInfo
	Error          error
}

type Deployer

type Deployer interface {
	Deploy(
		deploymentInfo *structs.DeploymentInfo,
		environment structs.Environment,
		actionCreator ActionCreator,
		response io.ReadWriter,
	) *DeployResponse
}

Deployer interface.

type Deployment

type Deployment struct {
	Body          *[]byte
	Type          DeploymentType
	Authorization Authorization
	CFContext     CFContext
}

type DeploymentError

type DeploymentError interface {
	Code() string
	Error() string
}

type DeploymentType

type DeploymentType struct {
	JSON bool
	ZIP  bool
}

type Endpoints

type Endpoints interface {
	Deploy(c *gin.Context)
}

Endpoints interface.

type ErrorFinder

type ErrorFinder interface {
	FindErrors(responseString string) []LogMatchedError
}

type ErrorMatcher

type ErrorMatcher interface {
	Descriptor() string
	Match(matchTo []byte) LogMatchedError
}

type Event

type Event struct {
	Type  string
	Data  interface{}
	Error error
}

func (Event) Name

func (e Event) Name() string

type EventManager

type EventManager interface {
	AddHandler(handler Handler, eventType string) error
	Emit(event Event) error
	EmitEvent(event IEvent) error
	AddBinding(binding Binding)
}

EventManager interface.

type Executor

type Executor interface {
	Execute(args ...string) ([]byte, error)
	ExecuteInDirectory(directory string, args ...string) ([]byte, error)
	CleanUp() error
}

Executor interface.

type Extractor

type Extractor interface {
	Unzip(source, destination, manifest string) error
}

Extractor interface.

type Fetcher

type Fetcher interface {
	Fetch(url, manifest string) (string, error)
	FetchZipFromRequest(body io.Reader) (string, string, error)
}

Fetcher interface.

type Handler

type Handler interface {
	OnEvent(event Event) error
}

Handler interface.

type HealthChecker added in v0.7.0

type HealthChecker interface {
	Check(endpoint, serverURL string) error
}

HealthChecker interface.

type IEvent

type IEvent interface {
	Name() string
}

type LogMatchedError

type LogMatchedError interface {
	Code() string
	Error() string
	Details() []string
	Solution() string
}

type Logger added in v0.6.0

type Logger interface {
	Error(...interface{})
	Errorf(string, ...interface{})
	Debug(...interface{})
	Debugf(string, ...interface{})
	Info(...interface{})
	Infof(string, ...interface{})
	Fatal(...interface{})
}

type Prechecker

type Prechecker interface {
	AssertAllFoundationsUp(environment S.Environment) error
}

Prechecker interface.

type PushController

type PushController interface {
	RunDeployment(deployment *Deployment, response *bytes.Buffer) (deployResponse DeployResponse)
}

type PushManagerFactory

type PushManagerFactory interface {
	PushManager(deployEventData structs.DeployEventData, cfContext CFContext, auth Authorization, env structs.Environment, envVars map[string]string) ActionCreator
}

type Randomizer

type Randomizer interface {
	StringRunes(length int) string
}

Randomizer interface.

type StartController

type StartController interface {
	StartDeployment(deployment *Deployment, data map[string]interface{}, response *bytes.Buffer) (deployResponse DeployResponse)
}

type StartManagerFactory

type StartManagerFactory interface {
	StartManager(deployEventData structs.DeployEventData) ActionCreator
}

type StartStopEventData

type StartStopEventData struct {
	FoundationURL string
	Context       CFContext
	Courier       interface{}
	Response      io.ReadWriter
}

PushEventData has a RequestBody and DeploymentInfo.

type StopController

type StopController interface {
	StopDeployment(deployment *Deployment, data map[string]interface{}, response *bytes.Buffer) (deployResponse DeployResponse)
}

type StopManagerFactory

type StopManagerFactory interface {
	StopManager(deployEventData structs.DeployEventData) ActionCreator
}

Jump to

Keyboard shortcuts

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