provider

package
v0.0.0-...-218c583 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2017 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ErrorNotFound

func ErrorNotFound(err error) bool

ErrorNotFound returns true if the error is a "not found" type

Types

type MockProvider

type MockProvider struct {
	mock.Mock
}

MockProvider is an autogenerated mock type for the Provider type

func (*MockProvider) AppCancel

func (_m *MockProvider) AppCancel(name string) error

AppCancel provides a mock function with given fields: name

func (*MockProvider) AppDelete

func (_m *MockProvider) AppDelete(name string) error

AppDelete provides a mock function with given fields: name

func (*MockProvider) AppGet

func (_m *MockProvider) AppGet(name string) (*structs.App, error)

AppGet provides a mock function with given fields: name

func (*MockProvider) BuildCreate

func (_m *MockProvider) BuildCreate(app string, method string, source string, opts structs.BuildOptions) (*structs.Build, error)

BuildCreate provides a mock function with given fields: app, method, source, opts

func (*MockProvider) BuildDelete

func (_m *MockProvider) BuildDelete(app string, id string) (*structs.Build, error)

BuildDelete provides a mock function with given fields: app, id

func (*MockProvider) BuildExport

func (_m *MockProvider) BuildExport(app string, id string, w io.Writer) error

BuildExport provides a mock function with given fields: app, id, w

func (*MockProvider) BuildGet

func (_m *MockProvider) BuildGet(app string, id string) (*structs.Build, error)

BuildGet provides a mock function with given fields: app, id

func (*MockProvider) BuildImport

func (_m *MockProvider) BuildImport(app string, r io.Reader) (*structs.Build, error)

BuildImport provides a mock function with given fields: app, r

func (*MockProvider) BuildList

func (_m *MockProvider) BuildList(app string, limit int64) (structs.Builds, error)

BuildList provides a mock function with given fields: app, limit

func (*MockProvider) BuildLogs

func (_m *MockProvider) BuildLogs(app string, id string, w io.Writer) error

BuildLogs provides a mock function with given fields: app, id, w

func (*MockProvider) BuildRelease

func (_m *MockProvider) BuildRelease(_a0 *structs.Build) (*structs.Release, error)

BuildRelease provides a mock function with given fields: _a0

func (*MockProvider) BuildSave

func (_m *MockProvider) BuildSave(_a0 *structs.Build) error

BuildSave provides a mock function with given fields: _a0

func (*MockProvider) CapacityGet

func (_m *MockProvider) CapacityGet() (*structs.Capacity, error)

CapacityGet provides a mock function with given fields:

func (*MockProvider) CertificateCreate

func (_m *MockProvider) CertificateCreate(pub string, key string, chain string) (*structs.Certificate, error)

CertificateCreate provides a mock function with given fields: pub, key, chain

func (*MockProvider) CertificateDelete

func (_m *MockProvider) CertificateDelete(id string) error

CertificateDelete provides a mock function with given fields: id

func (*MockProvider) CertificateGenerate

func (_m *MockProvider) CertificateGenerate(domains []string) (*structs.Certificate, error)

CertificateGenerate provides a mock function with given fields: domains

func (*MockProvider) CertificateList

func (_m *MockProvider) CertificateList() (structs.Certificates, error)

CertificateList provides a mock function with given fields:

func (*MockProvider) EnvironmentGet

func (_m *MockProvider) EnvironmentGet(app string) (structs.Environment, error)

EnvironmentGet provides a mock function with given fields: app

func (*MockProvider) EventSend

func (_m *MockProvider) EventSend(_a0 *structs.Event, _a1 error) error

EventSend provides a mock function with given fields: _a0, _a1

func (*MockProvider) FormationGet

func (_m *MockProvider) FormationGet(app string, process string) (*structs.ProcessFormation, error)

FormationGet provides a mock function with given fields: app, process

func (*MockProvider) FormationList

func (_m *MockProvider) FormationList(app string) (structs.Formation, error)

FormationList provides a mock function with given fields: app

func (*MockProvider) FormationSave

func (_m *MockProvider) FormationSave(app string, pf *structs.ProcessFormation) error

FormationSave provides a mock function with given fields: app, pf

func (*MockProvider) IndexDiff

func (_m *MockProvider) IndexDiff(_a0 *structs.Index) ([]string, error)

IndexDiff provides a mock function with given fields: _a0

func (*MockProvider) IndexDownload

func (_m *MockProvider) IndexDownload(_a0 *structs.Index, _a1 string) error

IndexDownload provides a mock function with given fields: _a0, _a1

func (*MockProvider) IndexUpload

func (_m *MockProvider) IndexUpload(_a0 string, _a1 []byte) error

IndexUpload provides a mock function with given fields: _a0, _a1

func (*MockProvider) Initialize

func (_m *MockProvider) Initialize(opts structs.ProviderOptions) error

Initialize provides a mock function with given fields: opts

func (*MockProvider) InstanceList

func (_m *MockProvider) InstanceList() (structs.Instances, error)

InstanceList provides a mock function with given fields:

func (*MockProvider) InstanceTerminate

func (_m *MockProvider) InstanceTerminate(id string) error

InstanceTerminate provides a mock function with given fields: id

func (*MockProvider) KeyDecrypt

func (_m *MockProvider) KeyDecrypt(data []byte) ([]byte, error)

KeyDecrypt provides a mock function with given fields: data

func (*MockProvider) KeyEncrypt

func (_m *MockProvider) KeyEncrypt(data []byte) ([]byte, error)

KeyEncrypt provides a mock function with given fields: data

func (*MockProvider) LogStream

func (_m *MockProvider) LogStream(app string, w io.Writer, opts structs.LogStreamOptions) error

LogStream provides a mock function with given fields: app, w, opts

func (*MockProvider) ObjectDelete

func (_m *MockProvider) ObjectDelete(key string) error

ObjectDelete provides a mock function with given fields: key

func (*MockProvider) ObjectExists

func (_m *MockProvider) ObjectExists(key string) bool

ObjectExists provides a mock function with given fields: key

func (*MockProvider) ObjectFetch

func (_m *MockProvider) ObjectFetch(key string) (io.ReadCloser, error)

ObjectFetch provides a mock function with given fields: key

func (*MockProvider) ObjectList

func (_m *MockProvider) ObjectList(prefix string) ([]string, error)

ObjectList provides a mock function with given fields: prefix

func (*MockProvider) ObjectStore

func (_m *MockProvider) ObjectStore(key string, r io.Reader, opts structs.ObjectOptions) (string, error)

ObjectStore provides a mock function with given fields: key, r, opts

func (*MockProvider) ProcessExec

func (_m *MockProvider) ProcessExec(app string, pid string, command string, stream io.ReadWriter, opts structs.ProcessExecOptions) error

ProcessExec provides a mock function with given fields: app, pid, command, stream, opts

func (*MockProvider) ProcessGet

func (_m *MockProvider) ProcessGet(app string, pid string) (*structs.Process, error)

ProcessGet provides a mock function with given fields: app, pid

func (*MockProvider) ProcessList

func (_m *MockProvider) ProcessList(app string) (structs.Processes, error)

ProcessList provides a mock function with given fields: app

func (*MockProvider) ProcessRun

func (_m *MockProvider) ProcessRun(app string, process string, opts structs.ProcessRunOptions) (string, error)

ProcessRun provides a mock function with given fields: app, process, opts

func (*MockProvider) ProcessStop

func (_m *MockProvider) ProcessStop(app string, pid string) error

ProcessStop provides a mock function with given fields: app, pid

func (*MockProvider) RegistryAdd

func (_m *MockProvider) RegistryAdd(server string, username string, password string) (*structs.Registry, error)

RegistryAdd provides a mock function with given fields: server, username, password

func (*MockProvider) RegistryDelete

func (_m *MockProvider) RegistryDelete(server string) error

RegistryDelete provides a mock function with given fields: server

func (*MockProvider) RegistryList

func (_m *MockProvider) RegistryList() (structs.Registries, error)

RegistryList provides a mock function with given fields:

func (*MockProvider) ReleaseDelete

func (_m *MockProvider) ReleaseDelete(app string, buildID string) error

ReleaseDelete provides a mock function with given fields: app, buildID

func (*MockProvider) ReleaseGet

func (_m *MockProvider) ReleaseGet(app string, id string) (*structs.Release, error)

ReleaseGet provides a mock function with given fields: app, id

func (*MockProvider) ReleaseList

func (_m *MockProvider) ReleaseList(app string, limit int64) (structs.Releases, error)

ReleaseList provides a mock function with given fields: app, limit

func (*MockProvider) ReleasePromote

func (_m *MockProvider) ReleasePromote(_a0 *structs.Release) error

ReleasePromote provides a mock function with given fields: _a0

func (*MockProvider) ReleaseSave

func (_m *MockProvider) ReleaseSave(_a0 *structs.Release) error

ReleaseSave provides a mock function with given fields: _a0

func (*MockProvider) ResourceCreate

func (_m *MockProvider) ResourceCreate(name string, kind string, params map[string]string) (*structs.Resource, error)

ResourceCreate provides a mock function with given fields: name, kind, params

func (*MockProvider) ResourceDelete

func (_m *MockProvider) ResourceDelete(name string) (*structs.Resource, error)

ResourceDelete provides a mock function with given fields: name

func (*MockProvider) ResourceGet

func (_m *MockProvider) ResourceGet(name string) (*structs.Resource, error)

ResourceGet provides a mock function with given fields: name

func (_m *MockProvider) ResourceLink(name string, app string, process string) (*structs.Resource, error)

ResourceLink provides a mock function with given fields: name, app, process

func (*MockProvider) ResourceList

func (_m *MockProvider) ResourceList() (structs.Resources, error)

ResourceList provides a mock function with given fields:

func (_m *MockProvider) ResourceUnlink(name string, app string, process string) (*structs.Resource, error)

ResourceUnlink provides a mock function with given fields: name, app, process

func (*MockProvider) ResourceUpdate

func (_m *MockProvider) ResourceUpdate(name string, params map[string]string) (*structs.Resource, error)

ResourceUpdate provides a mock function with given fields: name, params

func (*MockProvider) SystemGet

func (_m *MockProvider) SystemGet() (*structs.System, error)

SystemGet provides a mock function with given fields:

func (*MockProvider) SystemLogs

func (_m *MockProvider) SystemLogs(w io.Writer, opts structs.LogStreamOptions) error

SystemLogs provides a mock function with given fields: w, opts

func (*MockProvider) SystemProcesses

func (_m *MockProvider) SystemProcesses(opts structs.SystemProcessesOptions) (structs.Processes, error)

SystemProcesses provides a mock function with given fields: opts

func (*MockProvider) SystemReleases

func (_m *MockProvider) SystemReleases() (structs.Releases, error)

SystemReleases provides a mock function with given fields:

func (*MockProvider) SystemSave

func (_m *MockProvider) SystemSave(system structs.System) error

SystemSave provides a mock function with given fields: system

type Provider

type Provider interface {
	Initialize(opts structs.ProviderOptions) error

	AppCancel(name string) error

	AppGet(name string) (*structs.App, error)
	AppDelete(name string) error

	BuildCreate(app, method, source string, opts structs.BuildOptions) (*structs.Build, error)
	BuildDelete(app, id string) (*structs.Build, error)
	BuildExport(app, id string, w io.Writer) error
	BuildGet(app, id string) (*structs.Build, error)
	BuildImport(app string, r io.Reader) (*structs.Build, error)
	BuildLogs(app, id string, w io.Writer) error
	BuildList(app string, limit int64) (structs.Builds, error)
	BuildRelease(*structs.Build) (*structs.Release, error)
	BuildSave(*structs.Build) error

	CapacityGet() (*structs.Capacity, error)

	CertificateCreate(pub, key, chain string) (*structs.Certificate, error)
	CertificateDelete(id string) error
	CertificateGenerate(domains []string) (*structs.Certificate, error)
	CertificateList() (structs.Certificates, error)

	EventSend(*structs.Event, error) error

	KeyDecrypt(data []byte) ([]byte, error)
	KeyEncrypt(data []byte) ([]byte, error)

	EnvironmentGet(app string) (structs.Environment, error)

	FormationList(app string) (structs.Formation, error)
	FormationGet(app, process string) (*structs.ProcessFormation, error)
	FormationSave(app string, pf *structs.ProcessFormation) error

	IndexDiff(*structs.Index) ([]string, error)
	IndexDownload(*structs.Index, string) error
	IndexUpload(string, []byte) error

	InstanceList() (structs.Instances, error)
	InstanceTerminate(id string) error

	LogStream(app string, w io.Writer, opts structs.LogStreamOptions) error

	ObjectDelete(key string) error
	ObjectExists(key string) bool
	ObjectFetch(key string) (io.ReadCloser, error)
	ObjectList(prefix string) ([]string, error)
	ObjectStore(key string, r io.Reader, opts structs.ObjectOptions) (string, error)

	ProcessExec(app, pid, command string, stream io.ReadWriter, opts structs.ProcessExecOptions) error
	ProcessGet(app, pid string) (*structs.Process, error)
	ProcessList(app string) (structs.Processes, error)
	ProcessRun(app, process string, opts structs.ProcessRunOptions) (string, error)
	ProcessStop(app, pid string) error

	RegistryAdd(server, username, password string) (*structs.Registry, error)
	RegistryDelete(server string) error
	RegistryList() (structs.Registries, error)

	ReleaseDelete(app, buildID string) error
	ReleaseGet(app, id string) (*structs.Release, error)
	ReleaseList(app string, limit int64) (structs.Releases, error)
	ReleasePromote(*structs.Release) error
	ReleaseSave(*structs.Release) error

	ResourceCreate(name, kind string, params map[string]string) (*structs.Resource, error)
	ResourceDelete(name string) (*structs.Resource, error)
	ResourceGet(name string) (*structs.Resource, error)
	ResourceLink(name, app, process string) (*structs.Resource, error)
	ResourceList() (structs.Resources, error)
	ResourceUnlink(name, app, process string) (*structs.Resource, error)
	ResourceUpdate(name string, params map[string]string) (*structs.Resource, error)

	SystemGet() (*structs.System, error)
	SystemLogs(w io.Writer, opts structs.LogStreamOptions) error
	SystemProcesses(opts structs.SystemProcessesOptions) (structs.Processes, error)
	SystemReleases() (structs.Releases, error)
	SystemSave(system structs.System) error
}

func FromEnv

func FromEnv() Provider

FromEnv returns a new Provider from env vars

Jump to

Keyboard shortcuts

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