model

package
v0.9.213 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 10, 2025 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BackupRepositoryStatusavailable   BackupRepositoryStatus = "Available"
	BackupRepositoryStatusunavailable BackupRepositoryStatus = "Unavailable"

	BackupTaskTypeScheduled BackupTaskType = "Scheduled"
	BackupTaskTypeManual    BackupTaskType = "Manual"

	RestoreResourcePolicyNONE   RestoreResourcePolicy = "None"
	RestoreResourcePolicyUPDATE RestoreResourcePolicy = "Update"

	BackupScopeSpecified BackupScope = "Specified"
	BackupScopeAll       BackupScope = "All"
)
View Source
const (
	AllCluster   = "all"
	AllNamespace = "all"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthRemedyTaskReq added in v0.9.211

type AuthRemedyTaskReq struct {
	InstanceGroupID string `json:"instanceGroupID,omitempty"`
	RemedyTaskID    string `json:"remedyTaskID,omitempty"`
}

type AuthRemedyTaskResponse added in v0.9.211

type AuthRemedyTaskResponse struct {
	RequestID string `json:"requestID"`
}

type AuthorizeTaskArgs added in v0.9.211

type AuthorizeTaskArgs struct {
	ClusterID       string `json:"clusterID,omitempty"`
	InstanceGroupID string `json:"instanceGroupID,omitempty"`
	RemedyTaskID    string `json:"remedyTaskID,omitempty"`

	IsAuthorized bool `json:"isAuthorized,omitempty"`
}

授权任务

type AuthorizeTaskResponse added in v0.9.211

type AuthorizeTaskResponse struct {
	IsAuthorized bool   `json:"isAuthorized,omitempty"`
	RequestID    string `json:"requestID"`
}

type BackupDetails added in v0.9.211

type BackupDetails struct {
	TaskName           string            `json:"taskName"`
	BackupClusterID    string            `json:"backupClusterID"`
	LabelSelector      map[string]string `json:"labelSelector,omitempty"`
	IncludedNamespaces []string          `json:"includedNamespaces,omitempty"`
	ExcludedNamespaces []string          `json:"excludedNamespaces,omitempty"`
	IncludedResources  []string          `json:"includedResources,omitempty"`
	ExcludedResources  []string          `json:"excludedResources,omitempty"`

	Task *backupv1.Backup `json:"task"`
}

type BackupInfos added in v0.9.211

type BackupInfos struct {
	BackupNames []string `json:"backupNames"`
	Prefix      string   `json:"prefix"`
	BucketName  string   `json:"bucketName"`
}

type BackupRepository added in v0.9.211

type BackupRepository struct {
	Name          string                 `json:"name"`
	RepositoryID  string                 `json:"repositoryID"`
	Region        string                 `json:"region"`
	BucketName    string                 `json:"bucketName"`
	BucketSubPath string                 `json:"bucketSubPath"`
	Status        BackupRepositoryStatus `json:"status"`
	CreateTime    time.Time              `json:"createTime"`
	ErrMsg        string                 `json:"errMsg"`
}

BackupRepository

type BackupRepositoryPage added in v0.9.211

type BackupRepositoryPage struct {
	PageNo             int                 `json:"pageNo"`
	PageSize           int                 `json:"pageSize"`
	TotalCount         int                 `json:"totalCount"`
	BackupRepositories []*BackupRepository `json:"backupRepositorys"`
}

type BackupRepositoryStatus added in v0.9.211

type BackupRepositoryStatus string

type BackupScope added in v0.9.211

type BackupScope string

type BackupTask added in v0.9.211

type BackupTask struct {
	TaskName       string          `json:"taskName"`
	TaskID         string          `json:"taskID"`
	BackupType     BackupTaskType  `json:"backupType"`
	RepositoryName string          `json:"repositoryName"`
	RepositoryID   string          `json:"repositoryID"`
	ClusterID      string          `json:"clusterID"`
	BackupScope    BackupScope     `json:"backupScope"`
	Task           backupv1.Backup `json:"task"`

	ErrMsg               string            `json:"errMsg"`
	BackupExpirationDays int               `json:"backupExpirationDays"`
	LabelSelector        map[string]string `json:"labelSelector,omitempty"`
	IncludedNamespaces   []string          `json:"includedNamespaces,omitempty"`
	ExcludedNamespaces   []string          `json:"excludedNamespaces,omitempty"`
	IncludedResources    []string          `json:"includedResources,omitempty"`
	ExcludedResources    []string          `json:"excludedResources,omitempty"`
}

type BackupTaskArgs added in v0.9.211

type BackupTaskArgs struct {
	Region   string `json:"region"`
	TaskName string `json:"taskName"`
	//BucketName           string            `json:"bucketName"`
	RepositoryID string `json:"repositoryID"`
	//RepositoryName       string            `json:"repositoryName"`
	BackupScope          BackupScope       `json:"backupScope"`
	IncludedNamespaces   []string          `json:"includedNamespaces"`
	ExcludedNamespaces   []string          `json:"excludedNamespaces"`
	IncludedResources    []string          `json:"includedResources"`
	ExcludedResources    []string          `json:"excludedResources"`
	LabelSelector        map[string]string `json:"labelSelector"`
	BackupExpirationDays int               `json:"backupExpirationDays"`

	Schedule string `json:"schedule"`
}

BackupTasks

type BackupTaskType added in v0.9.211

type BackupTaskType string

type BackupTasksPage added in v0.9.211

type BackupTasksPage struct {
	PageNo      int           `json:"pageNo"`
	PageSize    int           `json:"pageSize"`
	TotalCount  int           `json:"totalCount"`
	BackupTasks []*BackupTask `json:"backupTasks"`
}

type BindInstanceGroupResponse added in v0.9.211

type BindInstanceGroupResponse struct {
	RequestID string `json:"requestID"`
}

type BindingOrUnBindingRequest added in v0.9.211

type BindingOrUnBindingRequest struct {
	ClusterID       string `json:"clusterID,omitempty"`
	InstanceGroupID string `json:"instanceGroupID,omitempty"`

	RemedyRulesBinding *RemedyRulesBinding `json:"remedyRulesBinding,omitempty"`
}

type BindingOrUnBindingResponse added in v0.9.211

type BindingOrUnBindingResponse struct {
	Result    *BindingOrUnBindingRequest `json:"result,omitempty"`
	RequestID string                     `json:"requestID"`
}

type CCERestoreTask added in v0.9.211

type CCERestoreTask struct {
	ClusterID string `json:"clusterID"`
	TaskName  string `json:"taskName"`
	TaskID    string `json:"taskID"`
	//RepositoryID           string                `json:"repositoryID"`
	RepositoryName string `json:"repositoryName"`
	BackupTaskName string `json:"backupTaskName"`
	ErrMsg         string `json:"errMsg"`

	Task backupv1.Restore `json:"task"`
}

type CCERestoreTasksPage added in v0.9.211

type CCERestoreTasksPage struct {
	PageNo       int               `json:"pageNo"`
	PageSize     int               `json:"pageSize"`
	TotalCount   int               `json:"totalCount"`
	RestoreTasks []*CCERestoreTask `json:"restoreTasks"`
}

type CCEV1BackupBackupTask added in v0.9.211

type CCEV1BackupBackupTask struct {
	TaskName       string          `json:"taskName"`
	TaskID         string          `json:"taskID"`
	BackupType     BackupTaskType  `json:"backupType"`
	RepositoryName string          `json:"repositoryName"`
	RepositoryID   string          `json:"repositoryID"`
	ClusterID      string          `json:"clusterID"`
	BackupScope    BackupScope     `json:"backupScope"`
	Task           backupv1.Backup `json:"task"`

	ErrMsg               string            `json:"errMsg"`
	BackupExpirationDays int               `json:"backupExpirationDays"`
	LabelSelector        map[string]string `json:"labelSelector,omitempty"`
	IncludedNamespaces   []string          `json:"includedNamespaces,omitempty"`
	ExcludedNamespaces   []string          `json:"excludedNamespaces,omitempty"`
	IncludedResources    []string          `json:"includedResources,omitempty"`
	ExcludedResources    []string          `json:"excludedResources,omitempty"`
}

type CCEV1BackupTasksPage added in v0.9.211

type CCEV1BackupTasksPage struct {
	PageNo      int                      `json:"pageNo"`
	PageSize    int                      `json:"pageSize"`
	TotalCount  int                      `json:"totalCount"`
	BackupTasks []*CCEV1BackupBackupTask `json:"backupTasks"`
}

type CCEV1ListBackupTasksResponse added in v0.9.211

type CCEV1ListBackupTasksResponse struct {
	RequestID       string                `json:"requestId"`
	BackupTasksPage *CCEV1BackupTasksPage `json:"backupTasksPage"`
}

type CCEV1ScheduleTask added in v0.9.211

type CCEV1ScheduleTask struct {
	TaskName         string            `json:"taskName"`
	TaskID           string            `json:"taskID"`
	Schedule         string            `json:"schedule"`
	ScheduleDescribe string            `json:"scheduleDescribe"`
	RepositoryName   string            `json:"repositoryName"`
	RepositoryID     string            `json:"repositoryID"`
	ClusterID        string            `json:"clusterID"`
	ErrMsg           string            `json:"errMsg"`
	Task             backupv1.Schedule `json:"task"`

	BackupExpirationDays int               `json:"backupExpirationDays"`
	LabelSelector        map[string]string `json:"labelSelector,omitempty"`
	IncludedNamespaces   []string          `json:"includedNamespaces,omitempty"`
	ExcludedNamespaces   []string          `json:"excludedNamespaces,omitempty"`
	IncludedResources    []string          `json:"includedResources,omitempty"`
	ExcludedResources    []string          `json:"excludedResources,omitempty"`
}

type CCEV1ScheduleTasksPage added in v0.9.211

type CCEV1ScheduleTasksPage struct {
	PageNo        int                  `json:"pageNo"`
	PageSize      int                  `json:"pageSize"`
	TotalCount    int                  `json:"totalCount"`
	ScheduleTasks []*CCEV1ScheduleTask `json:"scheduleTasks"`
}

type CheckRemedyTaskConfirmedStatusResponse added in v0.9.211

type CheckRemedyTaskConfirmedStatusResponse struct {
	IsConfirmed bool   `json:"isConfirmed,omitempty"`
	RequestID   string `json:"requestID"`
}

检查任务恢复状态

type CheckWebhookAddressRequest added in v0.9.211

type CheckWebhookAddressRequest struct {
	ClusterID      string `json:"clusterId,omitempty"`
	WebhookAddress string `json:"webhookAddress"`
}

type CheckWebhookAddressResponse added in v0.9.211

type CheckWebhookAddressResponse struct {
	Result    *CheckWebhookAddressResult `json:"result,omitempty"`
	RequestID string                     `json:"requestID"`
}

type CheckWebhookAddressResult added in v0.9.211

type CheckWebhookAddressResult struct {
	Success      bool   `json:"success"`
	ErrorMessage string `json:"errorMessage"`
}

type ConditionType added in v0.9.211

type ConditionType string

type ConfirmRemedyTask added in v0.9.211

type ConfirmRemedyTask struct {
	ClusterID       string `json:"clusterID,omitempty"`
	InstanceGroupID string `json:"instanceGroupID,omitempty"`
	RemedyTaskID    string `json:"remedyTaskID,omitempty"`

	IsConfirmed bool `json:"isConfirmed,omitempty"`
}

确认任务恢复

type ConfirmRemedyTaskResponse added in v0.9.211

type ConfirmRemedyTaskResponse struct {
	IsConfirmed bool   `json:"isConfirmed,omitempty"`
	RequestID   string `json:"requestID"`
}

type CreateBackupRepositoryResp added in v0.9.211

type CreateBackupRepositoryResp struct {
	RequestID        string            `json:"requestId"`
	BackupRepository *BackupRepository `json:"backupRepository"`
}

type CreateBackupRequest added in v0.9.211

type CreateBackupRequest struct {
	BackupRepository *BackupRepository `json:"backupRepository"`
}

type CreateBackupTaskRequest added in v0.9.211

type CreateBackupTaskRequest struct {
	ClusterID      string          `json:"clusterID"`
	BackupTaskArgs *BackupTaskArgs `json:"backupTaskArgs"`
}

type CreateBackupTaskResponse added in v0.9.211

type CreateBackupTaskResponse struct {
	RequestID string           `json:"requestId"`
	Task      *backupv1.Backup `json:"task"`
}

type CreateCCERestoreTaskResponse added in v0.9.211

type CreateCCERestoreTaskResponse struct {
	RequestID string            `json:"requestId"`
	Task      *backupv1.Restore `json:"task"`
}

type CreateCCEScheduleRulesResponse added in v0.9.211

type CreateCCEScheduleRulesResponse struct {
	RequestID string             `json:"requestId"`
	Task      *backupv1.Schedule `json:"task"`
}

type CreateCCEV1BackupTaskResponse added in v0.9.211

type CreateCCEV1BackupTaskResponse struct {
	RequestID string           `json:"requestId"`
	Task      *backupv1.Backup `json:"task"`
}

type CreateRBACMessage

type CreateRBACMessage struct {
	Success   bool   `json:"success,omitempty"` // 是否创建成功
	ClusterID string `json:"clusterID"`
	Message   string `json:"message,omitempty"` // 创建结果的信息
}

CreateRBACMessage - 创建RBAC权限接口的主要信息

type CreateRBACResponse

type CreateRBACResponse struct {
	RBACResponse
	Data []*CreateRBACMessage `json:"data,omitempty"`

	// 临时访问凭证
	TemporaryKubeConfig string `json:"temporaryKubeConfig,omitempty"`
}

CreateRBACResponse - 创建 RBAC 权限接口的返回

type CreateRemedyRuleResponse added in v0.9.211

type CreateRemedyRuleResponse struct {
	RemedyRule *RemedyRule `json:"remedyRule,omitempty"`
	RequestID  string      `json:"requestID"`
}

type CreateRestoreTaskRequest added in v0.9.211

type CreateRestoreTaskRequest struct {
	ClusterID       string           `json:"clusterID"`
	RestoreTaskArgs *RestoreTaskArgs `json:"restoreTaskArgs"`
}

type CreateRestoreTaskResponse added in v0.9.211

type CreateRestoreTaskResponse struct {
	RequestID string            `json:"requestId"`
	Task      *backupv1.Restore `json:"task"`
}

type CreateScheduleRulesRequest added in v0.9.211

type CreateScheduleRulesRequest struct {
	//Schedule       string          `json:"schedule"`
	ClusterID      string          `json:"clusterID"`
	BackupTaskArgs *BackupTaskArgs `json:"backupTaskArgs"`
}

定时备份

type CreateScheduleRulesResponse added in v0.9.211

type CreateScheduleRulesResponse struct {
	RequestID string             `json:"requestId"`
	Task      *backupv1.Schedule `json:"task"`
}

type DeleteBackupRepositoryReq added in v0.9.211

type DeleteBackupRepositoryReq struct {
	RepositoryID string `json:"repositoryID"`
}

type DeleteBackupRepositoryResp added in v0.9.211

type DeleteBackupRepositoryResp struct {
	RequestID string `json:"requestId"`
}

type DeleteBackupTaskRequest added in v0.9.211

type DeleteBackupTaskRequest struct {
	ClusterID    string `json:"clusterId"`
	BackupTaskID string `json:"backupTaskID"`
}

type DeleteBackupTaskResponse added in v0.9.211

type DeleteBackupTaskResponse struct {
	RequestID string `json:"requestId"`
}

type DeleteRemedyRuleResponse added in v0.9.211

type DeleteRemedyRuleResponse struct {
	RequestID string `json:"requestID"`
}

type DeleteRestoreTaskRequest added in v0.9.211

type DeleteRestoreTaskRequest struct {
	ClusterID     string `json:"clusterId"`
	RestoreTaskID string `json:"restoreTaskID"`
}

type DeleteRestoreTaskResponse added in v0.9.211

type DeleteRestoreTaskResponse struct {
	RequestID string `json:"requestId"`
}

type DeleteScheduleTaskRequest added in v0.9.211

type DeleteScheduleTaskRequest struct {
	ClusterID      string `json:"clusterId"`
	ScheduleTaskID string `json:"scheduleTaskID"`
}

type DeleteScheduleTaskResponse added in v0.9.211

type DeleteScheduleTaskResponse struct {
	RequestID string `json:"requestId"`
}

type GetBackupInfoByNameResp added in v0.9.211

type GetBackupInfoByNameResp struct {
	RequestID     string         `json:"requestId"`
	BackupDetails *BackupDetails `json:"backupDetails"`
}

type GetBackupRepositoryResp added in v0.9.211

type GetBackupRepositoryResp struct {
	RequestID        string            `json:"requestId"`
	BackupRepository *BackupRepository `json:"backupRepository"`
}

type GetBackupTaskRequest added in v0.9.211

type GetBackupTaskRequest struct {
	ClusterID    string `json:"clusterId"`
	BackupTaskID string `json:"backupTaskID"`
}

type GetBackupTaskResponse added in v0.9.211

type GetBackupTaskResponse struct {
	RequestID  string      `json:"requestId"`
	BackupTask *BackupTask `json:"backupTask"`
}

type GetCCERestoreTaskResponse added in v0.9.211

type GetCCERestoreTaskResponse struct {
	RequestID   string          `json:"requestId"`
	RestoreTask *CCERestoreTask `json:"restoreTask"`
}

type GetCCEScheduleTaskResponse added in v0.9.211

type GetCCEScheduleTaskResponse struct {
	RequestID    string             `json:"requestId"`
	ScheduleTask *CCEV1ScheduleTask `json:"scheduleTask"`
}

type GetCCEV1BackupTaskResponse added in v0.9.211

type GetCCEV1BackupTaskResponse struct {
	RequestID  string                 `json:"requestId"`
	BackupTask *CCEV1BackupBackupTask `json:"backupTask"`
}

type GetRBACMessage

type GetRBACMessage struct {
	Role        RBACRole `json:"role,omitempty"`
	ClusterID   string   `json:"clusterID,omitempty"`
	Namespace   string   `json:"namespace,omitempty"`
	ClusterName string   `json:"clusterName,omitempty"`
}

type GetRBACResponse

type GetRBACResponse struct {
	RequestID string            `json:"requestID,omitempty"` // request id
	Data      []*GetRBACMessage `json:"data"`
}

GetRBACResponse - 获取RBAC权限列表的返回

type GetRemedyRuleResponse added in v0.9.211

type GetRemedyRuleResponse struct {
	RemedyRule *RemedyRule `json:"remedyRule,omitempty"`
	RequestID  string      `json:"requestID"`
}

type GetRemedyTaskOptions added in v0.9.211

type GetRemedyTaskOptions struct {
	ClusterID       string `json:"clusterID,omitempty"`
	InstanceGroupID string `json:"instanceGroupID,omitempty"`
	RemedyTaskID    string `json:"remedyTaskID,omitempty"`
}

type GetRemedyTaskResponse added in v0.9.211

type GetRemedyTaskResponse struct {
	RemedyTask *RemedyTask `json:"remedyTask,omitempty"`
	RequestID  string      `json:"requestID"`
}

type GetRestoreTaskRequest added in v0.9.211

type GetRestoreTaskRequest struct {
	ClusterID     string `json:"clusterId"`
	RestoreTaskID string `json:"restoreTaskID"`
}

type GetRestoreTaskResponse added in v0.9.211

type GetRestoreTaskResponse struct {
	RequestID   string       `json:"requestId"`
	RestoreTask *RestoreTask `json:"restoreTask"`
}

type GetScheduleDescribeResponse added in v0.9.211

type GetScheduleDescribeResponse struct {
	RequestID        string `json:"requestId"`
	ScheduleDescribe string `json:"scheduleDescribe"`
}

type GetScheduleTaskRequest added in v0.9.211

type GetScheduleTaskRequest struct {
	ClusterID      string `json:"clusterId"`
	ScheduleTaskID string `json:"scheduleTaskID"`
}

type GetScheduleTaskResponse added in v0.9.211

type GetScheduleTaskResponse struct {
	RequestID    string        `json:"requestId"`
	ScheduleTask *ScheduleTask `json:"scheduleTask"`
}

type InstanceGroupTuple added in v0.9.211

type InstanceGroupTuple struct {
	ID   string `json:"id,omitempty"`
	Name string `json:"name,omitempty"`
}

type KubeConfigType added in v0.9.211

type KubeConfigType string

KubeConfigType - kube config 类型

const (
	// KubeConfigTypeVPC 使用 BLB VPCIP
	KubeConfigTypeVPC KubeConfigType = "vpc"

	// KubeConfigTypePublic 使用 BLB EIP
	KubeConfigTypePublic KubeConfigType = "public"
)

type ListBackupNameFromRepoResp added in v0.9.211

type ListBackupNameFromRepoResp struct {
	RequestID   string      `json:"requestId"`
	BackupInfos BackupInfos `json:"backupInfos"`
}

type ListBackupRepositoryResp added in v0.9.211

type ListBackupRepositoryResp struct {
	RequestID            string               `json:"requestId"`
	BackupRepositoryPage BackupRepositoryPage `json:"backupRepositoryPage"`
}

type ListBackupTasksResponse added in v0.9.211

type ListBackupTasksResponse struct {
	RequestID       string           `json:"requestId"`
	BackupTasksPage *BackupTasksPage `json:"backupTasksPage"`
}

type ListCCERestoreTasksResponse added in v0.9.211

type ListCCERestoreTasksResponse struct {
	RequestID        string               `json:"requestId"`
	RestoreTasksPage *CCERestoreTasksPage `json:"restoreTasksPage"`
}

type ListCCEScheduleTasksResponse added in v0.9.211

type ListCCEScheduleTasksResponse struct {
	RequestID         string                  `json:"requestId"`
	ScheduleTasksPage *CCEV1ScheduleTasksPage `json:"scheduleTasksPage"`
}

type ListRemedyRulesOptions added in v0.9.211

type ListRemedyRulesOptions struct {
	ClusterID string `json:"clusterID,omitempty"`

	OrderBy  string `json:"orderBy,omitempty"`
	Order    string `json:"order,omitempty"`
	PageNo   int    `json:"pageNo,omitempty"`
	PageSize int    `json:"pageSize,omitempty"`
}

type ListRemedyRulesResponse added in v0.9.211

type ListRemedyRulesResponse struct {
	RemedyRulePage *RemedyRulePage `json:"remedyRulePage,omitempty"`
	RequestID      string          `json:"requestID" json:"RequestID,omitempty"`
}

type ListRemedyTaskOptions added in v0.9.211

type ListRemedyTaskOptions struct {
	ClusterID string `json:"clusterID,omitempty"`

	InstanceGroupID string `json:"instanceGroupID,omitempty"`
	PageNo          int    `json:"pageNo,omitempty"`
	PageSize        int    `json:"pageSize,omitempty"`
	StartTime       string `json:"startTime,omitempty"`
	StopTime        string `json:"stopTime,omitempty"`
}

type ListRemedyTasksResponse added in v0.9.211

type ListRemedyTasksResponse struct {
	RemedyTaskPage *RemedyTaskPage `json:"remedyTaskPage,omitempty"`
	RequestID      string          `json:"requestID"`
}

type ListRestoreTasksResponse added in v0.9.211

type ListRestoreTasksResponse struct {
	RequestID        string            `json:"requestId"`
	RestoreTasksPage *RestoreTasksPage `json:"restoreTasksPage"`
}

type ListScheduleTasksResponse added in v0.9.211

type ListScheduleTasksResponse struct {
	RequestID         string             `json:"requestId"`
	ScheduleTasksPage *ScheduleTasksPage `json:"scheduleTasksPage"`
}

type ListTasksRequest added in v0.9.211

type ListTasksRequest struct {
	ClusterID    string `json:"clusterId"`
	PageNo       int    `json:"pageNo"`
	PageSize     int    `json:"pageSize"`
	OrderBy      string `json:"orderBy"`
	Order        string `json:"order"`
	Phases       string `json:"phases"`
	Keyword      string `json:"keyword"`
	KeywordType  string `json:"keywordType"`
	CrossCluster string `json:"crossCluster"`
}

type MsgTplType added in v0.9.211

type MsgTplType string

type NotificationConfig added in v0.9.211

type NotificationConfig struct {
	WebhookURL string `json:"webhookURL"`
}

type ObjectMeta added in v0.9.211

type ObjectMeta struct {
	ID                string            `json:"id,omitempty"`
	Name              string            `json:"name,omitempty"`
	Labels            map[string]string `json:"labels,omitempty"`
	Annotations       map[string]string `json:"annotations,omitempty"`
	CreationTimestamp nrv1.Time         `json:"creationTimestamp,omitempty"`
	UpdateTimestamp   *nrv1.Time        `json:"updateTimestamp,omitempty"`
	DeletionTimestamp *nrv1.Time        `json:"deletionTimestamp,omitempty"`
}

type RBACRequest

type RBACRequest struct {
	ClusterID string   `json:"clusterID,omitempty"`
	UserID    string   `json:"userID,omitempty"`
	Namespace string   `json:"namespace,omitempty"`
	Role      RBACRole `json:"role,omitempty"`

	Temp           bool           `json:"temp,omitempty"`
	ExpireHours    int            `json:"expireHours,omitempty"`
	KubeConfigType KubeConfigType `json:"kubeConfigType,omitempty"`
}

RBACRequest - 创建 RBAC 请求内容

type RBACResponse

type RBACResponse struct {
	RequestID string `json:"requestID,omitempty"` // request id
}

RBACResponse - 应答,仅包含 requestID

type RBACRole

type RBACRole string

RBACRole - RBAC 角色

const (
	// RoleAdmin - 管理员权限
	RoleAdmin RBACRole = "cce:admin" // 管理员

	// RoleDevOps - 运维开发权限
	RoleDevOps RBACRole = "cce:devops" // 运维开发

	// RoleReadonly - 只读权限
	RoleReadonly RBACRole = "cce:readonly" // 只读
)

type RemedyCondition added in v0.9.211

type RemedyCondition struct {
	Type               ConditionType       `json:"type"`
	ConfigType         nrv1.ConfigType     `json:"configType"`
	EnableCheck        bool                `json:"enableCheck"`
	EnableRemediation  bool                `json:"enableRemediation"`
	Steps              []RemedyStep        `json:"steps,omitempty"`
	NotificationConfig *NotificationConfig `json:"notificationConfig,omitempty"`
}

type RemedyDeleteNodeConfig added in v0.9.211

type RemedyDeleteNodeConfig struct {
	KeepInstanceCount    bool `json:"keepInstanceCount,omitempty"`
	KeepPostPaidInstance bool `json:"keepPostPaidInstance,omitempty"`
}

type RemedyRequestAuthorizationConfig added in v0.9.211

type RemedyRequestAuthorizationConfig struct {
	Automatic bool `json:"automatic"`

	RequestAuthWebhookURL string `json:"requestAuthWebhookURL,omitempty"`
}

type RemedyRule added in v0.9.211

type RemedyRule struct {
	ClusterID    string `json:"clusterID"`
	RemedyRuleID string `json:"remedyRuleID,omitempty"`

	ObjectMeta `json:"objectMeta,omitempty"`
	Spec       *RemedyRuleSpec `json:"spec"`
}

type RemedyRuleBinding added in v0.9.211

type RemedyRuleBinding struct {
	ClusterID string `json:"clusterID,omitempty"`

	InstanceGroupID string `json:"instanceGroupID,omitempty"`
	RemedyRuleID    string `json:"remedyRuleID,omitempty"`
}

type RemedyRuleOptions added in v0.9.211

type RemedyRuleOptions struct {
	ClusterID    string `json:"clusterID,omitempty"`
	RemedyRuleID string `json:"remedyRuleID,omitempty"`
}

type RemedyRulePage added in v0.9.211

type RemedyRulePage struct {
	OrderBy     string        `json:"orderBy,omitempty"`
	Order       string        `json:"order,omitempty"`
	PageNo      int           `json:"pageNo,omitempty"`
	PageSize    int           `json:"pageSize,omitempty"`
	TotalCount  int           `json:"totalCount,omitempty"`
	RemedyRules []*RemedyRule `json:"remedyRules,omitempty"`
}

type RemedyRuleSpec added in v0.9.211

type RemedyRuleSpec struct {
	Conditions     []RemedyCondition    `json:"conditions,omitempty"`
	NodeSelector   nrv1.LabelSelector   `json:"labelSelector,omitempty"`
	InstanceGroups []InstanceGroupTuple `json:"instanceGroups,omitempty"`
}

type RemedyRulesBinding added in v0.9.211

type RemedyRulesBinding struct {
	RemedyRuleID         string `json:"remedyRuleID,omitempty"`
	EnableCheckANDRemedy bool   `json:"enableCheckANDRemedy,omitempty"`
}

type RemedyStep added in v0.9.211

type RemedyStep struct {
	Name                       string                            `json:"name"`
	EnableNotification         bool                              `json:"enableNotification"`
	DeleteNodeConfig           *RemedyDeleteNodeConfig           `json:"deleteNodeConfig,omitempty"`
	RequestAuthorizationConfig *RemedyRequestAuthorizationConfig `json:"requestAuthorizationConfig,omitempty"`
}

type RemedyTask added in v0.9.211

type RemedyTask struct {
	nrv1.TypeMeta   `json:",inline"`
	nrv1.ObjectMeta `json:"metadata,omitempty"`

	Spec   RemedyTaskSpec   `json:"spec,omitempty"`
	Status RemedyTaskStatus `json:"status,omitempty"`
}

type RemedyTaskPage added in v0.9.211

type RemedyTaskPage struct {
	TotalCount  int          `json:"totalCount,omitempty"`
	PageNo      int          `json:"pageNo,omitempty"`
	PageSize    int          `json:"pageSize,omitempty"`
	RemedyTasks []RemedyTask `json:"remedyTasks,omitempty"`
}

type RemedyTaskSpec added in v0.9.211

type RemedyTaskSpec = nrv1.RemedyTaskSpec

type RemedyTaskStatus added in v0.9.211

type RemedyTaskStatus struct {
	ReconcileSteps       []RemedyTaskStep   `json:"reconcileSteps,omitempty"`
	ReconcileDeleteSteps []RemedyTaskStep   `json:"reconcileDeleteSteps,omitempty"`
	InstancePhase        nrv1.InstancePhase `json:"instancePhase,omitempty"`
	LastFinished         *nrv1.Time         `json:"lastFinished,omitempty"`
	// 最近发起维修时间
	LastStarted *nrv1.Time `json:"lastStarted,omitempty"`
	Message     string     `json:"message,omitempty" protobuf:"bytes,3,opt,name=message"`
	Healthy     bool       `json:"healthy,omitempty"`
}

type RemedyTaskStep added in v0.9.211

type RemedyTaskStep struct {
	Name      nrv1.StepName `json:"name"`
	nrv1.Step `json:",inline"`
}

type RequestAuthorizeArgs added in v0.9.211

type RequestAuthorizeArgs struct {
	ClusterID       string `json:"clusterID,omitempty"`
	InstanceGroupID string `json:"instanceGroupID,omitempty"`
	RemedyTaskID    string `json:"remedyTaskID,omitempty"`

	Webhook    string          `json:"webhook,omitempty"`
	MsgTplType MsgTplType      `json:"msgTplType,omitempty"`
	Content    *WebhookContent `json:"content,omitempty"`
}

webhook 请求链接

type RequestAuthorizeResponse added in v0.9.211

type RequestAuthorizeResponse struct {
	RequestID string `json:"requestID"`
}

type RestoreResourcePolicy added in v0.9.211

type RestoreResourcePolicy string

type RestoreTask added in v0.9.211

type RestoreTask struct {
	ClusterID string `json:"clusterID"`
	TaskName  string `json:"taskName"`
	TaskID    string `json:"taskID"`
	//RepositoryID           string                `json:"repositoryID"`
	RepositoryName string `json:"repositoryName"`
	BackupTaskName string `json:"backupTaskName"`
	ErrMsg         string `json:"errMsg"`

	Task backupv1.Restore `json:"task"`
}

type RestoreTaskArgs added in v0.9.211

type RestoreTaskArgs struct {
	//Region                 string                `json:"region"`
	BackupClusterID string `json:"backupClusterID"`

	TaskName               string                `json:"taskName"`
	RepositoryID           string                `json:"repositoryID"`
	RepositoryName         string                `json:"repositoryName"`
	BackupTaskID           string                `json:"backupTaskID"`
	BackupTaskName         string                `json:"backupTaskName"`
	BackupScope            BackupScope           `json:"backupScope"`
	IncludedNamespaces     []string              `json:"includedNamespaces,omitempty"`
	ExcludedNamespaces     []string              `json:"excludedNamespaces,omitempty"`
	ExistingResourcePolicy RestoreResourcePolicy `json:"existingResourcePolicy"`
}

备份恢复

type RestoreTasksPage added in v0.9.211

type RestoreTasksPage struct {
	PageNo       int            `json:"pageNo"`
	PageSize     int            `json:"pageSize"`
	TotalCount   int            `json:"totalCount"`
	RestoreTasks []*RestoreTask `json:"restoreTasks"`
}

type ScheduleTask added in v0.9.211

type ScheduleTask struct {
	TaskName         string            `json:"taskName"`
	TaskID           string            `json:"taskID"`
	Schedule         string            `json:"schedule"`
	ScheduleDescribe string            `json:"scheduleDescribe"`
	RepositoryName   string            `json:"repositoryName"`
	RepositoryID     string            `json:"repositoryID"`
	ClusterID        string            `json:"clusterID"`
	ErrMsg           string            `json:"errMsg"`
	Task             backupv1.Schedule `json:"task"`

	BackupExpirationDays int               `json:"backupExpirationDays"`
	LabelSelector        map[string]string `json:"labelSelector,omitempty"`
	IncludedNamespaces   []string          `json:"includedNamespaces,omitempty"`
	ExcludedNamespaces   []string          `json:"excludedNamespaces,omitempty"`
	IncludedResources    []string          `json:"includedResources,omitempty"`
	ExcludedResources    []string          `json:"excludedResources,omitempty"`
}

type ScheduleTasksPage added in v0.9.211

type ScheduleTasksPage struct {
	PageNo        int             `json:"pageNo"`
	PageSize      int             `json:"pageSize"`
	TotalCount    int             `json:"totalCount"`
	ScheduleTasks []*ScheduleTask `json:"scheduleTasks"`
}

type UnbindInstanceGroupResponse added in v0.9.211

type UnbindInstanceGroupResponse struct {
	RequestID string `json:"requestID"`
}

type UpdateRemedyRuleOptions added in v0.9.211

type UpdateRemedyRuleOptions struct {
	ClusterID    string `json:"clusterID,omitempty"`
	RemedyRuleID string `json:"remedyRuleID,omitempty"`
}

type UpdateRemedyRuleResponse added in v0.9.211

type UpdateRemedyRuleResponse struct {
	RemedyRule *RemedyRule `json:"remedyRule,omitempty"`
	RequestID  string      `json:"requestID"`
}

type WebhookContent added in v0.9.211

type WebhookContent struct {
	TaskID               string `json:"taskId,omitempty"`
	RemedyTaskName       string `json:"remedyTaskName,omitempty"`
	EventInfo            string `json:"eventInfo,omitempty"`
	InstanceInfo         string `json:"instanceInfo,omitempty"`
	InstanceGroupID      string `json:"instanceGroupId,omitempty"`
	InstanceGroupName    string `json:"instanceGroupName,omitempty"`
	InstanceType         string `json:"instanceType,omitempty"`
	Region               string `json:"region,omitempty"`
	TaskTime             string `json:"taskTime,omitempty"`
	ClusterID            string `json:"clusterId,omitempty"`
	Message              string `json:"message,omitempty"`
	KeepPostPaidInstance bool   `json:"keepPostPaidInstance,omitempty"`
	KeepInstanceCount    bool   `json:"keepInstanceCount,omitempty"`
}

Directories

Path Synopsis
backup
remedy

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL