Documentation ¶
Index ¶
- type Account
- type Accounts
- type Client
- func (c *Client) CreateDeployment(newDeployment NewDeployment) (*Deployment, error)
- func (c *Client) Delete(endpoint string) (string, error)
- func (c *Client) DeleteDeployment(deploymentID string) (*Recipe, error)
- func (c *Client) Do(method, endpoint, payload string, code int) (string, error)
- func (c *Client) Get(endpoint string) (string, error)
- func (c *Client) GetAccounts() (Accounts, error)
- func (c *Client) GetDatabases() (Databases, error)
- func (c *Client) GetDeployment(deploymentID string) (*Deployment, error)
- func (c *Client) GetDeploymentByName(name string) (*Deployment, error)
- func (c *Client) GetDeployments() (Deployments, error)
- func (c *Client) GetRecipe(recipeID string) (*Recipe, error)
- func (c *Client) GetRecipes(deploymentID string) (Recipes, error)
- func (c *Client) GetScaling(deploymentID string) (*Scaling, error)
- func (c *Client) Post(endpoint, payload string) (string, error)
- func (c *Client) PostAsync(endpoint, payload string) (string, error)
- func (c *Client) UpdateScaling(deploymentID string, units int) (*Recipe, error)
- type Database
- type Databases
- type Deployment
- type Deployments
- type NewDeployment
- type Recipe
- type Recipes
- type Scaling
- type Version
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { Config config.API Mutex *sync.Mutex HTTPClient *http.Client Retries int RetryInterval time.Duration RetryStatusCodes []int }
func (*Client) CreateDeployment ¶
func (c *Client) CreateDeployment(newDeployment NewDeployment) (*Deployment, error)
func (*Client) DeleteDeployment ¶
func (*Client) GetAccounts ¶
func (*Client) GetDatabases ¶
func (*Client) GetDeployment ¶
func (c *Client) GetDeployment(deploymentID string) (*Deployment, error)
func (*Client) GetDeploymentByName ¶
func (c *Client) GetDeploymentByName(name string) (*Deployment, error)
func (*Client) GetDeployments ¶
func (c *Client) GetDeployments() (Deployments, error)
type Deployment ¶
type Deployment struct { ID string `json:"id"` AccountID string `json:"account_id"` Name string `json:"name"` Type string `json:"type"` Notes string `json:"notes"` CustomerBillingCode string `json:"customer_billing_code"` ClusterID string `json:"cluster_id"` Version string `json:"version"` CACertificateBase64 string `json:"ca_certificate_base64,omitempty"` ProvisionRecipeID string `json:"provision_recipe_id,omitempty"` CreatedAt time.Time `json:"created_at"` ConnectionStrings struct { Direct []string `json:"direct"` CLI interface{} `json:"cli,omitempty"` Maps interface{} `json:"maps,omitempty"` SSH interface{} `json:"ssh,omitempty"` Health interface{} `json:"health,omitempty"` Admin interface{} `json:"admin,omitempty"` } `json:"connection_strings"` Links struct { ComposeWebUI struct { HREF string `json:"href"` Templated bool `json:"templated"` } `json:"compose_web_ui"` } `json:"_links"` }
type Deployments ¶
type Deployments []Deployment
type NewDeployment ¶
type NewDeployment struct { Name string `json:"name"` AccountID string `json:"account_id"` Datacenter string `json:"datacenter"` Type string `json:"type"` Version string `json:"version,omitempty"` Units int `json:"units,omitempty"` CacheMode bool `json:"cache_mode,omitempty"` Notes string `json:"notes,omitempty"` }
type Recipe ¶
type Recipe struct { ID string `json:"id"` Name string `json:"name"` Template string `json:"template"` Status string `json:"status"` // can be running, waiting, complete or failed StatusDetail string `json:"status_detail"` AccountID string `json:"account_id"` DeploymentID string `json:"deployment_id"` ParentID string `json:"parent_id"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` OperationsComplete int `json:"operations_complete"` OperationsTotal int `json:"operations_total"` Embedded struct { Recipes []Recipe `json:"recipes"` } `json:"_embedded"` }
type Recipes ¶
type Recipes []Recipe
func (Recipes) SortByCreatedAt ¶
func (r Recipes) SortByCreatedAt()
func (Recipes) SortByUpdatedAt ¶
func (r Recipes) SortByUpdatedAt()
type Scaling ¶
type Scaling struct { AllocatedUnits int `json:"allocated_units,omitempty"` UsedUnits int `json:"used_units,omitempty"` StartingUnits int `json:"starting_units,omitempty"` MinimumUnits int `json:"minimum_units,omitempty"` MemoryPerUnitInMB int `json:"memory_per_unit_in_mb,omitempty"` StoragePerUnitInMB int `json:"storage_per_unit_in_mb,omitempty"` UnitSizeInMB int `json:"unit_size_in_mb,omitempty"` UnitType string `json:"unit_type,omitempty"` }
Click to show internal directories.
Click to hide internal directories.