Documentation
¶
Index ¶
- Constants
- Variables
- func EncryptAndBase64Encode(originStr *string) error
- func MarkAuthentication(config *MigrationConfigCommon) error
- func RsaEncrypt(origData []byte) ([]byte, error)
- func SendRequest(cli bce.Client, req *bce.BceRequest, resp *bce.BceResponse) error
- type DailySchedule
- type GetMigrationInfo
- type ListMigrationInfo
- type MigrationBasicInfo
- type MigrationConfigCommon
- type MigrationDestinationConfig
- type MigrationListSourceConfig
- type MigrationPrefixSourceConfig
- type MigrationResInfo
- type MigrationResult
- type MigrationResultCommon
- func DeleteMigration(cli bce.Client, taskId string) (*MigrationResultCommon, error)
- func PauseMigration(cli bce.Client, taskId string) (*MigrationResultCommon, error)
- func ResumeMigration(cli bce.Client, taskId string) (*MigrationResultCommon, error)
- func RetryMigration(cli bce.Client, taskId string) (*MigrationResultCommon, error)
- type MigrationTaskInfo
- type MigrationType
- type PerformanceConfig
- type PostMigrationArgs
- type PostMigrationArgsCommon
- type PostMigrationFromListArgs
- type PostMigrationResult
- type TaskIdList
- type ValidationMethodConfig
- type ValidationResult
Constants ¶
View Source
const ( MIGFRATION_STRATEGY_FORCE_OVERWRITE = "FORCE_OVERWRITE" MIGFRATION_STRATEGY_KEEP_DESTINATION = "KEEP_DESTINATION" STORAGE_CLASS_STANDARD = "STANDARD" STORAGE_CLASS_STANDARD_IA = "STANDARD_IA" STORAGE_CLASS_COLD = "COLD" STORAGE_CLASS_ARCHIVE = "ARCHIVE" STORAGE_CLASS_MAZ_STANDARD = "MAZ_STANDARD" STORAGE_CLASS_MAZ_STANDARD_IA = "MAZ_STANDARD_IA" ACL_STRATEGY_KEEP_BUCKET = "KEEP_BUCKET" ACL_STRATEGY_SAME_AS_SOURCE = "SAME_AS_SOURCE" MIGRATION_TYPE_STOCK = "STOCK" MIGRATION_TYPE_INCREMENTAL = "INCREMENTAL" MIGRATION_MODE_FULLY_MANAGED = "FULLY_MANAGED" MIGRATION_MODE_SEMI_MANAGED = "SEMI_MANAGED" RUNNING_STATUS_WAITING = "WAITING" RUNNING_STATUS_READY_FOR_MIGRATION = "READY_FOR_MIGRATION" RUNNING_STATUS_MIGRATING = "MIGRATING" RUNNING_STATUS_PAUSED = "PAUSED" RUNNING_STATUS_FINISHED = "FINISHED" RUNNING_STATUS_PARTIALLY_FAILED_FINISHED = "PARTIALLY_FAILED_FINISHED" RUNNING_STATUS_FAILED = "FAILED" RUNNING_STATUS_INCREMENTAL_MIGRATING = "INCREMENTAL_MIGRATING" RUNNING_STATUS_RETRYING = "RETRYING" )
Variables ¶
View Source
var RSA_PUBLIC_KEY = []byte(`
-----BEGIN PUBLIC KEY-----
MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQChKcFfV3FEDaOv2gTOOlRYm+Yk
fcKUtI81/B/klSidVRBtaL/d8s0nerJFv39gi42U5DFewKEMTJlWboAdvQfLshsH
D++x62x4XCFeFz7Uc4H30AXNVHLhB6S1oFlYWldjK+EQ/jpOFh+ct86cLf4pnMrp
tqG35j6d4hDDOtqY9wIDAQAB
-----END PUBLIC KEY-----
`)
Functions ¶
func EncryptAndBase64Encode ¶
func MarkAuthentication ¶
func MarkAuthentication(config *MigrationConfigCommon) error
func SendRequest ¶
func SendRequest(cli bce.Client, req *bce.BceRequest, resp *bce.BceResponse) error
Types ¶
type DailySchedule ¶
type GetMigrationInfo ¶
type GetMigrationInfo struct {
MigrationResultCommon
TaskInfos []MigrationTaskInfo `json:"result,omitempty"`
}
func GetMigration ¶
func GetMigration(cli bce.Client, taskId string) (*GetMigrationInfo, error)
type ListMigrationInfo ¶
type ListMigrationInfo struct {
MigrationResultCommon
TaskInfos []MigrationBasicInfo `json:"result,omitempty"`
}
func ListMigration ¶
func ListMigration(cli bce.Client) (*ListMigrationInfo, error)
type MigrationBasicInfo ¶
type MigrationConfigCommon ¶
type MigrationDestinationConfig ¶
type MigrationDestinationConfig struct {
MigrationConfigCommon
Prefix string `json:"prefix,omitempty"`
StorageClass string `json:"storageClass,omitempty"`
Acl string `json:"acl,omitempty"`
}
type MigrationListSourceConfig ¶
type MigrationListSourceConfig struct {
MigrationConfigCommon
ListFileURL []string `json:"listFileURL,omitempty"`
}
type MigrationPrefixSourceConfig ¶
type MigrationPrefixSourceConfig struct {
MigrationConfigCommon
Prefixes []string `json:"prefixes,omitempty"`
Prefix string `json:"prefix,omitempty"`
ObjectBeginTime int64 `json:"objectBeginTime,omitempty"` // default: -1
ObjectEndTime int64 `json:"objectEndTime,omitempty"` // default: -1
}
type MigrationResInfo ¶
type MigrationResInfo struct {
FailObjectListurl []string `json:"failObjectListURLs,omitempty"`
}
type MigrationResult ¶
type MigrationResult struct {
MigrationResultCommon
Result MigrationResInfo `json:"result,omitempty"`
}
func GetMigrationResult ¶
func GetMigrationResult(cli bce.Client, taskId string) (*MigrationResult, error)
type MigrationResultCommon ¶
type MigrationResultCommon struct {
Success bool `json:"success,omitempty"`
Code string `json:"code,omitempty"`
Message string `json:"message,omitempty"`
RequestId string `json:"requestId,omitempty"`
}
func DeleteMigration ¶
func DeleteMigration(cli bce.Client, taskId string) (*MigrationResultCommon, error)
func PauseMigration ¶
func PauseMigration(cli bce.Client, taskId string) (*MigrationResultCommon, error)
func ResumeMigration ¶
func ResumeMigration(cli bce.Client, taskId string) (*MigrationResultCommon, error)
func RetryMigration ¶
func RetryMigration(cli bce.Client, taskId string) (*MigrationResultCommon, error)
type MigrationTaskInfo ¶
type MigrationTaskInfo struct {
MigrationBasicInfo
CreateTime int64 `json:"createTime,omitempty"`
TaskStartTime int64 `json:"taskStartTime,omitempty"`
UpdateTime int64 `json:"updateTime,omitempty"`
ScheduleStartTime int64 `json:"scheduleStartTime,omitempty"`
DailySchedule DailySchedule `json:"dailySchedule,omitempty"`
SourceConfig MigrationPrefixSourceConfig `json:"sourceConfig,omitempty"`
DestinationConfig MigrationDestinationConfig `json:"destinationConfig,omitempty"`
Strategy string `json:"strategy,omitempty"`
MigrationType MigrationType `json:"migrationType,omitempty"`
MigrationMode string `json:"migrationMode,omitempty"`
Qps int64 `json:"qps,omitempty"`
PerformanceSetting []PerformanceConfig `json:"performanceSetting"`
TotalCount int64 `json:"totalCount,omitempty"`
FinishedCount int64 `json:"finishedCount,omitempty"`
FailedCount int64 `json:"failedCount,omitempty"`
TotalBytes int64 `json:"totalBytes,omitempty"`
FinishedBytes int64 `json:"finishedBytes,omitempty"`
ValidationResult ValidationResult `json:"validationResult,omitempty"`
ValidationConfig ValidationMethodConfig `json:"validationMethodConfig,omitempty"`
}
type MigrationType ¶
type PerformanceConfig ¶
type PostMigrationArgs ¶
type PostMigrationArgs struct {
PostMigrationArgsCommon
SourceConfig MigrationPrefixSourceConfig `json:"sourceConfig,omitempty"`
PerformanceSetting []PerformanceConfig `json:"performanceSetting,omitempty"`
NotIncludeContent []string `json:"notIncludeContent,omitempty"`
}
type PostMigrationArgsCommon ¶
type PostMigrationArgsCommon struct {
Name string `json:"name,omitempty"`
ScheduleStartTime int64 `json:"scheduleStartTime,omitempty"` // unix timestamp
DailySchedule DailySchedule `json:"dailySchedule,omitempty"`
DestinationConfig MigrationDestinationConfig `json:"destinationConfig,omitempty"`
Strategy string `json:"strategy,omitempty"`
MigrationType MigrationType `json:"migrationType,omitempty"`
MigrationMode string `json:"migrationMode,omitempty"`
Qps int64 `json:"qps,omitempty"`
ValidationConfig ValidationMethodConfig `json:"validationMethodConfig,omitempty"`
}
type PostMigrationFromListArgs ¶
type PostMigrationFromListArgs struct {
PostMigrationArgsCommon
SourceConfig MigrationListSourceConfig `json:"sourceConfig,omitempty"`
}
type PostMigrationResult ¶
type PostMigrationResult struct {
MigrationResultCommon
Result TaskIdList `json:"result,omitempty"`
}
func PostMigration ¶
func PostMigration(cli bce.Client, args *PostMigrationArgs) (*PostMigrationResult, error)
func PostMigrationFromList ¶
func PostMigrationFromList(cli bce.Client, args *PostMigrationFromListArgs) (*PostMigrationResult, error)
type TaskIdList ¶
type TaskIdList struct {
TaskId []string `json:"taskID,omitempty"`
}
type ValidationMethodConfig ¶
type ValidationResult ¶
Click to show internal directories.
Click to hide internal directories.