Documentation ¶
Index ¶
- type Client
- func (c *Client) CreateCluster(newCluster Cluster) (model.Cluster, error)
- func (c *Client) DeleteCluster(clusterID string) (model.Cluster, error)
- func (c *Client) GetCluster(clusterID string) (model.Cluster, error)
- func (c *Client) ListClusters(query map[string]string) ([]model.Cluster, error)
- func (c *Client) UpdateCluster(clusterID string, active bool) (model.Cluster, error)
- type Cluster
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
Client is a struct containing information for an api client.
func ClientFromConfig ¶
ClientFromConfig creates a new Client with its own http.Client using the config file provided and a new token generator that uses AWS's stsAPI.
func (*Client) CreateCluster ¶
CreateCluster sends a POST request to the clusters endpoint of the Pharos API and returns the Cluster that was created.
func (*Client) DeleteCluster ¶
DeleteCluster sends a DELETE request to the clusters endpoint of the Pharos API and returns a Cluster containing the deleted cluster.
func (*Client) GetCluster ¶
GetCluster sends a GET request to the clusters/id endpoint of the Pharos API and returns a Cluster.
func (*Client) ListClusters ¶
ListClusters sends a GET request to the clusters endpoint of the Pharos API and returns an array of Clusters. Can also be called with query to retrieve a certain subset of clusters.