Documentation ¶
Overview ¶
Package composeapi provides an idiomatic Go wrapper around the Compose API for database platform for deployment, management and monitoring.
Index ¶
- func ProcessErrors(statuscode int, body string) []error
- type Account
- type AccountParams
- type Alert
- type Alerts
- type AuditEvent
- type AuditEventsParams
- type Backup
- type Client
- func (c *Client) AddTagsToCluster(clusterID string, tags []string) (*Cluster, []error)
- func (c *Client) AddTagsToClusterJSON(clusterID string, tags []string) (string, []error)
- func (c *Client) CreateAccountUser(accountID string, params UserParams) (*User, []error)
- func (c *Client) CreateAccountUserJSON(accountID string, params UserParams) (string, []error)
- func (c *Client) CreateDeployment(params DeploymentParams) (*Deployment, []error)
- func (c *Client) CreateDeploymentJSON(params DeploymentParams) (string, []error)
- func (c *Client) CreateDeploymentWhitelist(deploymentID string, params DeploymentWhitelistParams) (*Recipe, []error)
- func (c *Client) CreateTeam(params TeamParams) (*Team, []error)
- func (c *Client) CreateTeamJSON(params TeamParams) (string, []error)
- func (c *Client) CreateTeamRole(deploymentID string, params TeamRoleParams) (*TeamRole, []error)
- func (c *Client) CreateTeamRoleJSON(deploymentID string, params TeamRoleParams) (string, []error)
- func (c *Client) DeleteAccountUser(accountID, userID string) (*User, []error)
- func (c *Client) DeleteAccountUserJSON(accountID, userID string) (string, []error)
- func (c *Client) DeleteTagsFromCluster(clusterID string, tags []string) (*Cluster, []error)
- func (c *Client) DeleteTagsFromClusterJSON(clusterID string, tags []string) (string, []error)
- func (c *Client) DeleteTeam(teamID string) (*Team, []error)
- func (c *Client) DeleteTeamJSON(teamID string) (string, []error)
- func (c *Client) DeleteTeamRole(deploymentID string, params TeamRoleParams) []error
- func (c *Client) DeleteTeamRoleJSON(deploymentID string, params TeamRoleParams) []error
- func (c *Client) DeprovisionDeployment(deploymentID string) (*Recipe, []error)
- func (c *Client) DeprovisionDeploymentJSON(deploymentID string) (string, []error)
- func (c *Client) GetAccount() (*Account, []error)
- func (c *Client) GetAccountJSON() (string, []error)
- func (c *Client) GetAccountUsers() ([]User, []error)
- func (c *Client) GetAccountUsersJSON() (string, []error)
- func (c *Client) GetAlertsForDeployment(deploymentid string) (*Alerts, []error)
- func (c *Client) GetAlertsForDeploymentJSON(deploymentid string) (string, []error)
- func (c *Client) GetAuditEvent(id string) (*AuditEvent, []error)
- func (c *Client) GetAuditEventJSON(id string) (string, []error)
- func (c *Client) GetAuditEvents(params AuditEventsParams) (*[]AuditEvent, []error)
- func (c *Client) GetAuditEventsJSON(params AuditEventsParams) (string, []error)
- func (c *Client) GetBackupDetailsForDeployment(deploymentid string, backupid string) (*Backup, []error)
- func (c *Client) GetBackupDetailsForDeploymentJSON(deploymentid string, backupid string) (string, []error)
- func (c *Client) GetBackupsForDeployment(deploymentid string) (*[]Backup, []error)
- func (c *Client) GetBackupsForDeploymentJSON(deploymentid string) (string, []error)
- func (c *Client) GetCluster(clusterid string) (*Cluster, []error)
- func (c *Client) GetClusterByName(clusterName string) (*Cluster, []error)
- func (c *Client) GetClusterJSON(clusterid string) (string, []error)
- func (c *Client) GetClusters() (*[]Cluster, []error)
- func (c *Client) GetClustersJSON() (string, []error)
- func (c *Client) GetDatabases() (*[]Database, []error)
- func (c *Client) GetDatabasesJSON() (string, []error)
- func (c *Client) GetDatacenters() (*[]Datacenter, []error)
- func (c *Client) GetDatacentersJSON() (string, []error)
- func (c *Client) GetDeployment(deploymentid string) (*Deployment, []error)
- func (c *Client) GetDeploymentByName(deploymentName string) (*Deployment, []error)
- func (c *Client) GetDeploymentJSON(deploymentid string) (string, []error)
- func (c *Client) GetDeployments() (*[]Deployment, []error)
- func (c *Client) GetDeploymentsJSON() (string, []error)
- func (c *Client) GetLogfileDetailsForDeployment(deploymentid string, logfileid string) (*Logfile, []error)
- func (c *Client) GetLogfileDetailsForDeploymentJSON(deploymentid string, logfileid string) (string, []error)
- func (c *Client) GetLogfilesForDeployment(deploymentid string) (*[]Logfile, []error)
- func (c *Client) GetLogfilesForDeploymentJSON(deploymentid string) (string, []error)
- func (c *Client) GetRecipe(recipeid string) (*Recipe, []error)
- func (c *Client) GetRecipeJSON(recipeid string) (string, []error)
- func (c *Client) GetRecipesForDeployment(deploymentid string) (*[]Recipe, []error)
- func (c *Client) GetRecipesForDeploymentJSON(deploymentid string) (string, []error)
- func (c *Client) GetScalings(deploymentid string) (*Scalings, []error)
- func (c *Client) GetScalingsJSON(deploymentid string) (string, []error)
- func (c *Client) GetTeam(teamID string) (*Team, []error)
- func (c *Client) GetTeamByName(teamName string) (*Team, []error)
- func (c *Client) GetTeamJSON(teamID string) (string, []error)
- func (c *Client) GetTeamRoles(deploymentID string) (*[]TeamRole, []error)
- func (c *Client) GetTeamRolesJSON(deploymentID string) (string, []error)
- func (c *Client) GetTeams() (*[]Team, []error)
- func (c *Client) GetTeamsJSON() (string, []error)
- func (c *Client) GetUser() (*User, []error)
- func (c *Client) GetUserJSON() (string, []error)
- func (c *Client) GetVersionsForDeployment(deploymentid string) (*[]VersionTransition, []error)
- func (c *Client) GetVersionsForDeploymentJSON(deploymentid string) (string, []error)
- func (c *Client) GetWhitelistForDeployment(deploymentid string) ([]DeploymentWhitelist, []error)
- func (c *Client) PatchDeployment(params PatchDeploymentParams) (*Deployment, []error)
- func (c *Client) PatchDeploymentJSON(params PatchDeploymentParams) (string, []error)
- func (c *Client) PatchTeam(teamID, teamName string) (*Team, []error)
- func (c *Client) PatchTeamJSON(teamID, teamName string) (string, []error)
- func (c *Client) PutTeamUsers(teamID string, userIDs []string) (*Team, []error)
- func (c *Client) PutTeamUsersJSON(teamID string, userIDs []string) (string, []error)
- func (c *Client) ReplaceTagsOnCluster(clusterID string, tags []string) (*Cluster, []error)
- func (c *Client) ReplaceTagsOnClusterJSON(clusterID string, tags []string) (string, []error)
- func (c *Client) RestoreBackup(params RestoreBackupParams) (*Deployment, []error)
- func (c *Client) RestoreBackupJSON(params RestoreBackupParams) (string, []error)
- func (c *Client) SetAPIToken(newtoken string)
- func (c *Client) SetLogger(enableLogging bool, logger io.Writer) *Client
- func (c *Client) SetScalings(scalingsParams ScalingsParams) (*Recipe, []error)
- func (c *Client) SetScalingsJSON(params ScalingsParams) (string, []error)
- func (c *Client) StartBackupForDeployment(deploymentid string) (*Recipe, []error)
- func (c *Client) StartBackupForDeploymentJSON(deploymentid string) (string, []error)
- func (c *Client) UpdateVersion(deploymentID, version string) (*Recipe, []error)
- func (c *Client) UpdateVersionJSON(deploymentID string, version string) (string, []error)
- type Cluster
- type ConnectionStrings
- type CreateDeploymentParams
- type Database
- type Datacenter
- type Deployment
- type DeploymentParams
- type DeploymentWhitelist
- type DeploymentWhitelistParams
- type Errors
- type Link
- type Links
- type Logfile
- type PatchDeploymentParams
- type Recipe
- type RestoreBackupParams
- type Scalings
- type ScalingsParams
- type SimpleError
- type Team
- type TeamParams
- type TeamRole
- type TeamRoleParams
- type User
- type UserParams
- type Version
- type VersionTransition
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ProcessErrors ¶
ProcessErrors tries to turn errors into an Errors struct
Types ¶
type AccountParams ¶
type AccountParams struct {
StripeCustomerID string `json:"stripe_customer_id"`
}
AccountParams is the list of parameters that can be updated on an existing account
type Alert ¶
type Alert struct { CapsuleID string `json:"capsule_id"` DeploymentID string `json:"deployment_id"` Message string `json:"message"` Status string `json:"status"` }
Alert type which holds each Alert
type Alerts ¶
type Alerts struct { Summary string `json:"summary"` Embedded struct { Alerts []Alert `json:"alerts"` } `json:"_embedded"` }
Alerts type which contains all the Alerts and a summary
type AuditEvent ¶
type AuditEvent struct { Links Links `json:"_links"` AccountID string `json:"account_id"` ClusterID string `json:"cluster_id,omitempty"` CreatedAt time.Time `json:"created_at"` Data map[string]string `json:"data"` DeploymentID string `json:"deployment_id,omitempty"` Email string `json:"email,omitempty"` Event string `json:"event"` ID string `json:"id"` IP string `json:"ip"` UserAgent string `json:"user_agent"` UserID string `json:"user_id"` }
AuditEvent is the returned information for a single Compose audit event
type AuditEventsParams ¶
type AuditEventsParams struct { OlderThan *time.Time `json:"older_than,omitempty"` NewerThan *time.Time `json:"newer_than,omitempty"` Cursor string `json:"cursor,omitempty"` Limit int `json:"limit,omitempty"` }
AuditEventsParams is the structure of entirely optional options for filtering or paging through audit events
type Backup ¶
type Backup struct { ID string `json:"id"` Deploymentid string `json:"deployment_id"` Name string `json:"name"` Type string `json:"type"` Status string `json:"status"` IsDownloadable bool `json:"is_downloadable"` IsRestorable bool `json:"is_restorable"` CreatedAt time.Time `json:"created_at"` DownloadLink string `json:"download_link"` }
Backup structure
type Client ¶
type Client struct { // The number of times to retry a failing request if the status code is // retryable (e.g. for HTTP 429 or 500) Retries int // The interval to wait between retries. gorequest does not yet support // exponential back-off on retries RetryInterval time.Duration // RetryStatusCodes is the list of status codes to retry for RetryStatusCodes []int // contains filtered or unexported fields }
Client is a structure that holds session information for the API
func (*Client) AddTagsToCluster ¶
AddTagsToCluster returns cluster data of cluster to which tahs have been added
func (*Client) AddTagsToClusterJSON ¶
AddTagsToClusterJSON returns raw result of call to add tags cluster endpoint
func (*Client) CreateAccountUser ¶
func (c *Client) CreateAccountUser(accountID string, params UserParams) (*User, []error)
CreateAccountUser adds a new user to an account and returns a User object on success
func (*Client) CreateAccountUserJSON ¶
func (c *Client) CreateAccountUserJSON(accountID string, params UserParams) (string, []error)
CreateAccountUserJSON performs the call
func (*Client) CreateDeployment ¶
func (c *Client) CreateDeployment(params DeploymentParams) (*Deployment, []error)
CreateDeployment creates a deployment
func (*Client) CreateDeploymentJSON ¶
func (c *Client) CreateDeploymentJSON(params DeploymentParams) (string, []error)
CreateDeploymentJSON performs the call
func (*Client) CreateDeploymentWhitelist ¶
func (c *Client) CreateDeploymentWhitelist(deploymentID string, params DeploymentWhitelistParams) (*Recipe, []error)
CreateDeploymentWhitelist creates a single deployment whitelist entry for a CIDR range
func (*Client) CreateTeam ¶
func (c *Client) CreateTeam(params TeamParams) (*Team, []error)
CreateTeam creates a team
func (*Client) CreateTeamJSON ¶
func (c *Client) CreateTeamJSON(params TeamParams) (string, []error)
CreateTeamJSON performs the call to create a team
func (*Client) CreateTeamRole ¶
func (c *Client) CreateTeamRole(deploymentID string, params TeamRoleParams) (*TeamRole, []error)
CreateTeamRole adds a team role to a deployment
func (*Client) CreateTeamRoleJSON ¶
func (c *Client) CreateTeamRoleJSON(deploymentID string, params TeamRoleParams) (string, []error)
CreateTeamRoleJSON performs the raw call to add a new team role
func (*Client) DeleteAccountUser ¶
DeleteAccountUser removes a user from the provided account
func (*Client) DeleteAccountUserJSON ¶
DeleteAccountUserJSON performs the call
func (*Client) DeleteTagsFromCluster ¶
DeleteTagsFromCluster returns cluster data after deleting tags from cluster
func (*Client) DeleteTagsFromClusterJSON ¶
DeleteTagsFromClusterJSON returns raw result of call to delete tags cluster endpoint
func (*Client) DeleteTeam ¶
DeleteTeam deletes a team
func (*Client) DeleteTeamJSON ¶
DeleteTeamJSON performs that call
func (*Client) DeleteTeamRole ¶
func (c *Client) DeleteTeamRole(deploymentID string, params TeamRoleParams) []error
DeleteTeamRole deletes a team role
func (*Client) DeleteTeamRoleJSON ¶
func (c *Client) DeleteTeamRoleJSON(deploymentID string, params TeamRoleParams) []error
DeleteTeamRoleJSON is the raw call to remove a team_role
func (*Client) DeprovisionDeployment ¶
DeprovisionDeployment deletes a deployment
func (*Client) DeprovisionDeploymentJSON ¶
DeprovisionDeploymentJSON performs the call
func (*Client) GetAccount ¶
GetAccount Gets first Account struct from account endpoint
func (*Client) GetAccountJSON ¶
GetAccountJSON gets JSON string from endpoint
func (*Client) GetAccountUsers ¶
GetAccountUsers gets the user array for the current account
func (*Client) GetAccountUsersJSON ¶
GetAccountUsersJSON gets the JSON string from the users endpoint for this account
func (*Client) GetAlertsForDeployment ¶
GetAlertsForDeployment gets deployment recipe life
func (*Client) GetAlertsForDeploymentJSON ¶
GetAlertsForDeploymentJSON returns raw JSON for getAlertsforDeployment
func (*Client) GetAuditEvent ¶
func (c *Client) GetAuditEvent(id string) (*AuditEvent, []error)
GetAuditEvent returns the specified audit_event
func (*Client) GetAuditEventJSON ¶
GetAuditEventJSON performs the call
func (*Client) GetAuditEvents ¶
func (c *Client) GetAuditEvents(params AuditEventsParams) (*[]AuditEvent, []error)
GetAuditEvents returns all audit_events the API Key has access to.
func (*Client) GetAuditEventsJSON ¶
func (c *Client) GetAuditEventsJSON(params AuditEventsParams) (string, []error)
GetAuditEventsJSON performs the call
func (*Client) GetBackupDetailsForDeployment ¶
func (c *Client) GetBackupDetailsForDeployment(deploymentid string, backupid string) (*Backup, []error)
GetBackupDetailsForDeployment returns backup details for deployment
func (*Client) GetBackupDetailsForDeploymentJSON ¶
func (c *Client) GetBackupDetailsForDeploymentJSON(deploymentid string, backupid string) (string, []error)
GetBackupDetailsForDeploymentJSON returns the details and download link for a backup
func (*Client) GetBackupsForDeployment ¶
GetBackupsForDeployment returns backup details for deployment
func (*Client) GetBackupsForDeploymentJSON ¶
GetBackupsForDeploymentJSON returns backup details for deployment
func (*Client) GetCluster ¶
GetCluster returns cluster structure
func (*Client) GetClusterByName ¶
GetClusterByName returns a cluster of a given name
func (*Client) GetClusterJSON ¶
GetClusterJSON returns raw cluster
func (*Client) GetClusters ¶
GetClusters gets clusters available
func (*Client) GetClustersJSON ¶
GetClustersJSON gets clusters available
func (*Client) GetDatabases ¶
GetDatabases gets databases available as a Go struct
func (*Client) GetDatabasesJSON ¶
GetDatabasesJSON gets databases available as a string
func (*Client) GetDatacenters ¶
func (c *Client) GetDatacenters() (*[]Datacenter, []error)
GetDatacenters gets datacenters available as a Go struct
func (*Client) GetDatacentersJSON ¶
GetDatacentersJSON gets datacenters available as a string
func (*Client) GetDeployment ¶
func (c *Client) GetDeployment(deploymentid string) (*Deployment, []error)
GetDeployment returns deployment structure
func (*Client) GetDeploymentByName ¶
func (c *Client) GetDeploymentByName(deploymentName string) (*Deployment, []error)
GetDeploymentByName returns a deployment of a given name
func (*Client) GetDeploymentJSON ¶
GetDeploymentJSON returns raw deployment
func (*Client) GetDeployments ¶
func (c *Client) GetDeployments() (*[]Deployment, []error)
GetDeployments returns deployment structure
func (*Client) GetDeploymentsJSON ¶
GetDeploymentsJSON returns raw deployment
func (*Client) GetLogfileDetailsForDeployment ¶
func (c *Client) GetLogfileDetailsForDeployment(deploymentid string, logfileid string) (*Logfile, []error)
GetLogfileDetailsForDeployment returns logfile details for deployment
func (*Client) GetLogfileDetailsForDeploymentJSON ¶
func (c *Client) GetLogfileDetailsForDeploymentJSON(deploymentid string, logfileid string) (string, []error)
GetLogfileDetailsForDeploymentJSON returns the details and download link for a logfile
func (*Client) GetLogfilesForDeployment ¶
GetLogfilesForDeployment returns logfile details for deployment
func (*Client) GetLogfilesForDeploymentJSON ¶
GetLogfilesForDeploymentJSON returns logfile details for deployment
func (*Client) GetRecipeJSON ¶
GetRecipeJSON Gets raw JSON for recipeid
func (*Client) GetRecipesForDeployment ¶
GetRecipesForDeployment gets deployment recipe life
func (*Client) GetRecipesForDeploymentJSON ¶
GetRecipesForDeploymentJSON returns raw JSON for getRecipesforDeployment
func (*Client) GetScalings ¶
GetScalings returns deployment structure
func (*Client) GetScalingsJSON ¶
GetScalingsJSON returns raw scalings
func (*Client) GetTeamByName ¶
GetTeamByName returns a team of a given name
func (*Client) GetTeamJSON ¶
GetTeamJSON returns a raw team
func (*Client) GetTeamRoles ¶
GetTeamRoles returns a slice of team roles for the given deployment
func (*Client) GetTeamRolesJSON ¶
GetTeamRolesJSON returns raw team roles
func (*Client) GetTeamsJSON ¶
GetTeamsJSON returns raw teams
func (*Client) GetUserJSON ¶
GetUserJSON returns user JSON string
func (*Client) GetVersionsForDeployment ¶
func (c *Client) GetVersionsForDeployment(deploymentid string) (*[]VersionTransition, []error)
GetVersionsForDeployment gets deployment recipe life
func (*Client) GetVersionsForDeploymentJSON ¶
GetVersionsForDeploymentJSON returns raw JSON for getVersionsforDeployment
func (*Client) GetWhitelistForDeployment ¶
func (c *Client) GetWhitelistForDeployment(deploymentid string) ([]DeploymentWhitelist, []error)
GetWhitelistForDeployment gets all whitelist entries for a given deployment ID
func (*Client) PatchDeployment ¶
func (c *Client) PatchDeployment(params PatchDeploymentParams) (*Deployment, []error)
PatchDeployment patches a deployment
func (*Client) PatchDeploymentJSON ¶
func (c *Client) PatchDeploymentJSON(params PatchDeploymentParams) (string, []error)
PatchDeploymentJSON performs the call
func (*Client) PatchTeamJSON ¶
PatchTeamJSON changes a team's name
func (*Client) PutTeamUsers ¶
PutTeamUsers adds users to the given team
func (*Client) PutTeamUsersJSON ¶
PutTeamUsersJSON performs the call
func (*Client) ReplaceTagsOnCluster ¶
ReplaceTagsOnCluster returns cluster data after replacing tags on cluster
func (*Client) ReplaceTagsOnClusterJSON ¶
ReplaceTagsOnClusterJSON returns raw result of call to replace tags cluster endpoint
func (*Client) RestoreBackup ¶
func (c *Client) RestoreBackup(params RestoreBackupParams) (*Deployment, []error)
RestoreBackup creates a deployment
func (*Client) RestoreBackupJSON ¶
func (c *Client) RestoreBackupJSON(params RestoreBackupParams) (string, []error)
RestoreBackupJSON performs the call
func (*Client) SetAPIToken ¶
SetAPIToken overrides the API token
func (*Client) SetLogger ¶
SetLogger can enable or disable http logging to and from the Compose API endpoint using the provided io.Writer for the provided client.
func (*Client) SetScalings ¶
func (c *Client) SetScalings(scalingsParams ScalingsParams) (*Recipe, []error)
SetScalings sets scale and returns recipe for scaling
func (*Client) SetScalingsJSON ¶
func (c *Client) SetScalingsJSON(params ScalingsParams) (string, []error)
SetScalingsJSON sets JSON scaling and returns string respones
func (*Client) StartBackupForDeployment ¶
StartBackupForDeployment starts backup and returns recipe
func (*Client) StartBackupForDeploymentJSON ¶
StartBackupForDeploymentJSON starts backup and returns JSON response
func (*Client) UpdateVersion ¶
UpdateVersion returns Recipe for version update that is now taking progress
type Cluster ¶
type Cluster struct { ID string `json:"id"` AccountID string `json:"account_id"` Name string `json:"name"` Type string `json:"type"` Provider string `json:"provider"` Region string `json:"region"` Multitenant bool `json:"multitenant"` AccountSlug string `json:"account_slug"` CreatedAt time.Time `json:"created_at"` Subdomain string `json:"subdomain"` Tags []string `json:"tags"` }
Cluster structure
type ConnectionStrings ¶
type ConnectionStrings struct { Health []string `json:"health,omitempty"` SSH []string `json:"ssh,omitempty"` Admin []string `json:"admin,omitempty"` SSHAdmin []string `json:"ssh_admin,omitempty"` CLI []string `json:"cli,omitempty"` Direct []string `json:"direct,omitempty"` Maps []map[string]string `json:"maps,omitempty"` Misc interface{} `json:"misc,omitempty"` }
ConnectionStrings structure, part of the Deployment struct
type CreateDeploymentParams ¶
type CreateDeploymentParams struct {
Deployment DeploymentParams `json:"deployment"`
}
CreateDeploymentParams Parameters to be completed before creating a deployment
type Database ¶
type Database struct { DatabaseType string `json:"type"` Status string `json:"status"` Embedded struct { Versions []Version `json:"versions"` } `json:"_embedded"` }
Database structure
type Datacenter ¶
type Datacenter struct { Region string `json:"region"` Provider string `json:"provider"` Slug string `json:"slug"` }
Datacenter structure
type Deployment ¶
type Deployment struct { ID string `json:"id"` Name string `json:"name"` Type string `json:"type"` CreatedAt time.Time `json:"created_at"` ProvisionRecipeID string `json:"provision_recipe_id,omitempty"` CACertificateBase64 string `json:"ca_certificate_base64,omitempty"` Connection ConnectionStrings `json:"connection_strings,omitempty"` Notes string `json:"notes,omitempty"` CustomerBillingCode string `json:"customer_billing_code,omitempty"` Version string `json:"version,omitempty"` ClusterID string `json:"cluster_id,omitempty"` Links Links `json:"_links"` }
Deployment structure
type DeploymentParams ¶
type DeploymentParams struct { Name string `json:"name"` AccountID string `json:"account_id"` ClusterID string `json:"cluster_id,omitempty"` Datacenter string `json:"datacenter,omitempty"` ProvisioningTags []string `json:"provisioning_tags,omitempty"` DatabaseType string `json:"type"` Version string `json:"version,omitempty"` Units int `json:"units,omitempty"` SSL bool `json:"ssl,omitempty"` CacheMode bool `json:"cache_mode,omitempty"` WiredTiger bool `json:"wired_tiger,omitempty"` Notes string `json:"notes,omitempty"` CustomerBillingCode string `json:"customer_billing_code,omitempty"` }
DeploymentParams core parameters for a new deployment
type DeploymentWhitelist ¶
type DeploymentWhitelist struct { DeploymentWhitelistID string `json:"id"` Description string `json:"description"` IP string `json:"ip"` }
DeploymentWhitelist - representation of an applied whitelist entry
type DeploymentWhitelistParams ¶
type DeploymentWhitelistParams struct { IP string `json:"ip"` Description string `json:"description"` }
DeploymentWhitelistParams - construct to pass to CreateDeploymentWhitelist
type Links ¶
type Links struct { ComposeWebUILink Link `json:"compose_web_ui"` ScalingsLink Link `json:"scalings"` BackupsLink Link `json:"backups"` AlertsLink Link `json:"alerts"` PortalUsersLink Link `json:"portal_users"` ClusterLink Link `json:"cluster"` }
Links structure, part of the Deployment struct
type Logfile ¶
type Logfile struct { ID string `json:"id"` Deploymentid string `json:"deployment_id"` Capsuleid string `json:"capsule_id"` Name string `json:"name"` Region string `json:"region"` Status string `json:"status"` Date time.Time `json:"created_at"` DownloadLink string `json:"download_link"` }
Logfile structure
type PatchDeploymentParams ¶
type PatchDeploymentParams struct { DeploymentID string `json:"omit"` Notes string `json:"notes,omitempty"` CustomerBillingCode string `json:"customer_billing_code,omitempty"` }
PatchDeploymentParams is used to pass parameters to PatchDeployment
type Recipe ¶
type Recipe struct { ID string `json:"id"` Template string `json:"template"` Status string `json:"status"` StatusDetail string `json:"status_detail"` AccountID string `json:"account_id"` DeploymentID string `json:"deployment_id"` Name string `json:"name"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` Embedded struct { Recipes []Recipe `json:"recipes"` } `json:"_embedded"` }
Recipe structure
type RestoreBackupParams ¶
type RestoreBackupParams struct { DeploymentID string BackupID string Name string ClusterID string Datacenter string Version string SSL bool }
RestoreBackupParams Parameters to be completed before creating a deployment
type Scalings ¶
type Scalings struct { AllocatedUnits int `json:"allocated_units"` UsedUnits int `json:"used_units"` StartingUnits int `json:"starting_units"` MinimumUnits int `json:"minimum_units"` UnitSizeInMB int `json:"unit_size_in_mb"` UnitType string `json:"unit_type"` }
Scalings represents the used, allocated, starting and minimum unit scale of a deployment
type ScalingsParams ¶
ScalingsParams represents the parameters needed to scale a deployment
type SimpleError ¶
type SimpleError struct {
Error string `json:"errors"`
}
SimpleError struct for parsing simple error returns
type TeamParams ¶
type TeamParams struct {
Name string `json:"name"`
}
TeamParams core parameters for a new team
type TeamRoleParams ¶
TeamRoleParams the core parameters to create or delete a team role
type UserParams ¶
type UserParams struct { Name string `json:"name"` Email string `json:"email"` Phone string `json:"phone"` }
UserParams structure