Documentation ¶
Index ¶
- type MasterClient
- func (mc *MasterClient) GetClusterID(clusterName string) (string, error)
- func (mc *MasterClient) GetClusterName(clusterID string) (string, error)
- func (mc *MasterClient) GetProjectRoleTemplateID(roleName string) (string, error)
- func (mc *MasterClient) NewClusterClient(clusterName string, clusterID string) (*clusterClient.Client, error)
- func (mc *MasterClient) NewProjectClient(projectName string, projectID string) (*projectClient.Client, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MasterClient ¶
type MasterClient struct { ManagementClient *managementClient.Client TokenKey string URL string }
MasterClient holds the Rancher client for Management client.
func NewMasterClient ¶
func NewMasterClient(url string, token string) (*MasterClient, error)
NewMasterClient returns a new MasterClient with a Management Client
func (*MasterClient) GetClusterID ¶
func (mc *MasterClient) GetClusterID(clusterName string) (string, error)
GetClusterID gets the ID of a Cluster
func (*MasterClient) GetClusterName ¶
func (mc *MasterClient) GetClusterName(clusterID string) (string, error)
GetClusterName gets the Name of a Cluster
func (*MasterClient) GetProjectRoleTemplateID ¶
func (mc *MasterClient) GetProjectRoleTemplateID(roleName string) (string, error)
GetProjectRoleTemplateID gets the ID of a Rancher Project role template
func (*MasterClient) NewClusterClient ¶
func (mc *MasterClient) NewClusterClient(clusterName string, clusterID string) (*clusterClient.Client, error)
NewClusterClient creates a new ClusterClient for a specific cluster
func (*MasterClient) NewProjectClient ¶
func (mc *MasterClient) NewProjectClient(projectName string, projectID string) (*projectClient.Client, error)
NewProjectClient creates a new ProjectClient for a specific project
Click to show internal directories.
Click to hide internal directories.