interfaces

package
v2.1.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Mar 28, 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 Authorization

type Authorization struct {
	Username string
	Password string
}

type BlueGreener

type BlueGreener interface {
	Push(
		environment S.Environment,
		appPath string,
		deploymentInfo S.DeploymentInfo,
		response io.ReadWriter,
	) DeploymentError
}

BlueGreener interface.

type CFContext

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

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)
}

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)
	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
	Error          error
	DeploymentInfo *structs.DeploymentInfo
}

type Deployer

type Deployer interface {
	Deploy(
		req *http.Request,
		environment,
		org,
		space,
		appName,
		uuid string,
		contentType DeploymentType,
		response io.ReadWriter,
		reqChan chan 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
}

type EventManager

type EventManager interface {
	AddHandler(handler Handler, eventType string) error
	Emit(event Event) error
}

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(*http.Request) (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 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 Pusher

type Pusher interface {
	Login(foundationURL string) error
	Push(appPath, foundationURL string) error
	FinishPush() error
	UndoPush() error
	CleanUp() error
}

Pusher interface.

type PusherCreator added in v0.7.0

type PusherCreator interface {
	CreatePusher(deploymentInfo S.DeploymentInfo, response io.ReadWriter) (Pusher, error)
}

PusherCreator interface.

type Randomizer

type Randomizer interface {
	StringRunes(length int) string
}

Randomizer interface.

Jump to

Keyboard shortcuts

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