Documentation ¶
Index ¶
- Constants
- Variables
- type BackupList
- type BackupPointList
- type Client
- func (cli *Client) AddOrRemoveNode(ctx context.Context, patchNode *clusteroperation.PatchNodes, ...) (*ClustersList, error)
- func (cli *Client) CreateBackup(ctx context.Context, cluName string, backup *v1.Backup) (*BackupList, error)
- func (cli *Client) CreateBackupPoint(ctx context.Context, point *v1.BackupPoint) (*BackupPointList, error)
- func (cli *Client) CreateCluster(ctx context.Context, cluster *v1.Cluster) (*ClustersList, error)
- func (cli *Client) CreateConfigMap(ctx context.Context, cm *v1.ConfigMap) (*ConfigMapList, error)
- func (cli *Client) CreateRecovery(ctx context.Context, cluName string, recovery *v1.Recovery) (*v1.Recovery, error)
- func (cli *Client) CreateRegistry(ctx context.Context, registry *v1.Registry) (*v1.RegistryList, error)
- func (cli *Client) CreateRole(ctx context.Context, role *iamv1.GlobalRole) (*RoleList, error)
- func (cli *Client) CreateTemplate(ctx context.Context, template *v1.Template) (*TemplateList, error)
- func (cli *Client) CreateUser(ctx context.Context, user *iamv1.User) (*UsersList, error)
- func (cli *Client) DeleteBackup(ctx context.Context, cluName, backupName string) error
- func (cli *Client) DeleteBackupPoint(ctx context.Context, name string) error
- func (cli *Client) DeleteCluster(ctx context.Context, name string) error
- func (cli *Client) DeleteClusterWithQuery(ctx context.Context, name string, queryString url.Values) error
- func (cli *Client) DeleteConfigMap(ctx context.Context, name string) error
- func (cli *Client) DeleteNode(ctx context.Context, name string) error
- func (cli *Client) DeleteRegistry(ctx context.Context, name string) error
- func (cli *Client) DeleteRole(ctx context.Context, name string) error
- func (cli *Client) DeleteTemplate(ctx context.Context, name string) error
- func (cli *Client) DeleteUser(ctx context.Context, name string) error
- func (cli *Client) DescribeBackup(ctx context.Context, backupName string) (*BackupList, error)
- func (cli *Client) DescribeCluster(ctx context.Context, name string) (*ClustersList, error)
- func (cli *Client) DescribeConfigMap(ctx context.Context, name string) (*ConfigMapList, error)
- func (cli *Client) DescribeNode(ctx context.Context, name string) (*NodesList, error)
- func (cli *Client) DescribeRole(ctx context.Context, name string) (*RoleList, error)
- func (cli *Client) DescribeTemplate(ctx context.Context, name string) (*TemplateList, error)
- func (cli *Client) DescribeUser(ctx context.Context, name string) (*UsersList, error)
- func (cli *Client) DisableNode(ctx context.Context, name string) error
- func (cli *Client) EnableNode(ctx context.Context, name string) error
- func (cli *Client) GetComponentMeta(ctx context.Context, query url.Values) (*ComponentMeta, error)
- func (cli *Client) GetPlatformSetting(ctx context.Context) (*v1.DockerRegistry, error)
- func (cli *Client) GetPublicKey(ctx context.Context) (*v1.WebTerminal, error)
- func (cli *Client) HTTPClient() *http.Client
- func (cli *Client) Host() string
- func (cli *Client) InstallOrUninstallComponent(ctx context.Context, cluName string, component *corev1.PatchComponents) (*ClustersList, error)
- func (cli *Client) ListBackupsWithCluster(ctx context.Context, clusterName string) (*BackupList, error)
- func (cli *Client) ListClusters(ctx context.Context, query Queries) (*ClustersList, error)
- func (cli *Client) ListConfigMaps(ctx context.Context, query Queries) (*ConfigMapList, error)
- func (cli *Client) ListNodes(ctx context.Context, query Queries) (*NodesList, error)
- func (cli *Client) ListOperation(ctx context.Context, query Queries) (*OperationList, error)
- func (cli *Client) ListRegion(ctx context.Context, query Queries) (*v1.RegionList, error)
- func (cli *Client) ListRegistries(ctx context.Context, query Queries) (*v1.RegistryList, error)
- func (cli *Client) ListRoles(ctx context.Context, query Queries) (*RoleList, error)
- func (cli *Client) ListTemplate(ctx context.Context, query Queries) (*TemplateList, error)
- func (cli *Client) ListUsers(ctx context.Context, query Queries) (*UsersList, error)
- func (cli *Client) Login(ctx context.Context, body LoginRequest) (*oauth.Token, error)
- func (cli *Client) PrintLogs(ctx context.Context, operation v1.Operation) error
- func (cli *Client) Scheme() string
- func (cli *Client) Token() string
- func (cli *Client) UpdateCert(ctx context.Context, cluName string) (*ClustersList, error)
- func (cli *Client) UpdateCluster(ctx context.Context, cluster *v1.Cluster) error
- func (cli *Client) UpdateConfigMap(ctx context.Context, cm *v1.ConfigMap) (*ConfigMapList, error)
- func (cli *Client) UpdateTemplate(ctx context.Context, template *v1.Template) (*TemplateList, error)
- func (cli *Client) UpgradeCluster(ctx context.Context, cluName string, upgradeCluster *corev1.ClusterUpgrade) error
- func (cli *Client) Validate() error
- func (cli *Client) Version(ctx context.Context) (*apimachineryversion.Info, error)
- type ClustersList
- type ComponentMeta
- type ComponentMetas
- type ConfigMapList
- type LoginRequest
- type NodesList
- type OperationList
- type Opt
- func WithBearerAuth(token string) Opt
- func WithCAData(ca []byte) Opt
- func WithCertData(cert, key []byte) Opt
- func WithEndpoint(endpoint string) Opt
- func WithHTTPClient(client *http.Client) Opt
- func WithHost(h string) Opt
- func WithInsecureSkipTLSVerify() Opt
- func WithScheme(scheme string) Opt
- func WithServerName(name string) Opt
- type Queries
- type RoleList
- type TemplateList
- type UsersList
Constants ¶
View Source
const (
ListNodesPath = "/api/core.kubeclipper.io/v1/nodes"
)
Variables ¶
View Source
var (
JSONContentTypeHeader = map[string][]string{
"Content-Type": {"application/json"},
}
)
Functions ¶
This section is empty.
Types ¶
type BackupList ¶ added in v1.2.0
type BackupPointList ¶ added in v1.2.0
type BackupPointList struct { Items []v1.BackupPoint `json:"items" description:"paging data"` TotalCount int `json:"totalCount,omitempty" description:"total count"` }
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func NewClientWithOpts ¶
func (*Client) AddOrRemoveNode ¶ added in v1.2.0
func (cli *Client) AddOrRemoveNode(ctx context.Context, patchNode *clusteroperation.PatchNodes, clusterName string) (*ClustersList, error)
func (*Client) CreateBackup ¶ added in v1.2.0
func (*Client) CreateBackupPoint ¶ added in v1.2.0
func (cli *Client) CreateBackupPoint(ctx context.Context, point *v1.BackupPoint) (*BackupPointList, error)
func (*Client) CreateCluster ¶
func (*Client) CreateConfigMap ¶ added in v1.2.0
func (*Client) CreateRecovery ¶ added in v1.2.0
func (*Client) CreateRegistry ¶ added in v1.3.1
func (*Client) CreateRole ¶
func (*Client) CreateTemplate ¶ added in v1.3.1
func (*Client) CreateUser ¶
func (*Client) DeleteBackup ¶ added in v1.2.0
func (*Client) DeleteBackupPoint ¶ added in v1.2.0
func (*Client) DeleteCluster ¶
DeleteCluster Delete Cluster with name Deprecated. Use DeleteClusterWithQuery instead
func (*Client) DeleteClusterWithQuery ¶ added in v1.3.1
func (cli *Client) DeleteClusterWithQuery(ctx context.Context, name string, queryString url.Values) error
DeleteClusterWithQuery Delete Cluster with name and custom query parameter
func (*Client) DeleteConfigMap ¶ added in v1.2.0
func (*Client) DeleteRegistry ¶ added in v1.3.1
func (*Client) DeleteTemplate ¶ added in v1.3.1
func (*Client) DescribeBackup ¶ added in v1.2.0
func (*Client) DescribeCluster ¶
func (*Client) DescribeConfigMap ¶ added in v1.2.0
func (*Client) DescribeNode ¶
func (*Client) DescribeRole ¶
func (*Client) DescribeTemplate ¶ added in v1.3.1
func (*Client) DescribeUser ¶
func (*Client) DisableNode ¶ added in v1.2.0
func (*Client) EnableNode ¶ added in v1.2.0
func (*Client) GetComponentMeta ¶
func (*Client) GetPlatformSetting ¶
func (*Client) GetPublicKey ¶ added in v1.2.0
func (*Client) HTTPClient ¶
HTTPClient returns a copy of the HTTP client bound to the server
func (*Client) InstallOrUninstallComponent ¶ added in v1.2.0
func (cli *Client) InstallOrUninstallComponent(ctx context.Context, cluName string, component *corev1.PatchComponents) (*ClustersList, error)
func (*Client) ListBackupsWithCluster ¶ added in v1.2.0
func (*Client) ListClusters ¶
func (*Client) ListConfigMaps ¶ added in v1.2.0
func (*Client) ListOperation ¶ added in v1.4.0
func (*Client) ListRegion ¶ added in v1.3.1
func (*Client) ListRegistries ¶ added in v1.3.1
func (*Client) ListTemplate ¶ added in v1.3.1
func (*Client) UpdateCert ¶ added in v1.3.1
func (*Client) UpdateCluster ¶ added in v1.3.1
func (*Client) UpdateConfigMap ¶ added in v1.2.0
func (*Client) UpdateTemplate ¶ added in v1.3.1
func (*Client) UpgradeCluster ¶ added in v1.2.0
type ClustersList ¶
type ClustersList struct { Items []v1.Cluster `json:"items" description:"paging data"` TotalCount int `json:"totalCount,omitempty" description:"total count"` }
func (*ClustersList) JSONPrint ¶
func (n *ClustersList) JSONPrint() ([]byte, error)
func (*ClustersList) TablePrint ¶
func (n *ClustersList) TablePrint() ([]string, [][]string)
func (*ClustersList) YAMLPrint ¶
func (n *ClustersList) YAMLPrint() ([]byte, error)
type ComponentMeta ¶
type ComponentMeta struct { Rules []map[string]interface{} `json:"rules"` Addons []scheme.MetaResource `json:"addons"` }
type ComponentMetas ¶
type ComponentMetas struct { Node string `json:"-"` scheme.PackageMetadata `json:"items" description:"paging data"` TotalCount int `json:"totalCount,omitempty" description:"total count"` }
func (*ComponentMetas) JSONPrint ¶
func (n *ComponentMetas) JSONPrint() ([]byte, error)
func (*ComponentMetas) TablePrint ¶
func (n *ComponentMetas) TablePrint() ([]string, [][]string)
func (*ComponentMetas) YAMLPrint ¶
func (n *ComponentMetas) YAMLPrint() ([]byte, error)
type ConfigMapList ¶ added in v1.2.0
type ConfigMapList struct { Items []v1.ConfigMap `json:"items" description:"paging data"` TotalCount int `json:"totalCount,omitempty" description:"total count"` }
func (*ConfigMapList) JSONPrint ¶ added in v1.2.0
func (n *ConfigMapList) JSONPrint() ([]byte, error)
func (*ConfigMapList) TablePrint ¶ added in v1.2.0
func (n *ConfigMapList) TablePrint() ([]string, [][]string)
func (*ConfigMapList) YAMLPrint ¶ added in v1.2.0
func (n *ConfigMapList) YAMLPrint() ([]byte, error)
type LoginRequest ¶
type NodesList ¶
type NodesList struct { Items []v1.Node `json:"items" description:"paging data"` TotalCount int `json:"totalCount,omitempty" description:"total count"` }
func (*NodesList) TablePrint ¶
type OperationList ¶ added in v1.4.0
type OperationList struct { Items []v1.Operation `json:"items" description:"paging data"` TotalCount int `json:"totalCount,omitempty" description:"total count"` }
func (*OperationList) JSONPrint ¶ added in v1.4.0
func (n *OperationList) JSONPrint() ([]byte, error)
func (*OperationList) TablePrint ¶ added in v1.4.0
func (n *OperationList) TablePrint() ([]string, [][]string)
func (*OperationList) YAMLPrint ¶ added in v1.4.0
func (n *OperationList) YAMLPrint() ([]byte, error)
type Opt ¶
func WithBearerAuth ¶
func WithCAData ¶ added in v1.4.0
func WithCertData ¶ added in v1.4.0
func WithEndpoint ¶ added in v1.4.0
func WithHTTPClient ¶
WithHTTPClient overrides the client http client with the specified one
func WithInsecureSkipTLSVerify ¶ added in v1.4.0
func WithInsecureSkipTLSVerify() Opt
func WithScheme ¶
WithScheme overrides the client scheme with the specified one
func WithServerName ¶ added in v1.4.0
type Queries ¶
func (*Queries) ToRawQuery ¶
type RoleList ¶
type RoleList struct { Items []iamv1.GlobalRole `json:"items" description:"paging data"` TotalCount int `json:"totalCount,omitempty" description:"total count"` }
func (*RoleList) TablePrint ¶
type TemplateList ¶ added in v1.3.1
type TemplateList struct { Items []v1.Template `json:"items" description:"paging data"` TotalCount int `json:"totalCount,omitempty" description:"total count"` }
func (*TemplateList) JSONPrint ¶ added in v1.3.1
func (n *TemplateList) JSONPrint() ([]byte, error)
func (*TemplateList) TablePrint ¶ added in v1.3.1
func (n *TemplateList) TablePrint() ([]string, [][]string)
func (*TemplateList) YAMLPrint ¶ added in v1.3.1
func (n *TemplateList) YAMLPrint() ([]byte, error)
Click to show internal directories.
Click to hide internal directories.