Documentation
¶
Index ¶
- Variables
- type App
- type Apps
- type Auth
- type Build
- type Builds
- type Certificate
- type Certificates
- type Client
- func (c *Client) AddRegistry(server, username, password, email string) (*Registry, error)
- func (c *Client) Auth() (*Auth, error)
- func (c *Client) CancelApp(name string) error
- func (c *Client) CopyBuild(app, id, destApp string) (*Build, error)
- func (c *Client) CreateApp(name string) (*App, error)
- func (c *Client) CreateBuildIndex(app string, index Index, cache bool, config string, description string) (*Build, error)
- func (c *Client) CreateBuildSource(app string, source io.Reader, opts CreateBuildSourceOptions) (*Build, error)
- func (c *Client) CreateBuildUrl(app string, url string, cache bool, config string, description string) (*Build, error)
- func (c *Client) CreateCertificate(pub, key, chain string) (*Certificate, error)
- func (c *Client) CreateLink(app, name string) (*Resource, error)
- func (c *Client) CreateResource(kind string, options map[string]string) (*Resource, error)
- func (c *Client) Delete(path string, out interface{}) error
- func (c *Client) DeleteApp(name string) (*App, error)
- func (c *Client) DeleteBuild(app, id string) (*Build, error)
- func (c *Client) DeleteCertificate(id string) error
- func (c *Client) DeleteEnvironment(app, key string) (Environment, string, error)
- func (c *Client) DeleteLink(app, name string) (*Resource, error)
- func (c *Client) DeleteResource(name string) (*Resource, error)
- func (c *Client) DeleteResponse(path string, out interface{}) (*http.Response, error)
- func (c *Client) ExecProcessAttached(app, pid, command string, in io.Reader, out io.WriteCloser, height, width int) (int, error)
- func (c *Client) ExportBuild(app, id string, w io.Writer) error
- func (c *Client) GenerateCertificate(domains []string) (*Certificate, error)
- func (c *Client) Get(path string, out interface{}) error
- func (c *Client) GetApp(name string) (*App, error)
- func (c *Client) GetApps() (Apps, error)
- func (c *Client) GetBuild(app, id string) (*Build, error)
- func (c *Client) GetBuilds(app string) (Builds, error)
- func (c *Client) GetBuildsWithLimit(app string, limit int) (Builds, error)
- func (c *Client) GetEnvironment(app string) (Environment, error)
- func (c *Client) GetInstances() ([]*Instance, error)
- func (c *Client) GetProcess(app, id string) (*Process, error)
- func (c *Client) GetProcesses(app string, stats bool) (Processes, error)
- func (c *Client) GetRelease(app, id string) (*Release, error)
- func (c *Client) GetReleases(app string) (Releases, error)
- func (c *Client) GetReleasesWithLimit(app string, limit int) (Releases, error)
- func (c *Client) GetResource(name string) (*Resource, error)
- func (c *Client) GetResources() (Resources, error)
- func (c *Client) GetSystem() (*System, error)
- func (c *Client) GetSystemCapacity() (*SystemCapacity, error)
- func (c *Client) GetSystemProcesses(opts structs.SystemProcessesOptions) (Processes, error)
- func (c *Client) GetSystemReleases() (Releases, error)
- func (c *Client) ImportBuild(app string, r io.Reader, opts ImportBuildOptions) (*structs.Build, error)
- func (c *Client) IndexMissing(index Index) ([]string, error)
- func (c *Client) IndexUpdate(update io.Reader, opts IndexUpdateOptions) error
- func (c *Client) InstanceKeyroll() error
- func (c *Client) ListCertificates() (Certificates, error)
- func (c *Client) ListFormation(app string) (Formation, error)
- func (c *Client) ListParameters(app string) (Parameters, error)
- func (c *Client) ListRegistries() (*Registries, error)
- func (c *Client) ListSSL(app string) (*SSLs, error)
- func (c *Client) Post(path string, params Params, out interface{}) error
- func (c *Client) PostBody(path string, body io.Reader, out interface{}) error
- func (c *Client) PostBodyResponse(path string, body io.Reader, out interface{}) (*http.Response, error)
- func (c *Client) PostMultipart(path string, opts PostMultipartOptions, out interface{}) error
- func (c *Client) PromoteRelease(app, id string) (*Release, error)
- func (c *Client) Proxy(host string, port int, rw io.ReadWriteCloser) error
- func (c *Client) Put(path string, params Params, out interface{}) error
- func (c *Client) PutBody(path string, body io.Reader, out interface{}) error
- func (c *Client) Racks() (racks []Rack, err error)
- func (c *Client) RegenerateToken(email, password string) (string, error)
- func (c *Client) RemoveRegistry(server string) error
- func (c *Client) Request(method, path string, body io.Reader) (*http.Request, error)
- func (c *Client) RunProcessAttached(app, process, command, release string, height, width int, in io.Reader, ...) (int, error)
- func (c *Client) RunProcessDetached(app, process, command, release string) error
- func (c *Client) SSHInstance(id, cmd string, height, width int, isTerm bool, in io.Reader, ...) (int, error)
- func (c *Client) ScaleSystem(count int, typ string) (*System, error)
- func (c *Client) SetEnvironment(app string, body io.Reader) (Environment, string, error)
- func (c *Client) SetFormation(app, process string, opts FormationOptions) error
- func (c *Client) SetParameters(app string, params map[string]string) error
- func (c *Client) StopProcess(app, id string) (*Process, error)
- func (c *Client) Stream(path string, headers map[string]string, in io.Reader, out io.Writer) error
- func (c *Client) StreamAppLogs(app, filter string, follow bool, since time.Duration, output io.WriteCloser) error
- func (c *Client) StreamBuildLogs(app, id string, output io.Writer) error
- func (c *Client) StreamRackLogs(filter string, follow bool, since time.Duration, output io.WriteCloser) error
- func (c *Client) StreamReleaseLogs(app, id string, output io.WriteCloser) error
- func (c *Client) Switch(rackName string) (success map[string]string, err error)
- func (c *Client) TerminateInstance(id string) error
- func (c *Client) UpdateBuild(app, id, manifest, status, reason string) (*Build, error)
- func (c *Client) UpdateResource(name string, options map[string]string) (*Resource, error)
- func (c *Client) UpdateSSL(app, process, port, id string) (*SSL, error)
- func (c *Client) UpdateSystem(version string) (*System, error)
- func (c *Client) UpdateSystemOriginal(version string) (*System, error)
- type CreateBuildSourceOptions
- type Environment
- type Error
- type Files
- type Formation
- type FormationEntry
- type FormationOptions
- type ImportBuildOptions
- type Index
- type IndexItem
- type IndexUpdateOptions
- type Instance
- type NotifyEvent
- type Organization
- type Parameters
- type Params
- type PostMultipartOptions
- type Process
- type Processes
- type Progress
- type ProgressReader
- type Rack
- type Registries
- type Registry
- type Release
- type Releases
- type Resource
- type Resources
- type SSL
- type SSLs
- type System
- type SystemCapacity
Constants ¶
This section is empty.
Variables ¶
var StatusCodePrefix = "F1E49A85-0AD7-4AEF-A618-C249C6E6568D:"
this just needs to be random enough to never show up again in a byte stream
Functions ¶
This section is empty.
Types ¶
type Auth ¶
type Auth struct {
ID string `json:"id"`
}
Auth is used to transfer the id of the authenticating user when authing against the console API. When authing against a rack the id will be blank as user ids are a console concept
type Certificate ¶
type Certificates ¶
type Certificates []Certificate
type Client ¶
func (*Client) AddRegistry ¶
func (*Client) Auth ¶
Auth is a request that simply checks whether the password is valid in the case of console the users id will be returned, a rack will return an empty string
func (*Client) CreateBuildIndex ¶
func (*Client) CreateBuildSource ¶
func (c *Client) CreateBuildSource(app string, source io.Reader, opts CreateBuildSourceOptions) (*Build, error)
CreateBuildSource will create a new build from source
func (*Client) CreateBuildUrl ¶
func (*Client) CreateCertificate ¶
func (c *Client) CreateCertificate(pub, key, chain string) (*Certificate, error)
func (*Client) CreateLink ¶
CreateLink creates a link between an app and a resource.
func (*Client) CreateResource ¶
CreateResource creates a new resource.
func (*Client) DeleteCertificate ¶
func (*Client) DeleteEnvironment ¶
func (c *Client) DeleteEnvironment(app, key string) (Environment, string, error)
func (*Client) DeleteLink ¶
DeleteLink deletes a link between an app and a resource.
func (*Client) DeleteResource ¶
DeleteResource deletes a resource.
func (*Client) DeleteResponse ¶
func (*Client) ExecProcessAttached ¶
func (*Client) ExportBuild ¶
ExportBuild creats an artifact, representing a build, to be used with another Rack
func (*Client) GenerateCertificate ¶
func (c *Client) GenerateCertificate(domains []string) (*Certificate, error)
func (*Client) GetBuildsWithLimit ¶
GetBuildsWithLimit returns a list of the latest builds, with the length specified in limit
func (*Client) GetEnvironment ¶
func (c *Client) GetEnvironment(app string) (Environment, error)
func (*Client) GetInstances ¶
func (*Client) GetProcesses ¶
func (*Client) GetReleasesWithLimit ¶
GetReleasesWithLimit requests releases of an app, overriding the default limit.
func (*Client) GetResource ¶
GetResource retrieves a resource by name.
func (*Client) GetResources ¶
GetResources retrieves a list of resources.
func (*Client) GetSystemCapacity ¶
func (c *Client) GetSystemCapacity() (*SystemCapacity, error)
func (*Client) GetSystemProcesses ¶
func (c *Client) GetSystemProcesses(opts structs.SystemProcessesOptions) (Processes, error)
func (*Client) GetSystemReleases ¶
func (*Client) ImportBuild ¶
func (c *Client) ImportBuild(app string, r io.Reader, opts ImportBuildOptions) (*structs.Build, error)
ImportBuild imports a build artifact
func (*Client) IndexUpdate ¶
func (c *Client) IndexUpdate(update io.Reader, opts IndexUpdateOptions) error
IndexUpdate uploads a tarball of changes to the index
func (*Client) InstanceKeyroll ¶
func (*Client) ListCertificates ¶
func (c *Client) ListCertificates() (Certificates, error)
func (*Client) ListParameters ¶
func (c *Client) ListParameters(app string) (Parameters, error)
func (*Client) ListRegistries ¶
func (c *Client) ListRegistries() (*Registries, error)
func (*Client) PostBodyResponse ¶
func (*Client) PostMultipart ¶
func (c *Client) PostMultipart(path string, opts PostMultipartOptions, out interface{}) error
PostMultipart posts a multipart message in the MIME internet format.
func (*Client) RegenerateToken ¶
func (*Client) RemoveRegistry ¶
func (*Client) RunProcessAttached ¶
func (*Client) RunProcessDetached ¶
func (*Client) SSHInstance ¶
func (*Client) SetEnvironment ¶
func (*Client) SetFormation ¶
func (c *Client) SetFormation(app, process string, opts FormationOptions) error
SetFormation updates the Count, CPU, or Memory parameters for a process
func (*Client) SetParameters ¶
func (*Client) StreamAppLogs ¶
func (*Client) StreamBuildLogs ¶
func (*Client) StreamRackLogs ¶
func (c *Client) StreamRackLogs(filter string, follow bool, since time.Duration, output io.WriteCloser) error
StreamRackLogs streams the logs for a Rack
func (*Client) StreamReleaseLogs ¶
func (c *Client) StreamReleaseLogs(app, id string, output io.WriteCloser) error
func (*Client) TerminateInstance ¶
func (*Client) UpdateBuild ¶
func (*Client) UpdateResource ¶
UpdateResource updates a resource.
type Environment ¶
type Formation ¶
type Formation []FormationEntry
type FormationEntry ¶
type FormationOptions ¶
FormationOptions carries the numeric dimensions that can change for a process type. Empty string indicates no change.
type ImportBuildOptions ¶
type ImportBuildOptions struct {
Progress Progress
}
type IndexUpdateOptions ¶
type IndexUpdateOptions struct {
Progress Progress
}
type NotifyEvent ¶
type NotifyEvent struct { Action string `json:"action"` Status string `json:"status"` Data map[string]string `json:"data"` Timestamp time.Time `json:"timestamp"` }
a NotifyEvent is the payload of any webhook services it is serialized to json
type Organization ¶
type Parameters ¶
type PostMultipartOptions ¶
type Process ¶
type Process struct { Id string `json:"id"` App string `json:"app"` Command string `json:"command"` Host string `json:"host"` Image string `json:"image"` Name string `json:"name"` Ports []string `json:"ports"` Release string `json:"release"` Cpu float64 `json:"cpu"` Memory float64 `json:"memory"` Started time.Time `json:"started"` }
type ProgressReader ¶
func NewProgressReader ¶
func NewProgressReader(r io.Reader, tick func(int64)) *ProgressReader
type Rack ¶
type Rack struct { Name string `json:"name"` Status string `json:"status"` Organization *Organization `json:"organization"` }
type Registries ¶
type Registries []Registry
type Resource ¶
type Resource struct { Name string `json:"name"` Status string `json:"status"` StatusReason string `json:"status-reason"` Type string `json:"type"` Exports map[string]string `json:"exports"` // DEPRECATED: should inject any data in Exports // we only set this on the outgoing response for old clients URL string `json:"url"` Outputs map[string]string `json:"-"` Parameters map[string]string `json:"-"` Tags map[string]string `json:"-"` }
Resource is an external resource.