composeapi

package
v0.0.0-...-3d40c6a Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2016 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateDeploymentJSON

func CreateDeploymentJSON(params CreateDeploymentParams) (string, []error)

CreateDeploymentJSON performs the call

func GetAccountJSON

func GetAccountJSON() (string, []error)

GetAccountJSON gets JSON string from endpoint

func GetClusters

func GetClusters() (*[]Cluster, []error)

GetClusters gets clusters available

func GetClustersJSON

func GetClustersJSON() (string, []error)

GetClustersJSON gets clusters available

func GetDatabases

func GetDatabases() (*[]Database, []error)

GetDatabases gets databases available as a Go struct

func GetDatabasesJSON

func GetDatabasesJSON() (string, []error)

GetDatabasesJSON gets databases available as a string

func GetDatacenters

func GetDatacenters() (*[]Datacenter, []error)

GetDatacenters gets datacenters available as a Go struct

func GetDatacentersJSON

func GetDatacentersJSON() (string, []error)

GetDatacentersJSON gets datacenters available as a string

func GetDeployments

func GetDeployments() (*[]Deployment, []error)

GetDeployments returns deployment structure

func GetDeploymentsJSON

func GetDeploymentsJSON() (string, []error)

GetDeploymentsJSON returns raw deployment

func GetRecipeJSON

func GetRecipeJSON(recipeid string) (string, []error)

GetRecipeJSON Gets raw JSON for recipeid

func GetRecipesForDeployment

func GetRecipesForDeployment(deploymentid string) (*[]Recipe, []error)

GetRecipesForDeployment gets deployment recipe life

func GetRecipesForDeploymentJSON

func GetRecipesForDeploymentJSON(deploymentid string) (string, []error)

GetRecipesForDeploymentJSON returns raw JSON for getRecipesforDeployment

func GetUserJSON

func GetUserJSON() (string, []error)

GetUserJSON returns user JSON string

func GetVersionsForDeployment

func GetVersionsForDeployment(deploymentid string) (*[]VersionTransition, []error)

GetVersionsForDeployment gets deployment recipe life

func GetVersionsForDeploymentJSON

func GetVersionsForDeploymentJSON(deploymentid string) (string, []error)

GetVersionsForDeploymentJSON returns raw JSON for getVersionsforDeployment

Types

type Account

type Account struct {
	ID   string `json:"id"`
	Slug string `json:"slug"`
	Name string `json:"name"`
}

Account structure

func GetAccount

func GetAccount() (*Account, []error)

GetAccount Gets first Account struct from account endpoint

type AccountResponse

type AccountResponse struct {
	Embedded struct {
		Accounts []Account `json:"accounts"`
	} `json:"_embedded"`
}

AccountResponse holding structure

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"`
}

Cluster structure

type ClustersResponse

type ClustersResponse struct {
	Embedded struct {
		Clusters []Cluster `json:"clusters"`
	} `json:"_embedded"`
}

ClustersResponse structure (an array of Cluster)

type ConnectionStrings

type ConnectionStrings struct {
	Health   string   `json:"health"`
	SSH      string   `json:"ssh"`
	Admin    string   `json:"admin"`
	SSHAdmin string   `json:"ssh_admin"`
	CLI      []string `json:"cli"`
	Direct   []string `json:"direct"`
}

ConnectionStrings structure

type CreateDeploymentParams

type CreateDeploymentParams struct {
	Name         string `json:"name"`
	AccountID    string `json:"account_id"`
	ClusterID    string `json:"cluster_id,omitempty"`
	Datacenter   string `json:"datacenter,omitempty"`
	DatabaseType string `json:"type"`
	Version      string `json:"version,omitempty"`
	Units        int    `json:"units,omitempty"`
	SSL          bool   `json:"ssl,omitempty"`
	WiredTiger   bool   `json:"wired_tiger,omitempty"`
}

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 DatabasesResponse

type DatabasesResponse struct {
	Embedded struct {
		Databases []Database `json:"applications"`
	} `json:"_embedded"`
}

DatabasesResponse structure (an array of Datacenter)

type Datacenter

type Datacenter struct {
	Region   string `json:"region"`
	Provider string `json:"provider"`
	Slug     string `json:"slug"`
}

Datacenter structure

type DatacentersResponse

type DatacentersResponse struct {
	Embedded struct {
		Datacenters []Datacenter `json:"datacenters"`
	} `json:"_embedded"`
}

DatacentersResponse structure (an array of Datacenter)

type Deployment

type Deployment struct {
	Errors struct {
		Error string `json:"error,omitempty"`
	} `json:"errors,omitempty"`
	ID                  string            `json:"id"`
	Name                string            `json:"name"`
	Type                string            `json:"type"`
	CreatedAt           time.Time         `json:"created_at"`
	ProvisionRecipeID   string            `json:"provision_recipe_id"`
	CACertificateBase64 string            `json:"ca_certificate_base64"`
	Connection          ConnectionStrings `json:"connection_strings"`
	Links               struct {
		ComposeWebUILink Link `json:"compose_web_ui"`
	} `json:"_links"`
}

Deployment structure

func CreateDeployment

func CreateDeployment(params CreateDeploymentParams) (*Deployment, []error)

CreateDeployment creates a deployment

type DeploymentsResponse

type DeploymentsResponse struct {
	Embedded struct {
		Deployments []Deployment `json:"deployments"`
	} `json:"_embedded"`
}

DeploymentsResponse holding structure

type Link struct {
	HREF      string `json:"href"`
	Templated bool   `json:"templated"`
}

Link structure for JSON+HAL links

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"`
	Embedded     struct {
		Recipes []Recipe `json:"recipes"`
	} `json:"_embedded"`
}

Recipe structure

func GetRecipe

func GetRecipe(rawmode bool, recipeid string) (*Recipe, []error)

GetRecipe gets status of Recipe

type Recipes

type Recipes struct {
	Embedded struct {
		Recipes []Recipe `json:"recipes"`
	} `json:"_embedded"`
}

Recipes structure (an array of Recipe)

type User

type User struct {
	ID string `json:"id"`
}

User structure

func GetUser

func GetUser() (*User, []error)

GetUser Gets information about user

type Version

type Version struct {
	Application string `json:"application"`
	Status      string `json:"status"`
	Preferred   bool   `json:"preferred"`
	Version     string `json:"version"`
}

Version structure

type VersionTransition

type VersionTransition struct {
	Application string `json:"application"`
	Method      string `json:"method"`
	FromVersion string `json:"from_version"`
	ToVersion   string `json:"to_version"`
}

VersionTransition a struct wrapper for version transition information

type VersionsResponse

type VersionsResponse struct {
	Embedded struct {
		VersionTransitions []VersionTransition `json:"transitions"`
	} `json:"_embedded"`
}

VersionsResponse Version holding structure

Jump to

Keyboard shortcuts

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