Documentation ¶
Index ¶
- Constants
- type AuthResponse
- type AuthStruct
- type Bundle
- type BundleSearch
- type Client
- func (c *Client) ClusterAction(cluster ClusterSearch, actionName string, wait bool) error
- func (c *Client) CreateCluster(cluster Cluster) (*Cluster, error)
- func (c *Client) CreateHost(host Host) (*Host, error)
- func (c *Client) CreateProvider(provider Provider) (*Provider, error)
- func (c *Client) DeleteBundle(searchOpts BundleSearch) error
- func (c *Client) DeleteCluster(cluster ClusterSearch) error
- func (c *Client) DeleteHost(host HostSearch) error
- func (c *Client) DeleteProvider(provider ProviderSearch) error
- func (c *Client) GetBundle(searchOpts BundleSearch) (*Bundle, error)
- func (c *Client) GetBundles() ([]Bundle, error)
- func (c *Client) GetCluster(searchOpts ClusterSearch) (*Cluster, error)
- func (c *Client) GetClusters() ([]Cluster, error)
- func (c *Client) GetHost(searchOpts HostSearch) (*Host, error)
- func (c *Client) GetHosts() ([]Host, error)
- func (c *Client) GetProvider(searchOpts ProviderSearch) (*Provider, error)
- func (c *Client) GetProviders() ([]Provider, error)
- func (c *Client) SignIn() (*AuthResponse, error)
- func (c *Client) UploadBundle(url string) (*Bundle, error)
- type Cluster
- type ClusterConfigResponse
- type ClusterResponse
- type ClusterSearch
- type Component
- type Host
- type HostConfigResponse
- type HostResponse
- type HostSearch
- type Identifier
- type Provider
- type ProviderConfigResponse
- type ProviderSearch
- type ServiceConfigResponse
- type TaskResponse
Constants ¶
View Source
const HostURL string = "http://localhost:8000"
HostURL - Default ADCM URL
View Source
const MaxPostSize = 10 * 1024 * 1024
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthResponse ¶
type AuthResponse struct { UserID int `json:"user_id"` Username string `json:"username"` Token string `json:"token"` }
AuthResponse -
type AuthStruct ¶
AuthStruct -
type Bundle ¶
type Bundle struct {
BundleSearch
}
type BundleSearch ¶
type Client ¶
type Client struct { HostURL string HTTPClient *http.Client Token string Auth AuthStruct }
Client -
func (*Client) ClusterAction ¶
func (c *Client) ClusterAction(cluster ClusterSearch, actionName string, wait bool) error
ClusterAction - run action on cluster
func (*Client) CreateCluster ¶
CreateCluster - create cluster
func (*Client) CreateHost ¶
CreateHost - create host
func (*Client) CreateProvider ¶
CreateProvider - create provider
func (*Client) DeleteBundle ¶
func (c *Client) DeleteBundle(searchOpts BundleSearch) error
DeleteBundle - Delete bundle
func (*Client) DeleteCluster ¶
func (c *Client) DeleteCluster(cluster ClusterSearch) error
DeleteCluster - delete cluster
func (*Client) DeleteHost ¶
func (c *Client) DeleteHost(host HostSearch) error
DeleteHost - create host
func (*Client) DeleteProvider ¶
func (c *Client) DeleteProvider(provider ProviderSearch) error
DeleteProvider - create host
func (*Client) GetBundle ¶
func (c *Client) GetBundle(searchOpts BundleSearch) (*Bundle, error)
GetBundle - Returns bundle
func (*Client) GetBundles ¶
GetBundles - Returns list of bundles
func (*Client) GetCluster ¶
func (c *Client) GetCluster(searchOpts ClusterSearch) (*Cluster, error)
GetCluster - get cluster
func (*Client) GetClusters ¶
GetClusters - list clusters
func (*Client) GetHost ¶
func (c *Client) GetHost(searchOpts HostSearch) (*Host, error)
GetHost - get host
func (*Client) GetProvider ¶
func (c *Client) GetProvider(searchOpts ProviderSearch) (*Provider, error)
GetProvider - Returns provider
func (*Client) GetProviders ¶
GetProviders - Returns list of providers
func (*Client) SignIn ¶
func (c *Client) SignIn() (*AuthResponse, error)
SignIn - Get a new token for user
type Cluster ¶
type Cluster struct { ClusterResponse ServicesConfig ServiceConfigResponse ClusterConfig ClusterConfigResponse HCMap map[string][]map[string][]string `json:"hc_map"` State string `json:"state"` }
type ClusterConfigResponse ¶
type ClusterConfigResponse struct {
Config map[string]interface{} `json:"config"`
}
type ClusterResponse ¶
type ClusterResponse struct {
ClusterSearch
}
type ClusterSearch ¶
type ClusterSearch struct { Identifier Name string `json:"name"` Description string `json:"description"` BundleID int64 `json:"bundle_id"` }
type Component ¶
type Component struct { Identifier Name string `json:"name"` }
type Host ¶
type Host struct { HostResponse HostConfigResponse }
type HostConfigResponse ¶
type HostConfigResponse struct {
Config map[string]interface{} `json:"config"`
}
type HostResponse ¶
type HostResponse struct {
HostSearch
}
type HostSearch ¶
type HostSearch struct { Identifier FQDN string `json:"fqdn"` Description string `json:"description"` ProviderID int64 `json:"provider_id"` ClusterID int64 `json:"cluster_id"` }
type Identifier ¶
type Identifier struct {
ID int64 `json:"id"`
}
type Provider ¶
type Provider struct { ProviderSearch ProviderConfig ProviderConfigResponse }
type ProviderConfigResponse ¶
type ProviderConfigResponse struct {
Config map[string]interface{} `json:"config"`
}
type ProviderSearch ¶
type ProviderSearch struct { Identifier Name string `json:"name"` BundleID int64 `json:"bundle_id"` Description string `json:"description"` State string `json:"state"` }
type ServiceConfigResponse ¶
type TaskResponse ¶
type TaskResponse struct { Identifier Status string `json:"status"` }
Click to show internal directories.
Click to hide internal directories.