Documentation ¶
Index ¶
- Constants
- func GetAuthURL() string
- func GetEndpointType(t string) (string, error)
- func GetHost() (string, error)
- func GetHumanReadableEndpointType(t string) (string, error)
- func GetIDFromHref(href string) (int64, error)
- func GetToken() (string, error)
- func MakeInt64Slice(interfaceSlice []interface{}) ([]int64, error)
- func MakeStringSlice(interfaceSlice []interface{}) ([]string, error)
- type AcmeChallenge
- type App
- type AppUpdates
- type Client
- func (c *Client) CreateApp(handle string, accountID int64) (App, error)
- func (c *Client) CreateDatabase(accountID int64, attrs DBCreateAttrs) (Database, error)
- func (c *Client) CreateEndpoint(service Service, attrs EndpointCreateAttrs) (Endpoint, error)
- func (c *Client) CreateEnvironment(organizationID string, stackID int64, attrs EnvironmentCreateAttrs) (Environment, error)
- func (c *Client) CreateLogDrain(handle string, accountID int64, attrs *LogDrainCreateAttrs) (*LogDrain, error)
- func (c *Client) CreateMetricDrain(handle string, accountID int64, attrs *MetricDrainCreateAttrs) (*MetricDrain, error)
- func (c *Client) CreateReplica(attrs ReplicateAttrs) (Database, error)
- func (c *Client) DeleteApp(appID int64) (bool, error)
- func (c *Client) DeleteDatabase(databaseID int64) error
- func (c *Client) DeleteEndpoint(endpointID int64) error
- func (c *Client) DeleteEnvironment(environmentID int64) error
- func (c *Client) DeleteLogDrain(logDrainID int64) (bool, error)
- func (c *Client) DeleteMetricDrain(metricDrainID int64) (bool, error)
- func (c *Client) DeleteReplica(replicaID int64) error
- func (c *Client) DeployApp(config map[string]interface{}, appID int64) error
- func (c *Client) GetApp(appID int64) (App, error)
- func (c *Client) GetConfiguration(configID int64) (Configuration, error)
- func (c *Client) GetConfigurationFromHref(href string) (Configuration, error)
- func (c *Client) GetDatabase(databaseID int64) (Database, error)
- func (c *Client) GetDatabaseIDFromHandle(accountID int64, handle string) (int64, bool, error)
- func (c *Client) GetDatabaseImage(imageID int64) (DatabaseImage, error)
- func (c *Client) GetDatabaseImageByTypeAndVersion(imageType string, version string) (DatabaseImage, error)
- func (c *Client) GetDatabaseOperations(databaseID int64, page int64) (*models.InlineResponse20031, error)
- func (c *Client) GetDisk(diskID int64) (Disk, error)
- func (c *Client) GetDiskFromHref(href string) (Disk, error)
- func (c *Client) GetEndpoint(endpointID int64) (Endpoint, error)
- func (c *Client) GetEnvironment(environmentID int64) (Environment, error)
- func (c *Client) GetEnvironmentFromHandle(handle string) (Environment, error)
- func (c *Client) GetEnvironmentIDFromHandle(handle string) (int64, error)
- func (c *Client) GetImageFromHref(href string) (DatabaseImage, error)
- func (c *Client) GetLogDrain(logDrainID int64) (*LogDrain, error)
- func (c *Client) GetMetricDrain(metricDrainID int64) (*MetricDrain, error)
- func (c *Client) GetOrganization() (Organization, error)
- func (c *Client) GetReplica(replicaID int64) (Database, error)
- func (c *Client) GetReplicaFromHandle(databaseID int64, handle string) (*models.InlineResponse20016EmbeddedDatabases, error)
- func (c *Client) GetService(serviceID int64) (Service, error)
- func (c *Client) GetServiceForAppByName(appID int64, serviceName string) (Service, error)
- func (c *Client) GetServiceFromHref(href string) (Service, error)
- func (c *Client) GetStack(id int64) (Stack, error)
- func (c *Client) GetStackByName(name string) (Stack, error)
- func (c *Client) GetStacks() ([]Stack, error)
- func (c *Client) ScaleService(serviceID int64, containerCount int64, memoryLimit int64, ...) error
- func (c *Client) UpdateApp(appID int64, appUpdates AppUpdates) error
- func (c *Client) UpdateDatabase(databaseID int64, updates DBUpdates) error
- func (c *Client) UpdateEndpoint(endpointID int64, up EndpointUpdates) error
- func (c *Client) UpdateEnvironment(environmentID int64, environmentUpdates EnvironmentUpdates) error
- func (c *Client) UpdateReplica(replicaID int64, updates DBUpdates) error
- func (c *Client) WaitForOperation(operationID int64) (bool, error)
- type Configuration
- type DBCreateAttrs
- type DBUpdates
- type Database
- type DatabaseImage
- type Disk
- type Endpoint
- type EndpointCreateAttrs
- type EndpointUpdates
- type Environment
- type EnvironmentCreateAttrs
- type EnvironmentUpdates
- type HALOrganizationParent
- type HALOrganizationResponse
- type LogDrain
- type LogDrainCreateAttrs
- type MetricDrain
- type MetricDrainCreateAttrs
- type Organization
- type ReplicaIdentifiers
- type ReplicateAttrs
- type Service
- type Stack
Constants ¶
const MaximumPagesOfEnvironments = 30
const MaximumPagesOfStacks = 10
Variables ¶
This section is empty.
Functions ¶
func GetAuthURL ¶ added in v0.4.0
func GetAuthURL() string
func GetEndpointType ¶
func GetToken ¶
GetToken - gets a token (or error) for use from username password, an environment variable or filesystem
func MakeInt64Slice ¶ added in v0.5.0
makes a int64 slice out of a slice of type interface
func MakeStringSlice ¶
makes a string slice out of a slice of type interface
Types ¶
type AcmeChallenge ¶ added in v0.1.4
type AppUpdates ¶ added in v0.1.13
type AppUpdates struct { // Handle - field to update app handle Handle string }
type Client ¶
type Client struct { Client *deploy.DeployAPIV1 Token runtime.ClientAuthInfoWriter RawToken string }
func SetUpClient ¶
sets up client and gets auth token used for API requests
func (*Client) CreateDatabase ¶
func (c *Client) CreateDatabase(accountID int64, attrs DBCreateAttrs) (Database, error)
func (*Client) CreateEndpoint ¶
func (c *Client) CreateEndpoint(service Service, attrs EndpointCreateAttrs) (Endpoint, error)
CreateEndpoint() creates Vhost API object + provision operation on the app.
func (*Client) CreateEnvironment ¶ added in v0.3.0
func (c *Client) CreateEnvironment(organizationID string, stackID int64, attrs EnvironmentCreateAttrs) (Environment, error)
func (*Client) CreateLogDrain ¶ added in v0.1.5
func (*Client) CreateMetricDrain ¶ added in v0.2.0
func (c *Client) CreateMetricDrain(handle string, accountID int64, attrs *MetricDrainCreateAttrs) (*MetricDrain, error)
func (*Client) CreateReplica ¶
func (c *Client) CreateReplica(attrs ReplicateAttrs) (Database, error)
func (*Client) DeleteDatabase ¶
func (*Client) DeleteEndpoint ¶
DeleteEndpoint() deletes the endpoint.
func (*Client) DeleteEnvironment ¶ added in v0.3.0
func (*Client) DeleteLogDrain ¶ added in v0.1.5
func (*Client) DeleteMetricDrain ¶ added in v0.2.0
func (*Client) DeleteReplica ¶
func (*Client) GetConfiguration ¶
func (c *Client) GetConfiguration(configID int64) (Configuration, error)
func (*Client) GetConfigurationFromHref ¶
func (c *Client) GetConfigurationFromHref(href string) (Configuration, error)
func (*Client) GetDatabaseIDFromHandle ¶
Gets database id associated with a given handle.
func (*Client) GetDatabaseImage ¶
func (c *Client) GetDatabaseImage(imageID int64) (DatabaseImage, error)
func (*Client) GetDatabaseImageByTypeAndVersion ¶
func (c *Client) GetDatabaseImageByTypeAndVersion(imageType string, version string) (DatabaseImage, error)
func (*Client) GetDatabaseOperations ¶
func (*Client) GetEndpoint ¶
GetEndpoint() returns the response's payload, a bool saying whether or not the endpoint has been deprovisioned, and an error.
func (*Client) GetEnvironment ¶ added in v0.3.0
func (c *Client) GetEnvironment(environmentID int64) (Environment, error)
func (*Client) GetEnvironmentFromHandle ¶ added in v0.3.2
func (c *Client) GetEnvironmentFromHandle(handle string) (Environment, error)
func (*Client) GetEnvironmentIDFromHandle ¶
Gets environment id associated with a given handle.
func (*Client) GetImageFromHref ¶
func (c *Client) GetImageFromHref(href string) (DatabaseImage, error)
func (*Client) GetLogDrain ¶ added in v0.1.5
func (*Client) GetMetricDrain ¶ added in v0.2.0
func (c *Client) GetMetricDrain(metricDrainID int64) (*MetricDrain, error)
func (*Client) GetOrganization ¶ added in v0.4.0
func (c *Client) GetOrganization() (Organization, error)
GetOrganization get organizations by user's token. Attempts to get organizations from auth api, then attempts to get the FIRST one. if more than one is found or none are found, error is raised
func (*Client) GetReplicaFromHandle ¶
func (*Client) GetServiceForAppByName ¶
func (*Client) GetServiceFromHref ¶
func (*Client) GetStackByName ¶ added in v0.3.2
func (*Client) ScaleService ¶
func (*Client) UpdateApp ¶ added in v0.1.13
func (c *Client) UpdateApp(appID int64, appUpdates AppUpdates) error
func (*Client) UpdateDatabase ¶
func (*Client) UpdateEndpoint ¶
func (c *Client) UpdateEndpoint(endpointID int64, up EndpointUpdates) error
UpdateEndpoint() takes in an endpointID and updates needed, and updates the endpoint.
func (*Client) UpdateEnvironment ¶ added in v0.3.0
func (c *Client) UpdateEnvironment(environmentID int64, environmentUpdates EnvironmentUpdates) error
func (*Client) UpdateReplica ¶
type Configuration ¶
type Configuration struct { ID int64 Env interface{} }
type DBCreateAttrs ¶
type DBUpdates ¶
type DBUpdates struct { ContainerSize int64 DiskSize int64 ContainerProfile string Handle string // SkipOperationUpdate - changing a DB can incur multiple API calls. To contain it to only update the handle // set this to true then you only make one API call (to update database itself) without // triggering an operation SkipOperationUpdate bool }
DBUpdates - struct to define what operations you contain your DB update to. Add values to this struct
to eventually pass it around for consumption by the go sdk
type DatabaseImage ¶
type EndpointCreateAttrs ¶
type EndpointUpdates ¶
type Environment ¶ added in v0.3.0
type EnvironmentCreateAttrs ¶ added in v0.3.0
type EnvironmentCreateAttrs struct {
Handle string
}
type EnvironmentUpdates ¶ added in v0.3.0
type EnvironmentUpdates struct {
Handle string
}
type HALOrganizationParent ¶ added in v0.4.0
type HALOrganizationParent struct {
Organizations []Organization `json:"organizations"`
}
type HALOrganizationResponse ¶ added in v0.4.0
type HALOrganizationResponse struct {
Embedded HALOrganizationParent `json:"_embedded"`
}