Documentation ¶
Index ¶
- Constants
- type Client
- func (c *Client) ClusterByName(orgID string, clusterName string) (*types.Cluster, error)
- func (c *Client) ClustersByOrgID(orgID string) (types.ClusterList, error)
- func (c *Client) DeleteClusterByClusterID(orgID, clusterID string) (*DeleteClustersResponseDataDetails, error)
- func (c *Client) RegisterCluster(orgID string, registration types.Registration) (*RegisterClusterResponseDataDetails, error)
- type ClusterByNameResponse
- type ClusterByNameResponseData
- type ClusterByNameVariables
- type ClusterService
- type ClustersByOrgIDResponse
- type ClustersByOrgIDResponseData
- type ClustersByOrgIDVariables
- type DeleteClusterByClusterIDVariables
- type DeleteClustersResponse
- type DeleteClustersResponseData
- type DeleteClustersResponseDataDetails
- type RegisterClusterResponse
- type RegisterClusterResponseData
- type RegisterClusterResponseDataDetails
- type RegisterClusterVariables
Constants ¶
const ( QueryClusterByName = "clusterByName" ClusterByNameVarTemplate = `{{define "vars"}}"orgId":{{json .OrgID}},"clusterName":{{json .ClusterName}}{{end}}` )
const ( QueryClustersByOrgID = "clustersByOrgId" ClustersByOrgIDVarTemplate = `{{define "vars"}}"orgId":{{json .OrgID}}{{end}}` )
const ( QueryDeleteClusterByClusterID = "deleteClusterByClusterId" DeleteClusterByClusterIDVarTemplate = `{{define "vars"}}"orgId":{{json .OrgID}},"clusterId":{{json .ClusterID}}{{end}}` )
const ( QueryRegisterCluster = "registerCluster" RegisterClusterVarTemplate = `{{define "vars"}}"orgId":{{json .OrgID}},"registration":{{printf "%s" .Registration}}{{end}}` )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
web.SatConClient
}
Client is an implementation of a satcon client.
func (*Client) ClusterByName ¶
func (*Client) ClustersByOrgID ¶
func (c *Client) ClustersByOrgID(orgID string) (types.ClusterList, error)
func (*Client) DeleteClusterByClusterID ¶
func (c *Client) DeleteClusterByClusterID(orgID, clusterID string) (*DeleteClustersResponseDataDetails, error)
func (*Client) RegisterCluster ¶
func (c *Client) RegisterCluster(orgID string, registration types.Registration) (*RegisterClusterResponseDataDetails, error)
type ClusterByNameResponse ¶
type ClusterByNameResponse struct {
Data *ClusterByNameResponseData `json:"data,omitempty"`
}
type ClusterByNameVariables ¶
type ClusterByNameVariables struct { actions.GraphQLQuery OrgID string ClusterName string }
func NewClusterByNameVariables ¶
func NewClusterByNameVariables(orgID string, clusterName string) ClusterByNameVariables
type ClusterService ¶
type ClusterService interface { // RegisterCluster registers a new cluster under the specified organization ID. RegisterCluster(orgID string, registration types.Registration) (*RegisterClusterResponseDataDetails, error) // ClustersByOrgID lists the clusters registered under the specified organization. ClustersByOrgID(orgID string) (types.ClusterList, error) // ClusterByName returns the cluster registered under the specified organization and name. ClusterByName(orgID string, clusterName string) (*types.Cluster, error) // DeleteClusterByClusterID deletes the specified cluster from the specified org, // including all resources under that cluster. DeleteClusterByClusterID(orgID string, clusterID string) (*DeleteClustersResponseDataDetails, error) }
ClusterService is the interface used to perform all cluster-centric actions in Satellite Config.
func NewClient ¶
func NewClient(endpointURL string, httpClient web.HTTPClient, authClient auth.AuthClient) (ClusterService, error)
NewClient returns a configured instance of ClusterService which can then be used to perform cluster queries against Satellite Config.
type ClustersByOrgIDResponse ¶
type ClustersByOrgIDResponse struct {
Data *ClustersByOrgIDResponseData `json:"data,omitempty"`
}
type ClustersByOrgIDResponseData ¶
type ClustersByOrgIDResponseData struct {
Clusters types.ClusterList `json:"clustersByOrgId,omitempty"`
}
type ClustersByOrgIDVariables ¶
type ClustersByOrgIDVariables struct { actions.GraphQLQuery OrgID string }
func NewClustersByOrgIDVariables ¶
func NewClustersByOrgIDVariables(orgID string) ClustersByOrgIDVariables
type DeleteClusterByClusterIDVariables ¶
type DeleteClusterByClusterIDVariables struct { actions.GraphQLQuery OrgID string ClusterID string }
func NewDeleteClusterByClusterIDVariables ¶
func NewDeleteClusterByClusterIDVariables(orgID, clusterID string) DeleteClusterByClusterIDVariables
type DeleteClustersResponse ¶
type DeleteClustersResponse struct {
Data *DeleteClustersResponseData `json:"data,omitempty"`
}
type DeleteClustersResponseData ¶
type DeleteClustersResponseData struct {
Details *DeleteClustersResponseDataDetails `json:"deleteClusterByClusterId,omitempty"`
}
type RegisterClusterResponse ¶
type RegisterClusterResponse struct {
Data *RegisterClusterResponseData `json:"data,omitempty"`
}
RegisterClusterResponse is the response body we get upon a successful cluster registration.
type RegisterClusterResponseData ¶
type RegisterClusterResponseData struct {
Details *RegisterClusterResponseDataDetails `json:"registerCluster,omitempty"`
}
type RegisterClusterResponseDataDetails ¶
type RegisterClusterResponseDataDetails struct { URL string `json:"url,omitempty"` OrgID string `json:"orgId,omitempty"` OrgKey string `json:"orgKey,omitempty"` ClusterID string `json:"clusterId,omitempty"` RegState string `json:"regState,omitempty"` Registration types.Registration }
func (RegisterClusterResponseDataDetails) String ¶
func (d RegisterClusterResponseDataDetails) String() string
type RegisterClusterVariables ¶
type RegisterClusterVariables struct { actions.GraphQLQuery OrgID string Registration []byte }
RegisterClusterVariables are the variables specific to cluster registration. These include the organization ID and the serialized registration. Rather than instantiating this directly, use NewRegisterClusterVariables().
func NewRegisterClusterVariables ¶
func NewRegisterClusterVariables(orgID string, registration types.Registration) RegisterClusterVariables
NewRegisterClusterVariables creates a correctly formed instance of RegisterClusterVariables.