client

package
v0.0.0-...-102fcc4 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2015 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var MinimumServerVersion = "20151023042141"

Functions

This section is empty.

Types

type App

type App struct {
	Name    string `json:"name"`
	Release string `json:"release"`
	Status  string `json:"status"`
}

type Apps

type Apps []App

type Build

type Build struct {
	Id       string `json:"id"`
	App      string `json:"app"`
	Logs     string `json:"logs"`
	Manifest string `json:"manifest"`
	Release  string `json:"release"`
	Status   string `json:"status"`

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

type Builds

type Builds []Build

type Client

type Client struct {
	Host     string
	Password string
	Version  string
	// contains filtered or unexported fields
}

func New

func New(host, password, version string) *Client

func (*Client) CreateApp

func (c *Client) CreateApp(name string) (*App, error)

func (*Client) CreateBuildSource

func (c *Client) CreateBuildSource(app string, source []byte, cache bool) (*Build, error)

func (*Client) CreateBuildUrl

func (c *Client) CreateBuildUrl(app string, url string, cache bool) (*Build, error)
func (c *Client) CreateLink(app, name string) (*Service, error)

func (*Client) CreateSSL

func (c *Client) CreateSSL(app, process, port, body, key string, secure bool) (*SSL, error)

func (*Client) CreateService

func (c *Client) CreateService(typ, name, url string) (*Service, error)

func (*Client) Delete

func (c *Client) Delete(path string, out interface{}) error

func (*Client) DeleteApp

func (c *Client) DeleteApp(name string) (*App, error)

func (*Client) DeleteEnvironment

func (c *Client) DeleteEnvironment(app, key string) (Environment, string, error)
func (c *Client) DeleteLink(app, name string) (*Service, error)

func (*Client) DeleteResponse

func (c *Client) DeleteResponse(path string, out interface{}) (*http.Response, error)

func (*Client) DeleteSSL

func (c *Client) DeleteSSL(app, process, port string) (*SSL, error)

func (*Client) DeleteService

func (c *Client) DeleteService(name string) (*Service, error)

func (*Client) ExecProcessAttached

func (c *Client) ExecProcessAttached(app, pid, command string, in io.Reader, out io.WriteCloser) (int, error)

func (*Client) Get

func (c *Client) Get(path string, out interface{}) error

func (*Client) GetApp

func (c *Client) GetApp(name string) (*App, error)

func (*Client) GetApps

func (c *Client) GetApps() (Apps, error)

func (*Client) GetBuild

func (c *Client) GetBuild(app, id string) (*Build, error)

func (*Client) GetBuilds

func (c *Client) GetBuilds(app string) (Builds, error)

func (*Client) GetEnvironment

func (c *Client) GetEnvironment(app string) (Environment, error)

func (*Client) GetProcesses

func (c *Client) GetProcesses(app string, stats bool) (Processes, error)

func (*Client) GetRelease

func (c *Client) GetRelease(app, id string) (*Release, error)

func (*Client) GetReleases

func (c *Client) GetReleases(app string) (Releases, error)

func (*Client) GetService

func (c *Client) GetService(name string) (*Service, error)

func (*Client) GetServices

func (c *Client) GetServices() (Services, error)

func (*Client) GetSystem

func (c *Client) GetSystem() (*System, error)

func (*Client) ListFormation

func (c *Client) ListFormation(app string) (Formation, error)

func (*Client) ListSSL

func (c *Client) ListSSL(app string) (*SSLs, error)

func (*Client) Post

func (c *Client) Post(path string, params Params, out interface{}) error

func (*Client) PostBody

func (c *Client) PostBody(path string, body io.Reader, out interface{}) error

func (*Client) PostBodyResponse

func (c *Client) PostBodyResponse(path string, body io.Reader, out interface{}) (*http.Response, error)

func (*Client) PostMultipart

func (c *Client) PostMultipart(path string, files map[string][]byte, params Params, out interface{}) error

func (*Client) PromoteRelease

func (c *Client) PromoteRelease(app, id string) (*Release, error)

func (*Client) Put

func (c *Client) Put(path string, params Params, out interface{}) error

func (*Client) PutBody

func (c *Client) PutBody(path string, body io.Reader, out interface{}) error

func (*Client) RunProcessAttached

func (c *Client) RunProcessAttached(app, process, command string, in io.Reader, out io.WriteCloser) (int, error)

func (*Client) RunProcessDetached

func (c *Client) RunProcessDetached(app, process, command string) error

func (*Client) ScaleSystem

func (c *Client) ScaleSystem(count int, typ string) (*System, error)

func (*Client) SetEnvironment

func (c *Client) SetEnvironment(app string, body io.Reader) (Environment, string, error)

func (*Client) SetFormation

func (c *Client) SetFormation(app, process, count, memory string) error

func (*Client) StopProcess

func (c *Client) StopProcess(app, id string) (*Process, error)

func (*Client) Stream

func (c *Client) Stream(path string, headers map[string]string, in io.Reader, out io.WriteCloser) error

func (*Client) StreamAppLogs

func (c *Client) StreamAppLogs(app string, output io.WriteCloser) error

func (*Client) StreamBuildLogs

func (c *Client) StreamBuildLogs(app, id string, output io.WriteCloser) error

func (*Client) StreamReleaseLogs

func (c *Client) StreamReleaseLogs(app, id string, output io.WriteCloser) error

func (*Client) Switch

func (c *Client) Switch(rackName string) (success map[string]string, err error)

func (*Client) UpdateSystem

func (c *Client) UpdateSystem(version string) (*System, error)

func (*Client) UpdateSystemOriginal

func (c *Client) UpdateSystemOriginal(version string) (*System, error)

func (*Client) WithoutVersionCheck

func (c *Client) WithoutVersionCheck(fn func(c *Client))

type Environment

type Environment map[string]string

type Error

type Error struct {
	Error string `json:"error"`
}

type Formation

type Formation []FormationEntry

type FormationEntry

type FormationEntry struct {
	Balancer string `json:"balancer"`
	Name     string `json:"name"`
	Count    int    `json:"count"`
	Memory   int    `json:"memory"`
	Ports    []int  `json:"ports"`
}

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 Params

type Params map[string]string

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 Processes

type Processes []Process

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"`
	Created  time.Time `json:"created"`
}

type Releases

type Releases []Release

type SSL

type SSL struct {
	Domain     string    `json:"domain"`
	Expiration time.Time `json:"expiration"`
	Port       int       `json:"port"`
	Process    string    `json:"process"`
	Secure     bool      `json:"secure"`
}

type SSLs

type SSLs []SSL

type Service

type Service struct {
	Name   string `json:"name"`
	Status string `json:"status"`
	Type   string `json:"type"`
	URL    string `json:"url"`
}

type Services

type Services []Service

type System

type System struct {
	Count   int    `json:"count"`
	Name    string `json:"name"`
	Status  string `json:"status"`
	Type    string `json:"type"`
	Version string `json:"version"`
}

Jump to

Keyboard shortcuts

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