Documentation
¶
Index ¶
- type AWSCluster
- type AccessToken
- type AllClusterGroups
- type AllProvisioners
- type AllWorkspaces
- type AwsAccessKey
- type AwsCredential
- type AwsCredentialKey
- type AwsNodePool
- type AwsNodeSpec
- type Client
- func (c *Client) CreateAwsAccountCredential(cred *TmcAwsAccountCredential) (*TmcAwsAccountCredential, error)
- func (c *Client) CreateAwsCredential(cred *TmcAwsCredential) (*TmcAwsCredential, error)
- func (c *Client) CreateCluster(name string, managementClusterName string, provisionerName string, ...) (*Cluster, error)
- func (c *Client) CreateClusterBackup(clusterName string, backup *TmcClusterBackup) (*TmcClusterBackup, error)
- func (c *Client) CreateClusterGroup(name string, description string, labels map[string]interface{}) (*ClusterGroup, error)
- func (c *Client) CreateMgmtCluster(name string, defaultCg string, k8sProviderType string, description string, ...) (*ManagementCluster, error)
- func (c *Client) CreateNamespace(name string, opts NamespaceOpts) (*Namespace, error)
- func (c *Client) CreateNodePool(name string, managementClusterName string, provisionerName string, ...) (*NodePool, error)
- func (c *Client) CreateObservabilityCredential(cred *TmcObservabilityCredential) (*TmcObservabilityCredential, error)
- func (c *Client) CreateProvisioner(mgmtClusterName string, name string, labels map[string]interface{}) (*Provisioner, error)
- func (c *Client) CreateVsphereCluster(name string, managementClusterName string, provisionerName string, ...) (*VsphereCluster, error)
- func (c *Client) CreateWorkspace(name string, description string, labels map[string]interface{}) (*Workspace, error)
- func (c *Client) DeleteAwsAccountCredential(name string, mgmtClusterName string) error
- func (c *Client) DeleteAwsCredential(name string) error
- func (c *Client) DeleteCluster(name string, managementClusterName string, provisionerName string) error
- func (c *Client) DeleteClusterBackup(name string, mgmt_cluster_name string, cluster_name string, ...) error
- func (c *Client) DeleteClusterGroup(name string) error
- func (c *Client) DeleteMgmtCluster(name string) error
- func (c *Client) DeleteNamespace(name string, clusterName string, managementClusterName string, ...) error
- func (c *Client) DeleteNodePool(name string, clusterName string, managementClusterName string, ...) error
- func (c *Client) DeleteObservabilityCredential(name string) error
- func (c *Client) DeleteProvisioner(mgmtClusterName, name string) error
- func (c *Client) DeleteVsphereCluster(name string, managementClusterName string, provisionerName string) error
- func (c *Client) DeleteWorkspace(name string) error
- func (c *Client) DescribeCluster(fullName string, managementClusterName string, provisionerName string) (*Status, error)
- func (c *Client) DescribeNodePool(name string, clusterName string, managementClusterName string, ...) (*Status, error)
- func (c *Client) GetAllClusterGroups(labels map[string]interface{}) (*[]ClusterGroup, error)
- func (c *Client) GetAllProvisioners(mgmtClusterName string, labels map[string]interface{}) ([]Provisioner, error)
- func (c *Client) GetAllWorkspaces(labels map[string]interface{}) ([]Workspace, error)
- func (c *Client) GetAwsAccountCredential(name string, mgmtClusterName string) (*TmcAwsAccountCredential, error)
- func (c *Client) GetAwsCredential(name string) (*TmcAwsCredential, error)
- func (c *Client) GetCluster(fullName string, managementClusterName string, provisionerName string) (*Cluster, error)
- func (c *Client) GetClusterBackup(name string, mgmt_cluster_name string, cluster_name string, ...) (*TmcClusterBackup, error)
- func (c *Client) GetClusterGroup(name string) (*ClusterGroup, error)
- func (c *Client) GetMgmtCluster(name string) (*ManagementCluster, error)
- func (c *Client) GetNamespace(name string, clusterName string, managementClusterName string, ...) (*Namespace, error)
- func (c *Client) GetNodePool(name string, clusterName string, managementClusterName string, ...) (*NodePool, error)
- func (c *Client) GetObservabilityCredential(name string) (*TmcObservabilityCredential, error)
- func (c *Client) GetProvisioner(mgmtClusterName, name string) (*Provisioner, error)
- func (c *Client) GetVsphereCluster(fullName string, managementClusterName string, provisionerName string) (*VsphereCluster, error)
- func (c *Client) GetWorkspace(name string) (*Workspace, error)
- func (c *Client) UpdateCluster(name string, managementClusterName string, provisionerName string, ...) (*Cluster, error)
- func (c *Client) UpdateClusterGroup(name string, description string, labels map[string]interface{}) (*ClusterGroup, error)
- func (c *Client) UpdateNodePool(name string, managementClusterName string, provisionerName string, ...) (*NodePool, error)
- func (c *Client) UpdateObservabilityCredential(cred *TmcObservabilityCredential) (*TmcObservabilityCredential, error)
- func (c *Client) UpdateProvisioner(mgmtClusterName string, name string, labels map[string]interface{}) (*Provisioner, error)
- func (c *Client) UpdateWorkspace(name string, description string, labels map[string]interface{}) (*Workspace, error)
- type Cluster
- type ClusterBackupSpec
- type ClusterGroup
- type ClusterGroupJsonObject
- type ClusterJSONObject
- type ClusterOpts
- type ClusterResourceFullName
- type ClusterSpec
- type CredentialData
- type CredentialMetaData
- type CredentialSpec
- type FullName
- type IamRole
- type LabelSelector
- type ManagementCluster
- type MatchExpressions
- type MetaData
- type MgmtClusterJsonObject
- type MgmtClusterSpec
- type Namespace
- type NamespaceJsonObject
- type NamespaceOpts
- type NamespaceSpec
- type Network
- type NodeName
- type NodePool
- type NodePoolJsonObject
- type ObservabilityCredentialData
- type ObservabilityCredentialSpec
- type ObservabilityKey
- type Provisioner
- type ProvisionerResponse
- type Status
- type Subnet
- type TmcAwsAccountCredential
- type TmcAwsAccountCredentialResponse
- type TmcAwsCredential
- type TmcAwsCredentialResponse
- type TmcClusterBackup
- type TmcClusterBackupResponse
- type TmcObservabilityCredential
- type TmcObservabilityCredentialResponse
- type Volume
- type VpshereNodepoolOpts
- type Vsphere
- type VsphereCluster
- type VsphereControlPlane
- type VsphereJsonObject
- type VsphereNodeSpec
- type VsphereNodepool
- type VsphereOpts
- type VsphereSpec
- type WaveFrontData
- type Workspace
- type WorkspaceResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AWSCluster ¶ added in v0.3.0
type AWSCluster struct {
Distribution struct {
ProvisionerCredentialName string `json:"provisionerCredentialName"`
Region string `json:"region"`
Version string `json:"version"`
} `json:"distribution"`
Settings struct {
Network Network `json:"network"`
Security struct {
SshKey string `json:"sshKey"`
} `json:"security"`
} `json:"settings"`
Topology struct {
ControlPlane struct {
AvailabilityZones []string `json:"availabilityZones"`
HighAvailability bool `json:"highAvailability,omitempty"`
InstanceType string `json:"instanceType"`
} `json:"controlPlane"`
} `json:"topology"`
}
type AccessToken ¶
type AllClusterGroups ¶
type AllClusterGroups struct {
ClusterGroups []ClusterGroup `json:"clusterGroups"`
}
type AllProvisioners ¶ added in v0.2.0
type AllProvisioners struct {
Provisioners []Provisioner `json:"provisioners"`
}
type AllWorkspaces ¶
type AllWorkspaces struct {
Workspaces []Workspace `json:"workspaces"`
}
type AwsAccessKey ¶ added in v0.2.0
type AwsCredential ¶ added in v0.2.0
type AwsCredentialKey ¶ added in v0.2.0
type AwsCredentialKey struct {
Type string `json:"type"`
Data *AwsAccessKey `json:"data"`
}
type AwsNodePool ¶ added in v0.3.0
type AwsNodePool struct {
NodeLabels map[string]interface{} `json:"cloudLabels,omitempty"`
CloudLabels map[string]interface{} `json:"nodeLabels,omitempty"`
WorkerNodeCount string `json:"workerNodeCount"`
NodeTkgAws AwsNodeSpec `json:"tkgAws"`
}
type AwsNodeSpec ¶ added in v0.3.0
type Client ¶
type Client struct {
AcceptLanguage string
// contains filtered or unexported fields
}
Client is a client for working with the TMC Web API. It is created by `NewClient`.
func (*Client) CreateAwsAccountCredential ¶ added in v0.2.0
func (c *Client) CreateAwsAccountCredential(cred *TmcAwsAccountCredential) (*TmcAwsAccountCredential, error)
func (*Client) CreateAwsCredential ¶ added in v0.2.0
func (c *Client) CreateAwsCredential(cred *TmcAwsCredential) (*TmcAwsCredential, error)
func (*Client) CreateCluster ¶ added in v0.3.0
func (*Client) CreateClusterBackup ¶ added in v0.3.0
func (c *Client) CreateClusterBackup(clusterName string, backup *TmcClusterBackup) (*TmcClusterBackup, error)
func (*Client) CreateClusterGroup ¶
func (c *Client) CreateClusterGroup(name string, description string, labels map[string]interface{}) (*ClusterGroup, error)
Create a new Cluster Group with a given name. Also accepts a description for the Cluster Group and a set of labels to be added to the Cluster Group
func (*Client) CreateMgmtCluster ¶ added in v0.4.0
func (*Client) CreateNamespace ¶ added in v0.4.0
func (c *Client) CreateNamespace(name string, opts NamespaceOpts) (*Namespace, error)
func (*Client) CreateNodePool ¶ added in v0.3.0
func (*Client) CreateObservabilityCredential ¶ added in v0.2.0
func (c *Client) CreateObservabilityCredential(cred *TmcObservabilityCredential) (*TmcObservabilityCredential, error)
func (*Client) CreateProvisioner ¶ added in v0.2.0
func (*Client) CreateVsphereCluster ¶ added in v0.4.0
func (c *Client) CreateVsphereCluster(name string, managementClusterName string, provisionerName string, cluster_group string, description string, labels map[string]interface{}, opts *VsphereOpts) (*VsphereCluster, error)
func (*Client) CreateWorkspace ¶
func (*Client) DeleteAwsAccountCredential ¶ added in v0.2.0
Deletes an already existing AWS Data protection credential account with a given name.
func (*Client) DeleteAwsCredential ¶ added in v0.2.0
Deletes an already existing AWS Data protection credential account with a given name.
func (*Client) DeleteCluster ¶ added in v0.3.0
func (*Client) DeleteClusterBackup ¶ added in v0.3.0
func (*Client) DeleteClusterGroup ¶
Deletes an already existing Cluster Group with a given name.
func (*Client) DeleteMgmtCluster ¶ added in v0.4.0
func (*Client) DeleteNamespace ¶ added in v0.4.0
func (*Client) DeleteNodePool ¶ added in v0.3.0
func (*Client) DeleteObservabilityCredential ¶ added in v0.2.0
Deletes an already existing Tanzu Observability credential with a given name.
func (*Client) DeleteProvisioner ¶ added in v0.2.0
func (*Client) DeleteVsphereCluster ¶ added in v0.4.0
func (*Client) DeleteWorkspace ¶
func (*Client) DescribeCluster ¶ added in v0.3.0
func (*Client) DescribeNodePool ¶ added in v0.3.0
func (*Client) GetAllClusterGroups ¶
func (c *Client) GetAllClusterGroups(labels map[string]interface{}) (*[]ClusterGroup, error)
func (*Client) GetAllProvisioners ¶ added in v0.2.0
func (c *Client) GetAllProvisioners(mgmtClusterName string, labels map[string]interface{}) ([]Provisioner, error)
func (*Client) GetAllWorkspaces ¶
func (*Client) GetAwsAccountCredential ¶ added in v0.2.0
func (c *Client) GetAwsAccountCredential(name string, mgmtClusterName string) (*TmcAwsAccountCredential, error)
func (*Client) GetAwsCredential ¶ added in v0.2.0
func (c *Client) GetAwsCredential(name string) (*TmcAwsCredential, error)
func (*Client) GetCluster ¶ added in v0.3.0
func (*Client) GetClusterBackup ¶ added in v0.3.0
func (*Client) GetClusterGroup ¶
func (c *Client) GetClusterGroup(name string) (*ClusterGroup, error)
Fetch Details about an existing Cluster Group using its name
func (*Client) GetMgmtCluster ¶ added in v0.4.0
func (c *Client) GetMgmtCluster(name string) (*ManagementCluster, error)
func (*Client) GetNamespace ¶ added in v0.4.0
func (*Client) GetNodePool ¶ added in v0.3.0
func (*Client) GetObservabilityCredential ¶ added in v0.2.0
func (c *Client) GetObservabilityCredential(name string) (*TmcObservabilityCredential, error)
func (*Client) GetProvisioner ¶ added in v0.2.0
func (c *Client) GetProvisioner(mgmtClusterName, name string) (*Provisioner, error)
func (*Client) GetVsphereCluster ¶ added in v0.4.0
func (*Client) UpdateCluster ¶ added in v0.3.0
func (*Client) UpdateClusterGroup ¶
func (c *Client) UpdateClusterGroup(name string, description string, labels map[string]interface{}) (*ClusterGroup, error)
Updates the Cluster Group using its name. Only the description and labels can be updated. Changing the Name forces replacement
func (*Client) UpdateNodePool ¶ added in v0.3.0
func (*Client) UpdateObservabilityCredential ¶ added in v0.2.0
func (c *Client) UpdateObservabilityCredential(cred *TmcObservabilityCredential) (*TmcObservabilityCredential, error)
func (*Client) UpdateProvisioner ¶ added in v0.2.0
type Cluster ¶ added in v0.3.0
type Cluster struct {
FullName *FullName `json:"fullName"`
Meta *MetaData `json:"meta"`
Spec *ClusterSpec `json:"spec"`
Status *Status `json:"status"`
}
type ClusterBackupSpec ¶ added in v0.3.0
type ClusterBackupSpec struct {
IncludedNamespaces []string `json:"includedNamespaces,omitempty"`
ExcludedNamespaces []string `json:"excludedNamespaces,omitempty"`
IncludedResources []string `json:"includedResources,omitempty"`
ExcludedResources []string `json:"excludedResources,omitempty"`
SnapshotVolumes bool `json:"snapshotVolumes"`
TTL string `json:"ttl"`
LabelSelector *LabelSelector `json:"labelSelector,omitempty"`
IncludeClusterResources bool `json:"includeClusterResources"`
StorageLocation string `json:"storageLocation"`
VolumeSnapshotLocations []string `json:"volumeSnapshotLocations"`
}
type ClusterGroup ¶
type ClusterGroupJsonObject ¶
type ClusterGroupJsonObject struct {
ClusterGroup ClusterGroup `json:"clusterGroup"`
}
type ClusterJSONObject ¶ added in v0.3.0
type ClusterJSONObject struct {
Cluster Cluster `json:"cluster"`
}
type ClusterOpts ¶ added in v0.3.0
type ClusterOpts struct {
Region string
Version string
CredentialName string
ControlPlaneSpec map[string]interface{}
PodCidrBlock string
ServiceCidrBlock string
SshKey string
}
Options interface for passing arguments to the functions neccessary to perform on the Cluster
type ClusterResourceFullName ¶ added in v0.2.0
type ClusterResourceFullName struct {
FullName
Provisioner `json:"provisionerName"`
}
type ClusterSpec ¶ added in v0.3.0
type ClusterSpec struct {
ClusterGroupName string `json:"clusterGroupName"`
TkgAws AWSCluster `json:"tkgAws,omitempty"`
}
type CredentialData ¶ added in v0.2.0
type CredentialData struct {
AwsCredential *AwsCredential `json:"awsCredential"`
KeyValue *AwsCredentialKey `json:"keyValue,omitempty"`
}
type CredentialMetaData ¶ added in v0.2.0
type CredentialMetaData struct {
Provider string `json:"provider,omitempty"`
}
type CredentialSpec ¶ added in v0.2.0
type CredentialSpec struct {
MetaData *CredentialMetaData `json:"meta"`
Capability string `json:"capability"`
Data *CredentialData `json:"data"`
}
type LabelSelector ¶ added in v0.3.0
type LabelSelector struct {
MatchLabels map[string]interface{} `json:"matchLabels,omitempty"`
MatchExpressions []MatchExpressions `json:"matchExpressions,omitempty"`
}
type ManagementCluster ¶ added in v0.4.0
type ManagementCluster struct {
FullName *FullName `json:"fullName"`
Meta *MetaData `json:"meta"`
Spec *MgmtClusterSpec `json:"spec"`
Status struct {
RegistrationURL string `json:"registrationUrl,omitempty"`
}
}
type MatchExpressions ¶ added in v0.3.0
type MgmtClusterJsonObject ¶ added in v0.4.0
type MgmtClusterJsonObject struct {
MgmtCluster ManagementCluster `json:"managementCluster"`
}
type MgmtClusterSpec ¶ added in v0.4.0
type Namespace ¶ added in v0.4.0
type Namespace struct {
FullName *FullName `json:"fullName"`
Meta *MetaData `json:"meta"`
Spec *NamespaceSpec `json:"spec"`
}
type NamespaceJsonObject ¶ added in v0.4.0
type NamespaceJsonObject struct {
Namespace Namespace `json:"namespace"`
}
type NamespaceOpts ¶ added in v0.4.0
type NamespaceSpec ¶ added in v0.4.0
type NamespaceSpec struct {
WorkspaceName string `json:"workspaceName"`
}
type Network ¶ added in v0.3.0
type Network struct {
ClusterNetwork struct {
Pods []struct {
CidrBlocks string `json:"cidrBlocks"`
} `json:"pods"`
Services []struct {
CidrBlocks string `json:"cidrBlocks"`
} `json:"services"`
} `json:"cluster"`
Provider struct {
Vpc struct {
Id string `json:"id,omitempty"`
CidrBlock string `json:"cidrBlock"`
} `json:"vpc"`
Subnets []Subnet `json:"subnets"`
} `json:"provider"`
}
type NodePool ¶ added in v0.3.0
type NodePool struct {
FullName *NodeName `json:"fullName"`
Meta *MetaData `json:"meta"`
Spec *AwsNodePool `json:"spec"`
Status *Status `json:"status"`
}
type NodePoolJsonObject ¶ added in v0.3.0
type NodePoolJsonObject struct {
NodePool NodePool `json:"nodepool"`
}
type ObservabilityCredentialData ¶ added in v0.2.0
type ObservabilityCredentialData struct {
KeyValue ObservabilityKey `json:"keyValue"`
}
type ObservabilityCredentialSpec ¶ added in v0.2.0
type ObservabilityCredentialSpec struct {
Capability string `json:"capability"`
Data ObservabilityCredentialData `json:"data"`
}
type ObservabilityKey ¶ added in v0.2.0
type ObservabilityKey struct {
Data WaveFrontData `json:"data,omitempty"`
}
type Provisioner ¶ added in v0.2.0
type ProvisionerResponse ¶ added in v0.2.0
type ProvisionerResponse struct {
Provisioner Provisioner `json:"provisioner"`
}
type TmcAwsAccountCredential ¶ added in v0.2.0
type TmcAwsAccountCredential struct {
FullName *ClusterResourceFullName `json:"fullName"`
Meta *MetaData `json:"meta"`
Spec *CredentialSpec `json:"spec"`
Status struct {
Phase string `json:"phase,omitempty"`
} `json:"status,omitempty"`
}
type TmcAwsAccountCredentialResponse ¶ added in v0.2.0
type TmcAwsAccountCredentialResponse struct {
TmcAwsAccountCredential TmcAwsAccountCredential `json:"credential"`
}
type TmcAwsCredential ¶ added in v0.2.0
type TmcAwsCredential struct {
FullName *FullName `json:"fullName"`
Meta *MetaData `json:"meta"`
Spec *CredentialSpec `json:"spec"`
Status struct {
Phase string `json:"phase,omitempty"`
} `json:"status,omitempty"`
}
type TmcAwsCredentialResponse ¶ added in v0.2.0
type TmcAwsCredentialResponse struct {
TmcAwsCredential TmcAwsCredential `json:"credential"`
}
type TmcClusterBackup ¶ added in v0.3.0
type TmcClusterBackup struct {
FullName *FullName `json:"fullName"`
Meta *MetaData `json:"meta"`
Status *Status `json:"status"`
Spec *ClusterBackupSpec `json:"spec"`
}
type TmcClusterBackupResponse ¶ added in v0.3.0
type TmcClusterBackupResponse struct {
Backup TmcClusterBackup `json:"backup"`
}
type TmcObservabilityCredential ¶ added in v0.2.0
type TmcObservabilityCredential struct {
FullName *FullName `json:"fullName"`
Meta *MetaData `json:"meta"`
Spec *ObservabilityCredentialSpec `json:"spec"`
Status struct {
Phase string `json:"phase,omitempty"`
} `json:"status,omitempty"`
}
type TmcObservabilityCredentialResponse ¶ added in v0.2.0
type TmcObservabilityCredentialResponse struct {
TmcObservabilityCredential TmcObservabilityCredential `json:"credential"`
}
type VpshereNodepoolOpts ¶ added in v0.4.0
type Vsphere ¶ added in v0.4.0
type Vsphere struct {
Settings struct {
Network struct {
Pods struct {
CidrBlocks []string `json:"cidrBlocks"`
} `json:"pods"`
Services struct {
CidrBlocks []string `json:"cidrBlocks"`
} `json:"services"`
} `json:"network"`
} `json:"settings"`
Distribution struct {
Version string `json:"version"`
} `json:"distribution"`
Topology struct {
ControlPlane VsphereControlPlane `json:"controlPlane"`
NodePools []VsphereNodepool `json:"nodePools"`
} `json:"topology"`
}
type VsphereCluster ¶ added in v0.4.0
type VsphereCluster struct {
FullName *FullName `json:"fullName"`
Meta *MetaData `json:"meta"`
Spec *VsphereSpec `json:"spec"`
}
type VsphereControlPlane ¶ added in v0.4.0
type VsphereJsonObject ¶ added in v0.4.0
type VsphereJsonObject struct {
Cluster VsphereCluster `json:"cluster"`
}
type VsphereNodeSpec ¶ added in v0.4.0
type VsphereNodeSpec struct {
NodeCount string `json:"workerNodeCount"`
NodeSpec VsphereControlPlane `json:"tkgServiceVsphere"`
}
type VsphereNodepool ¶ added in v0.4.0
type VsphereNodepool struct {
Spec VsphereNodeSpec `json:"spec"`
Info struct {
Name string `json:"name"`
} `json:"info"`
}
type VsphereOpts ¶ added in v0.4.0
type VsphereSpec ¶ added in v0.4.0
type WaveFrontData ¶ added in v0.2.0
type WaveFrontData struct {
Token string `json:"wavefront.token"`
}
type WorkspaceResponse ¶
type WorkspaceResponse struct {
Workspace Workspace `json:"workspace"`
}