provider

package
v0.0.0-...-f476983 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2016 License: Apache-2.0, Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var TestProvider = &TestProviderRunner{}

Functions

func AppGet

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

func BuildCopy

func BuildCopy(srcApp, id, destApp string) (*structs.Build, error)

func BuildCreateIndex

func BuildCreateIndex(app string, index structs.Index, manifest, description string, cache bool) (*structs.Build, error)

func BuildCreateRepo

func BuildCreateRepo(app, url, manifest, description string, cache bool) (*structs.Build, error)

func BuildCreateTar

func BuildCreateTar(app string, src io.Reader, manifest, description string, cache bool) (*structs.Build, error)

func BuildDelete

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

func BuildGet

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

func BuildList

func BuildList(app string) (structs.Builds, error)

func BuildRelease

func BuildRelease(b *structs.Build) (*structs.Release, error)

func BuildSave

func BuildSave(b *structs.Build) error

func CapacityGet

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

func CertificateCreate

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

func CertificateDelete

func CertificateDelete(id string) error

func CertificateGenerate

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

func CertificateList

func CertificateList() (structs.Certificates, error)

func EventSend

func EventSend(e *structs.Event, err error) error

func IndexDiff

func IndexDiff(i *structs.Index) ([]string, error)

func IndexDownload

func IndexDownload(i *structs.Index, dir string) error

func IndexUpload

func IndexUpload(hash string, data []byte) error

func InstanceList

func InstanceList() (structs.Instances, error)

func LogStream

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

func ReleaseDelete

func ReleaseDelete(app, id string) (*structs.Release, error)

func ReleaseGet

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

func ReleaseList

func ReleaseList(app string) (structs.Releases, error)

func ReleasePromote

func ReleasePromote(app, id string) (*structs.Release, error)

func ReleaseSave

func ReleaseSave(r *structs.Release, logdir, key string) error

func ServiceCreate

func ServiceCreate(name, kind string, params map[string]string) (*structs.Service, error)

func ServiceDelete

func ServiceDelete(name string) (*structs.Service, error)

func ServiceGet

func ServiceGet(name string) (*structs.Service, error)
func ServiceLink(name, app, process string) (*structs.Service, error)
func ServiceUnlink(name, app, process string) (*structs.Service, error)

func SystemGet

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

func SystemSave

func SystemSave(system structs.System) error

Types

type Provider

type Provider interface {
	AppGet(name string) (*structs.App, error)

	BuildCopy(srcApp, id, destApp string) (*structs.Build, error)
	BuildCreateIndex(app string, index structs.Index, manifest, description string, cache bool) (*structs.Build, error)
	BuildCreateRepo(app, url, manifest, description string, cache bool) (*structs.Build, error)
	BuildCreateTar(app string, src io.Reader, manifest, description string, cache bool) (*structs.Build, error)
	BuildDelete(app, id string) (*structs.Build, error)
	BuildGet(app, id string) (*structs.Build, error)
	BuildList(app string) (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

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

	InstanceList() (structs.Instances, error)

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

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

	ServiceCreate(name, kind string, params map[string]string) (*structs.Service, error)
	ServiceDelete(name string) (*structs.Service, error)
	ServiceGet(name string) (*structs.Service, error)
	ServiceLink(name, app, process string) (*structs.Service, error)
	ServiceUnlink(name, app, process string) (*structs.Service, error)

	SystemGet() (*structs.System, error)
	SystemSave(system structs.System) error
}
var CurrentProvider Provider

type TestProviderRunner

type TestProviderRunner struct {
	mock.Mock
	App          structs.App
	Build        structs.Build
	Builds       structs.Builds
	Capacity     structs.Capacity
	Certificate  structs.Certificate
	Certificates structs.Certificates
	Instances    structs.Instances
	Release      structs.Release
	Releases     structs.Releases
	Service      structs.Service
}

func (*TestProviderRunner) AppGet

func (p *TestProviderRunner) AppGet(name string) (*structs.App, error)

func (*TestProviderRunner) BuildCopy

func (p *TestProviderRunner) BuildCopy(srcApp, id, destApp string) (*structs.Build, error)

func (*TestProviderRunner) BuildCreateIndex

func (p *TestProviderRunner) BuildCreateIndex(app string, index structs.Index, manifest, description string, cache bool) (*structs.Build, error)

func (*TestProviderRunner) BuildCreateRepo

func (p *TestProviderRunner) BuildCreateRepo(app, url, manifest, description string, cache bool) (*structs.Build, error)

func (*TestProviderRunner) BuildCreateTar

func (p *TestProviderRunner) BuildCreateTar(app string, src io.Reader, manifest, description string, cache bool) (*structs.Build, error)

func (*TestProviderRunner) BuildDelete

func (p *TestProviderRunner) BuildDelete(app, id string) (*structs.Build, error)

func (*TestProviderRunner) BuildGet

func (p *TestProviderRunner) BuildGet(app, id string) (*structs.Build, error)

func (*TestProviderRunner) BuildList

func (p *TestProviderRunner) BuildList(app string) (structs.Builds, error)

func (*TestProviderRunner) BuildRelease

func (p *TestProviderRunner) BuildRelease(b *structs.Build) (*structs.Release, error)

func (*TestProviderRunner) BuildSave

func (p *TestProviderRunner) BuildSave(b *structs.Build) error

func (*TestProviderRunner) CapacityGet

func (p *TestProviderRunner) CapacityGet() (*structs.Capacity, error)

func (*TestProviderRunner) CertificateCreate

func (p *TestProviderRunner) CertificateCreate(pub, key, chain string) (*structs.Certificate, error)

func (*TestProviderRunner) CertificateDelete

func (p *TestProviderRunner) CertificateDelete(id string) error

func (*TestProviderRunner) CertificateGenerate

func (p *TestProviderRunner) CertificateGenerate(domains []string) (*structs.Certificate, error)

func (*TestProviderRunner) CertificateList

func (p *TestProviderRunner) CertificateList() (structs.Certificates, error)

func (*TestProviderRunner) EventSend

func (p *TestProviderRunner) EventSend(e *structs.Event, err error) error

func (*TestProviderRunner) IndexDiff

func (p *TestProviderRunner) IndexDiff(i *structs.Index) ([]string, error)

func (*TestProviderRunner) IndexDownload

func (p *TestProviderRunner) IndexDownload(i *structs.Index, dir string) error

func (*TestProviderRunner) IndexUpload

func (p *TestProviderRunner) IndexUpload(hash string, data []byte) error

func (*TestProviderRunner) InstanceList

func (p *TestProviderRunner) InstanceList() (structs.Instances, error)

func (*TestProviderRunner) LogStream

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

func (*TestProviderRunner) ReleaseDelete

func (p *TestProviderRunner) ReleaseDelete(app, id string) (*structs.Release, error)

func (*TestProviderRunner) ReleaseGet

func (p *TestProviderRunner) ReleaseGet(app, id string) (*structs.Release, error)

func (*TestProviderRunner) ReleaseList

func (p *TestProviderRunner) ReleaseList(app string) (structs.Releases, error)

func (*TestProviderRunner) ReleasePromote

func (p *TestProviderRunner) ReleasePromote(app, id string) (*structs.Release, error)

func (*TestProviderRunner) ReleaseSave

func (p *TestProviderRunner) ReleaseSave(r *structs.Release, logdir, key string) error

func (*TestProviderRunner) ServiceCreate

func (p *TestProviderRunner) ServiceCreate(name, kind string, params map[string]string) (*structs.Service, error)

func (*TestProviderRunner) ServiceDelete

func (p *TestProviderRunner) ServiceDelete(name string) (*structs.Service, error)

func (*TestProviderRunner) ServiceGet

func (p *TestProviderRunner) ServiceGet(name string) (*structs.Service, error)
func (p *TestProviderRunner) ServiceLink(name, app, process string) (*structs.Service, error)
func (p *TestProviderRunner) ServiceUnlink(name, app, process string) (*structs.Service, error)

func (*TestProviderRunner) SystemGet

func (p *TestProviderRunner) SystemGet() (*structs.System, error)

func (*TestProviderRunner) SystemSave

func (p *TestProviderRunner) SystemSave(system structs.System) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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