structs

package
v0.0.0-...-b8d72a6 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ConvoxRoleParam     = "CONVOX_ROLE"
	ConvoxRoleRead      = "r"
	ConvoxRoleReadWrite = "rw"
)

Variables

This section is empty.

Functions

func Routes

func Routes() map[string]string

Types

type App

type App struct {
	Generation string `json:"generation,omitempty"`
	Locked     bool   `json:"locked"`
	Name       string `json:"name"`
	Release    string `json:"release"`
	Router     string `json:"router"`
	Status     string `json:"status"`

	Outputs    map[string]string `json:"-"`
	Parameters map[string]string `json:"parameters"`
	Tags       map[string]string `json:"-"`
}

type AppCreateOptions

type AppCreateOptions struct {
	Generation *string `default:"2" flag:"generation,g" param:"generation"`
}

type AppUpdateOptions

type AppUpdateOptions struct {
	Lock       *bool             `param:"lock"`
	Parameters map[string]string `param:"parameters"`
}

type Apps

type Apps []App

func (Apps) Less

func (a Apps) Less(i, j int) bool

type Build

type Build struct {
	Id             string `json:"id"`
	App            string `json:"app"`
	Description    string `json:"description"`
	Entrypoint     string `json:"entrypoint"`
	GitSha         string `json:"git-sha"`
	Logs           string `json:"logs"`
	Manifest       string `json:"manifest"`
	Process        string `json:"process"`
	Release        string `json:"release"`
	Reason         string `json:"reason"`
	Status         string `json:"status"`
	WildcardDomain bool   `json:"wildcard-domain"`

	Started time.Time `json:"started"`
	Ended   time.Time `json:"ended"`

	Tags map[string]string `json:"-"`
}

func NewBuild

func NewBuild(app string) *Build

type BuildCreateOptions

type BuildCreateOptions struct {
	BuildArgs      *[]string `flag:"build-args" param:"build-args"`
	Description    *string   `flag:"description,d" param:"description"`
	Development    *bool     `flag:"development" param:"development"`
	Manifest       *string   `flag:"manifest,m" param:"manifest"`
	NoCache        *bool     `flag:"no-cache" param:"no-cache"`
	WildcardDomain *bool     `flag:"wildcard-domain" param:"wildcard-domain"`

	GitSha *string `param:"git-sha"`
}

type BuildListOptions

type BuildListOptions struct {
	Limit *int `flag:"limit,l" query:"limit"`
}

type BuildUpdateOptions

type BuildUpdateOptions struct {
	Ended      *time.Time `param:"ended"`
	Entrypoint *string    `param:"entrypoint"`
	Logs       *string    `param:"logs"`
	Manifest   *string    `param:"manifest"`
	Release    *string    `param:"release"`
	Started    *time.Time `param:"started"`
	Status     *string    `param:"status"`
}

type Builds

type Builds []Build

type Capacity

type Capacity struct {
	ClusterCPU     int64 `json:"cluster-cpu"`
	ClusterMemory  int64 `json:"cluster-memory"`
	InstanceCPU    int64 `json:"instance-cpu"`
	InstanceMemory int64 `json:"instance-memory"`
	ProcessCount   int64 `json:"process-count"`
	ProcessCPU     int64 `json:"process-cpu"`
	ProcessMemory  int64 `json:"process-memory"`
	ProcessWidth   int64 `json:"process-width"`
}

type Certificate

type Certificate struct {
	Arn        string    `json:"-"`
	Id         string    `json:"id"`
	Domain     string    `json:"domain"`
	Domains    []string  `json:"domains"`
	Expiration time.Time `json:"expiration"`
}

func (*Certificate) Match

func (c *Certificate) Match(domain string) (bool, error)

type CertificateCreateOptions

type CertificateCreateOptions struct {
	Chain *string `param:"chain"`
}

type Certificates

type Certificates []Certificate

func (Certificates) Less

func (c Certificates) Less(i, j int) bool

type Environment

type Environment map[string]string

Environment is of type map used to store environment variables.

func (Environment) Load

func (e Environment) Load(data []byte) error

func (Environment) String

func (e Environment) String() string

type EventSendOptions

type EventSendOptions struct {
	Data   map[string]string `param:"data"`
	Error  *string           `param:"error"`
	Status *string           `param:"status"`
}

type Formation

type Formation []ProcessFormation

Formation represents the formation for an App

type Index

type Index map[string]IndexItem

type IndexItem

type IndexItem struct {
	Name    string      `json:"name"`
	Mode    os.FileMode `json:"mode"`
	ModTime time.Time   `json:"mtime"`
}

type Instance

type Instance struct {
	Agent     bool      `json:"agent"`
	Cpu       float64   `json:"cpu"`
	Id        string    `json:"id"`
	Memory    float64   `json:"memory"`
	PrivateIp string    `json:"private-ip"`
	Processes int       `json:"processes"`
	PublicIp  string    `json:"public-ip"`
	Status    string    `json:"status"`
	Started   time.Time `json:"started"`
}

func (*Instance) Ip

func (i *Instance) Ip() string

type InstanceShellOptions

type InstanceShellOptions struct {
	Command *string `header:"Command"`
	Height  *int    `header:"Height"`
	Width   *int    `header:"Width"`
}

type Instances

type Instances []Instance

func (Instances) Len

func (ii Instances) Len() int

func (Instances) Less

func (ii Instances) Less(i, j int) bool

func (Instances) Swap

func (ii Instances) Swap(i, j int)

type LogStreamOptions

type LogStreamOptions struct {
	Filter string
	Follow bool
	Since  time.Time
}

type LogsOptions

type LogsOptions struct {
	Filter *string        `flag:"filter" header:"Filter"`
	Follow *bool          `header:"Follow"`
	Prefix *bool          `header:"Prefix"`
	Since  *time.Duration `default:"2m" flag:"since" header:"Since"`
}

type Metric

type Metric struct {
	Name   string       `json:"name"`
	Values MetricValues `json:"values"`
}

type MetricValue

type MetricValue struct {
	Average float64   `json:"avg"`
	Count   float64   `json:"count"`
	Maximum float64   `json:"max"`
	Minimum float64   `json:"min"`
	P90     float64   `json:"p90"`
	P95     float64   `json:"p95"`
	P99     float64   `json:"p99"`
	Sum     float64   `json:"sum"`
	Time    time.Time `json:"time"`
}

type MetricValues

type MetricValues []MetricValue

type Metrics

type Metrics []Metric

type MetricsOptions

type MetricsOptions struct {
	End     *time.Time `query:"end"`
	Metrics []string   `query:"metrics"`
	Start   *time.Time `query:"start"`
	Period  *int64     `query:"period"`
}

type MockProvider

type MockProvider struct {
	mock.Mock
}

MockProvider is an autogenerated mock type for the Provider type

func NewMockProvider

func NewMockProvider(t NewMockProviderT) *MockProvider

NewMockProvider creates a new instance of MockProvider. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*MockProvider) AppCancel

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

AppCancel provides a mock function with given fields: name

func (*MockProvider) AppCreate

func (_m *MockProvider) AppCreate(name string, opts AppCreateOptions) (*App, error)

AppCreate provides a mock function with given fields: name, opts

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) (*App, error)

AppGet provides a mock function with given fields: name

func (*MockProvider) AppList

func (_m *MockProvider) AppList() (Apps, error)

AppList provides a mock function with given fields:

func (*MockProvider) AppLogs

func (_m *MockProvider) AppLogs(name string, opts LogsOptions) (io.ReadCloser, error)

AppLogs provides a mock function with given fields: name, opts

func (*MockProvider) AppMetrics

func (_m *MockProvider) AppMetrics(name string, opts MetricsOptions) (Metrics, error)

AppMetrics provides a mock function with given fields: name, opts

func (*MockProvider) AppUpdate

func (_m *MockProvider) AppUpdate(name string, opts AppUpdateOptions) error

AppUpdate provides a mock function with given fields: name, opts

func (*MockProvider) BuildCreate

func (_m *MockProvider) BuildCreate(app string, url string, opts BuildCreateOptions) (*Build, error)

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

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) (*Build, error)

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

func (*MockProvider) BuildImport

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

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

func (*MockProvider) BuildList

func (_m *MockProvider) BuildList(app string, opts BuildListOptions) (Builds, error)

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

func (*MockProvider) BuildLogs

func (_m *MockProvider) BuildLogs(app string, id string, opts LogsOptions) (io.ReadCloser, error)

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

func (*MockProvider) BuildUpdate

func (_m *MockProvider) BuildUpdate(app string, id string, opts BuildUpdateOptions) (*Build, error)

BuildUpdate provides a mock function with given fields: app, id, opts

func (*MockProvider) CapacityGet

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

CapacityGet provides a mock function with given fields:

func (*MockProvider) CertificateApply

func (_m *MockProvider) CertificateApply(app string, service string, port int, id string) error

CertificateApply provides a mock function with given fields: app, service, port, id

func (*MockProvider) CertificateCreate

func (_m *MockProvider) CertificateCreate(pub string, key string, opts CertificateCreateOptions) (*Certificate, error)

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

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) (*Certificate, error)

CertificateGenerate provides a mock function with given fields: domains

func (*MockProvider) CertificateList

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

CertificateList provides a mock function with given fields:

func (*MockProvider) DeleteDB

func (_m *MockProvider) DeleteDB(resource string) error

DeleteDB provides a mock function with given fields: resource

func (*MockProvider) EventSend

func (_m *MockProvider) EventSend(action string, opts EventSendOptions) error

EventSend provides a mock function with given fields: action, opts

func (*MockProvider) FilesDelete

func (_m *MockProvider) FilesDelete(app string, pid string, files []string) error

FilesDelete provides a mock function with given fields: app, pid, files

func (*MockProvider) FilesDownload

func (_m *MockProvider) FilesDownload(app string, pid string, file string) (io.Reader, error)

FilesDownload provides a mock function with given fields: app, pid, file

func (*MockProvider) FilesUpload

func (_m *MockProvider) FilesUpload(app string, pid string, r io.Reader) error

FilesUpload provides a mock function with given fields: app, pid, r

func (*MockProvider) Initialize

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

Initialize provides a mock function with given fields: opts

func (*MockProvider) InstanceKeyroll

func (_m *MockProvider) InstanceKeyroll() error

InstanceKeyroll provides a mock function with given fields:

func (*MockProvider) InstanceList

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

InstanceList provides a mock function with given fields:

func (*MockProvider) InstanceShell

func (_m *MockProvider) InstanceShell(id string, rw io.ReadWriter, opts InstanceShellOptions) (int, error)

InstanceShell provides a mock function with given fields: id, rw, opts

func (*MockProvider) InstanceTerminate

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

InstanceTerminate provides a mock function with given fields: id

func (*MockProvider) IsDBSnapshotComplete

func (_m *MockProvider) IsDBSnapshotComplete(snapshot string) (bool, error)

IsDBSnapshotComplete provides a mock function with given fields: snapshot

func (*MockProvider) ObjectDelete

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

ObjectDelete provides a mock function with given fields: app, key

func (*MockProvider) ObjectExists

func (_m *MockProvider) ObjectExists(app string, key string) (bool, error)

ObjectExists provides a mock function with given fields: app, key

func (*MockProvider) ObjectFetch

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

ObjectFetch provides a mock function with given fields: app, key

func (*MockProvider) ObjectList

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

ObjectList provides a mock function with given fields: app, prefix

func (*MockProvider) ObjectStore

func (_m *MockProvider) ObjectStore(app string, key string, r io.Reader, opts ObjectStoreOptions) (*Object, error)

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

func (*MockProvider) ProcessExec

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

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

func (*MockProvider) ProcessGet

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

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

func (*MockProvider) ProcessList

func (_m *MockProvider) ProcessList(app string, opts ProcessListOptions) (Processes, error)

ProcessList provides a mock function with given fields: app, opts

func (*MockProvider) ProcessLogs

func (_m *MockProvider) ProcessLogs(app string, pid string, opts LogsOptions) (io.ReadCloser, error)

ProcessLogs provides a mock function with given fields: app, pid, opts

func (*MockProvider) ProcessRun

func (_m *MockProvider) ProcessRun(app string, service string, opts ProcessRunOptions) (*Process, error)

ProcessRun provides a mock function with given fields: app, service, 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) Proxy

func (_m *MockProvider) Proxy(host string, port int, rw io.ReadWriter, opts ProxyOptions) error

Proxy provides a mock function with given fields: host, port, rw, opts

func (*MockProvider) RegistryAdd

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

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

func (*MockProvider) RegistryList

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

RegistryList provides a mock function with given fields:

func (*MockProvider) RegistryRemove

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

RegistryRemove provides a mock function with given fields: server

func (*MockProvider) ReleaseCreate

func (_m *MockProvider) ReleaseCreate(app string, opts ReleaseCreateOptions) (*Release, error)

ReleaseCreate provides a mock function with given fields: app, opts

func (*MockProvider) ReleaseGet

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

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

func (*MockProvider) ReleaseList

func (_m *MockProvider) ReleaseList(app string, opts ReleaseListOptions) (Releases, error)

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

func (*MockProvider) ReleasePromote

func (_m *MockProvider) ReleasePromote(app string, id string, opts ReleasePromoteOptions) error

ReleasePromote provides a mock function with given fields: app, id, opts

func (*MockProvider) ResourceGet

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

ResourceGet provides a mock function with given fields: app, name

func (*MockProvider) ResourceList

func (_m *MockProvider) ResourceList(app string) (Resources, error)

ResourceList provides a mock function with given fields: app

func (*MockProvider) ServiceList

func (_m *MockProvider) ServiceList(app string) (Services, error)

ServiceList provides a mock function with given fields: app

func (*MockProvider) ServiceMetrics

func (_m *MockProvider) ServiceMetrics(app string, name string, opts MetricsOptions) (Metrics, error)

ServiceMetrics provides a mock function with given fields: app, name, opts

func (*MockProvider) ServiceRestart

func (_m *MockProvider) ServiceRestart(app string, name string) error

ServiceRestart provides a mock function with given fields: app, name

func (*MockProvider) ServiceUpdate

func (_m *MockProvider) ServiceUpdate(app string, name string, opts ServiceUpdateOptions) error

ServiceUpdate provides a mock function with given fields: app, name, opts

func (*MockProvider) SetDBDeletionProtectionAndCreateSnapShot

func (_m *MockProvider) SetDBDeletionProtectionAndCreateSnapShot(app string, resource string, snapshot string) (string, error)

SetDBDeletionProtectionAndCreateSnapShot provides a mock function with given fields: app, resource, snapshot

func (*MockProvider) Sync

func (_m *MockProvider) Sync(_a0 string) error

Sync provides a mock function with given fields: _a0

func (*MockProvider) SyncInstancesIpInSecurityGroup

func (_m *MockProvider) SyncInstancesIpInSecurityGroup() error

SyncInstancesIpInSecurityGroup provides a mock function with given fields:

func (*MockProvider) SystemGet

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

SystemGet provides a mock function with given fields:

func (*MockProvider) SystemInstall

func (_m *MockProvider) SystemInstall(w io.Writer, opts SystemInstallOptions) (string, error)

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

func (*MockProvider) SystemJwtSignKey

func (_m *MockProvider) SystemJwtSignKey() (string, error)

SystemJwtSignKey provides a mock function with given fields:

func (*MockProvider) SystemJwtSignKeyRotate

func (_m *MockProvider) SystemJwtSignKeyRotate() (string, error)

SystemJwtSignKeyRotate provides a mock function with given fields:

func (*MockProvider) SystemLogs

func (_m *MockProvider) SystemLogs(opts LogsOptions) (io.ReadCloser, error)

SystemLogs provides a mock function with given fields: opts

func (*MockProvider) SystemMetrics

func (_m *MockProvider) SystemMetrics(opts MetricsOptions) (Metrics, error)

SystemMetrics provides a mock function with given fields: opts

func (*MockProvider) SystemProcesses

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

SystemProcesses provides a mock function with given fields: opts

func (*MockProvider) SystemReleases

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

SystemReleases provides a mock function with given fields:

func (*MockProvider) SystemResourceCreate

func (_m *MockProvider) SystemResourceCreate(kind string, opts ResourceCreateOptions) (*Resource, error)

SystemResourceCreate provides a mock function with given fields: kind, opts

func (*MockProvider) SystemResourceDelete

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

SystemResourceDelete provides a mock function with given fields: name

func (*MockProvider) SystemResourceGet

func (_m *MockProvider) SystemResourceGet(name string) (*Resource, error)

SystemResourceGet provides a mock function with given fields: name

func (_m *MockProvider) SystemResourceLink(name string, app string) (*Resource, error)

SystemResourceLink provides a mock function with given fields: name, app

func (*MockProvider) SystemResourceList

func (_m *MockProvider) SystemResourceList() (Resources, error)

SystemResourceList provides a mock function with given fields:

func (*MockProvider) SystemResourceTypes

func (_m *MockProvider) SystemResourceTypes() (ResourceTypes, error)

SystemResourceTypes provides a mock function with given fields:

func (_m *MockProvider) SystemResourceUnlink(name string, app string) (*Resource, error)

SystemResourceUnlink provides a mock function with given fields: name, app

func (*MockProvider) SystemResourceUpdate

func (_m *MockProvider) SystemResourceUpdate(name string, opts ResourceUpdateOptions) (*Resource, error)

SystemResourceUpdate provides a mock function with given fields: name, opts

func (*MockProvider) SystemUninstall

func (_m *MockProvider) SystemUninstall(name string, w io.Writer, opts SystemUninstallOptions) error

SystemUninstall provides a mock function with given fields: name, w, opts

func (*MockProvider) SystemUpdate

func (_m *MockProvider) SystemUpdate(opts SystemUpdateOptions) error

SystemUpdate provides a mock function with given fields: opts

func (*MockProvider) WithContext

func (_m *MockProvider) WithContext(ctx context.Context) Provider

WithContext provides a mock function with given fields: ctx

func (*MockProvider) Workers

func (_m *MockProvider) Workers() error

Workers provides a mock function with given fields:

type NewMockProviderT

type NewMockProviderT interface {
	mock.TestingT
	Cleanup(func())
}

type Object

type Object struct {
	Url string
}

type ObjectStoreOptions

type ObjectStoreOptions struct {
	Presign *bool
}

type Process

type Process struct {
	Id string `json:"id"`

	App            string    `json:"app"`
	Command        string    `json:"command"`
	Cpu            float64   `json:"cpu"`
	Host           string    `json:"host"`
	Image          string    `json:"image"`
	Instance       string    `json:"instance"`
	Memory         float64   `json:"memory"`
	Name           string    `json:"name"`
	Ports          []string  `json:"ports"`
	Release        string    `json:"release"`
	Started        time.Time `json:"started"`
	Status         string    `json:"status"`
	TaskDefinition string    `json:"task_definition"`
}

type ProcessExecOptions

type ProcessExecOptions struct {
	Entrypoint *bool `header:"Entrypoint"`
	Height     *int  `header:"Height"`
	Tty        *bool `header:"Tty" default:"true"`
	Width      *int  `header:"Width"`
}

type ProcessFormation

type ProcessFormation struct {
	Count    int    `json:"count"`
	CPU      int    `json:"cpu"`
	Hostname string `json:"hostname"`
	Name     string `json:"name"`
	Memory   int    `json:"memory"`
	Ports    []int  `json:"ports"`
}

ProcessFormation represents the formation for a Process

type ProcessListOptions

type ProcessListOptions struct {
	Release *string `flag:"release" query:"release"`
	Service *string `flag:"service,s" query:"service"`
}

type ProcessRunOptions

type ProcessRunOptions struct {
	Command     *string           `header:"Command"`
	Environment map[string]string `header:"Environment"`
	Height      *int              `header:"Height"`
	Image       *string           `header:"Image"`
	Memory      *int              `header:"Memory"`
	Release     *string           `flag:"release" header:"Release"`
	Volumes     map[string]string `header:"Volumes"`
	Width       *int              `header:"Width"`
}

type Processes

type Processes []Process

func (Processes) Less

func (ps Processes) Less(i, j int) bool

type Provider

type Provider interface {
	Initialize(opts ProviderOptions) error

	AppCancel(name string) error
	AppCreate(name string, opts AppCreateOptions) (*App, error)
	AppGet(name string) (*App, error)
	AppDelete(name string) error
	AppList() (Apps, error)
	AppLogs(name string, opts LogsOptions) (io.ReadCloser, error)
	AppMetrics(name string, opts MetricsOptions) (Metrics, error)
	AppUpdate(name string, opts AppUpdateOptions) error

	BuildCreate(app, url string, opts BuildCreateOptions) (*Build, error)
	BuildExport(app, id string, w io.Writer) error
	BuildGet(app, id string) (*Build, error)
	BuildImport(app string, r io.Reader) (*Build, error)
	BuildLogs(app, id string, opts LogsOptions) (io.ReadCloser, error)
	BuildList(app string, opts BuildListOptions) (Builds, error)
	BuildUpdate(app, id string, opts BuildUpdateOptions) (*Build, error)

	CapacityGet() (*Capacity, error)

	CertificateApply(app, service string, port int, id string) error
	CertificateCreate(pub, key string, opts CertificateCreateOptions) (*Certificate, error)
	CertificateDelete(id string) error
	CertificateGenerate(domains []string) (*Certificate, error)
	CertificateList() (Certificates, error)

	EventSend(action string, opts EventSendOptions) error

	FilesDelete(app, pid string, files []string) error
	FilesDownload(app, pid string, file string) (io.Reader, error)
	FilesUpload(app, pid string, r io.Reader) error

	InstanceKeyroll() error
	InstanceList() (Instances, error)
	InstanceShell(id string, rw io.ReadWriter, opts InstanceShellOptions) (int, error)
	InstanceTerminate(id string) error

	ObjectDelete(app, key string) error
	ObjectExists(app, key string) (bool, error)
	ObjectFetch(app, key string) (io.ReadCloser, error)
	ObjectList(app, prefix string) ([]string, error)
	ObjectStore(app, key string, r io.Reader, opts ObjectStoreOptions) (*Object, error)

	ProcessExec(app, pid, command string, rw io.ReadWriter, opts ProcessExecOptions) (int, error)
	ProcessGet(app, pid string) (*Process, error)
	ProcessList(app string, opts ProcessListOptions) (Processes, error)
	ProcessLogs(app, pid string, opts LogsOptions) (io.ReadCloser, error)
	ProcessRun(app, service string, opts ProcessRunOptions) (*Process, error)
	ProcessStop(app, pid string) error

	Proxy(host string, port int, rw io.ReadWriter, opts ProxyOptions) error

	RegistryAdd(server, username, password string) (*Registry, error)
	RegistryList() (Registries, error)
	RegistryRemove(server string) error

	ReleaseCreate(app string, opts ReleaseCreateOptions) (*Release, error)
	ReleaseGet(app, id string) (*Release, error)
	ReleaseList(app string, opts ReleaseListOptions) (Releases, error)
	ReleasePromote(app, id string, opts ReleasePromoteOptions) error

	ResourceGet(app, name string) (*Resource, error)
	ResourceList(app string) (Resources, error)

	SetDBDeletionProtectionAndCreateSnapShot(app, resource, snapshot string) (string, error)
	IsDBSnapshotComplete(snapshot string) (bool, error)
	DeleteDB(resource string) error

	ServiceList(app string) (Services, error)
	ServiceMetrics(app, name string, opts MetricsOptions) (Metrics, error)
	ServiceRestart(app, name string) error
	ServiceUpdate(app, name string, opts ServiceUpdateOptions) error

	SystemGet() (*System, error)
	SystemInstall(w io.Writer, opts SystemInstallOptions) (string, error)
	SystemJwtSignKey() (string, error)
	SystemJwtSignKeyRotate() (string, error)
	SystemLogs(opts LogsOptions) (io.ReadCloser, error)
	SystemMetrics(opts MetricsOptions) (Metrics, error)
	SystemProcesses(opts SystemProcessesOptions) (Processes, error)
	SystemReleases() (Releases, error)
	SystemResourceCreate(kind string, opts ResourceCreateOptions) (*Resource, error)
	SystemResourceDelete(name string) error
	SystemResourceGet(name string) (*Resource, error)
	SystemResourceLink(name, app string) (*Resource, error)
	SystemResourceList() (Resources, error)
	SystemResourceTypes() (ResourceTypes, error)
	SystemResourceUnlink(name, app string) (*Resource, error)
	SystemResourceUpdate(name string, opts ResourceUpdateOptions) (*Resource, error)
	SystemUninstall(name string, w io.Writer, opts SystemUninstallOptions) error
	SystemUpdate(opts SystemUpdateOptions) error
	Sync(string) error
	SyncInstancesIpInSecurityGroup() error
	WithContext(ctx context.Context) Provider
	Workers() error
}

type ProviderOptions

type ProviderOptions struct {
	Logs io.Writer
}

type ProxyOptions

type ProxyOptions struct {
	TLS *bool
}

type RackData

type RackData struct {
	Host string `json:"host"`
}

type Registries

type Registries []Registry

func (Registries) Len

func (r Registries) Len() int

func (Registries) Less

func (r Registries) Less(i, j int) bool

func (Registries) Swap

func (r Registries) Swap(i, j int)

type Registry

type Registry struct {
	Server   string `json:"server"`
	Username string `json:"username"`
	Password string `json:"password"`
}

type Release

type Release struct {
	Id string `json:"id"`

	App         string `json:"app"`
	Build       string `json:"build"`
	Env         string `json:"env"`
	Manifest    string `json:"manifest"`
	Description string `json:"description"`

	Created time.Time `json:"created"`
}

func NewRelease

func NewRelease(app string) *Release

type ReleaseCreateOptions

type ReleaseCreateOptions struct {
	Build       *string `param:"build"`
	Description *string `param:"description"`
	Env         *string `param:"env"`
}

type ReleaseListOptions

type ReleaseListOptions struct {
	Limit *int `flag:"limit,l" query:"limit"`
}

type ReleasePromoteOptions

type ReleasePromoteOptions struct {
	Development *bool   `param:"development"`
	Force       *bool   `param:"force"`
	Idle        *bool   `param:"idle"`
	Min         *int    `param:"min"`
	Max         *int    `param:"max"`
	Timeout     *int    `param:"timeout"`
	Xrds        *string `param:"xrds"`
	Xignore     *string `param:"xignore"`
	Xsnapshot   *string `param:"xsnapshot"`
}

type Releases

type Releases []Release

func (Releases) Less

func (rs Releases) Less(i, j int) bool

type Resource

type Resource struct {
	Name       string            `json:"name"`
	Parameters map[string]string `json:"parameters,omitempty"`
	Status     string            `json:"status,omitempty"`
	Type       string            `json:"type"`
	Url        string            `json:"url"`

	Apps Apps `json:"apps,omitempty"`
}

type ResourceCreateOptions

type ResourceCreateOptions struct {
	Name       *string           `param:"name"`
	Parameters map[string]string `param:"parameters"`
}

type ResourceParameter

type ResourceParameter struct {
	Default     string `json:"default"`
	Description string `json:"description"`
	Name        string `json:"name"`
}

type ResourceParameters

type ResourceParameters []ResourceParameter

func (ResourceParameters) Less

func (rps ResourceParameters) Less(i, j int) bool

type ResourceType

type ResourceType struct {
	Name       string             `json:"name"`
	Parameters ResourceParameters `json:"parameters"`
}

type ResourceTypes

type ResourceTypes []ResourceType

func (ResourceTypes) Less

func (rts ResourceTypes) Less(i, j int) bool

type ResourceUpdateOptions

type ResourceUpdateOptions struct {
	Parameters map[string]string `param:"parameters"`
}

type Resources

type Resources []Resource

func (Resources) Less

func (rs Resources) Less(i, j int) bool

type Runtime

type Runtime struct {
	Id    string `json:"id"`
	Title string `json:"title"`
}

type RuntimeAttachOptions

type RuntimeAttachOptions struct {
	Runtime *string `param:"runtime"`
}

type Runtimes

type Runtimes []Runtime

type Service

type Service struct {
	Count  int           `json:"count"`
	Cpu    int           `json:"cpu"`
	Domain string        `json:"domain"`
	Memory int           `json:"memory"`
	Name   string        `json:"name"`
	Ports  []ServicePort `json:"ports"`
}

type ServicePort

type ServicePort struct {
	Balancer    int    `json:"balancer"`
	Certificate string `json:"certificate"`
	Container   int    `json:"container"`
}

type ServiceUpdateOptions

type ServiceUpdateOptions struct {
	Count  *int `flag:"count" param:"count"`
	Cpu    *int `flag:"cpu" param:"cpu"`
	Memory *int `flag:"memory" param:"memory"`
}

type Services

type Services []Service

type SettingListOptions

type SettingListOptions struct {
	Prefix string
}

type System

type System struct {
	Count      int               `json:"count"`
	Domain     string            `json:"domain"`
	Name       string            `json:"name"`
	Outputs    map[string]string `json:"outputs,omitempty"`
	Parameters map[string]string `json:"parameters,omitempty"`
	Provider   string            `json:"provider"`
	RackDomain string            `json:"rack-domain"`
	Region     string            `json:"region"`
	Status     string            `json:"status"`
	Type       string            `json:"type"`
	Version    string            `json:"version"`
}

type SystemInstallOptions

type SystemInstallOptions struct {
	Id         *string
	Name       *string `flag:"name,n"`
	Parameters map[string]string
	Raw        *bool   `flag:"raw"`
	Version    *string `flag:"version,v"`
}

type SystemJwt

type SystemJwt struct {
	Token string `json:"token"`
}

type SystemJwtOptions

type SystemJwtOptions struct {
	Role           *string `param:"role"`
	DurationInHour *string `param:"durationInHour"`
}

type SystemProcessesOptions

type SystemProcessesOptions struct {
	All *bool `flag:"all,a" query:"all"`
}

type SystemUninstallOptions

type SystemUninstallOptions struct {
	Force *bool `flag:"force,f"`
	Input io.Reader
}

type SystemUpdateOptions

type SystemUpdateOptions struct {
	Count      *int              `param:"count"`
	Parameters map[string]string `param:"parameters"`
	Type       *string           `param:"type"`
	Version    *string           `param:"version"`
}

type TLSPemCertBytes

type TLSPemCertBytes struct {
	CACert []byte
	CAKey  []byte
	Cert   []byte
	Key    []byte
}

Jump to

Keyboard shortcuts

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