github.com/chnsz/golangsdk@v0.0.0-20240506093406-85a3fbfa605b/openstack/drs/v3/jobs/results.go (about)

     1  package jobs
     2  
     3  import "github.com/chnsz/golangsdk/openstack/common/tags"
     4  
     5  type CreateResp struct {
     6  	Results []CreateJobResp `json:"results"`
     7  	Count   int             `json:"count"`
     8  }
     9  
    10  type CreateJobResp struct {
    11  	Id         string   `json:"id"`
    12  	ChildIds   []string `json:"child_ids"`
    13  	Name       string   `json:"name"`
    14  	Status     string   `json:"status"`
    15  	CreateTime string   `json:"create_time"`
    16  	ErrorCode  string   `json:"error_code"`
    17  	ErrorMsg   string   `json:"error_msg"`
    18  }
    19  
    20  type StatusResp struct {
    21  	Count   int         `json:"count"`
    22  	Results []JobStatus `json:"results"`
    23  }
    24  
    25  type JobStatus struct {
    26  	Id           string `json:"id"`
    27  	Status       string `json:"status"`
    28  	ErrorCode    string `json:"error_code"`
    29  	ErrorMessage string `json:"error_message"`
    30  }
    31  
    32  type JobDetailResp struct {
    33  	Count   int         `json:"count"`
    34  	Results []JobDetail `json:"results"`
    35  }
    36  
    37  type JobDetail struct {
    38  	Id                       string             `json:"id"`
    39  	ParentId                 string             `json:"parent_id"`
    40  	Name                     string             `json:"name"`
    41  	Status                   string             `json:"status"`
    42  	Description              string             `json:"description"`
    43  	CreateTime               string             `json:"create_time"`
    44  	TaskType                 string             `json:"task_type"`
    45  	SourceEndpoint           Endpoint           `json:"source_endpoint"`
    46  	DmqEndpoint              Endpoint           `json:"dmq_endpoint"`
    47  	SourceSharding           []Endpoint         `json:"source_sharding"`
    48  	TargetEndpoint           Endpoint           `json:"target_endpoint"`
    49  	NetType                  string             `json:"net_type"`
    50  	FailedReason             string             `json:"failed_reason"`
    51  	InstInfo                 InstInfo           `json:"inst_info"`
    52  	ActualStartTime          string             `json:"actual_start_time"`
    53  	FullTransferCompleteTime string             `json:"full_transfer_complete_time"`
    54  	UpdateTime               string             `json:"update_time"`
    55  	JobDirection             string             `json:"job_direction"`
    56  	DbUseType                string             `json:"db_use_type"`
    57  	NeedRestart              bool               `json:"need_restart"`
    58  	IsTargetReadonly         bool               `json:"is_target_readonly"`
    59  	ConflictPolicy           string             `json:"conflict_policy"`
    60  	FilterDdlPolicy          string             `json:"filter_ddl_policy"`
    61  	SpeedLimit               []SpeedLimitInfo   `json:"speed_limit"`
    62  	SchemaType               string             `json:"schema_type"`
    63  	NodeNum                  int                `json:"node_num"`
    64  	ObjectSwitch             bool               `json:"object_switch"`
    65  	ObjectInfos              []ObjectInfo       `json:"object_infos"`
    66  	MasterAz                 string             `json:"master_az"`
    67  	MasterJobId              string             `json:"master_job_id"`
    68  	SlaveAz                  string             `json:"slave_az"`
    69  	FullMode                 string             `json:"full_mode"`
    70  	StructTrans              bool               `json:"struct_trans"`
    71  	IndexTrans               bool               `json:"index_trans"`
    72  	ReplaceDefiner           bool               `json:"replace_definer"`
    73  	MigrateUser              bool               `json:"migrate_user"`
    74  	SyncDatabase             bool               `json:"sync_database"`
    75  	ErrorCode                string             `json:"error_code"`
    76  	ErrorMessage             string             `json:"error_message"`
    77  	TargetRootDb             DefaultRootDb      `json:"target_root_db"`
    78  	AzCode                   string             `json:"az_code"`
    79  	VpcId                    string             `json:"vpc_id"`
    80  	SubnetId                 string             `json:"subnet_id"`
    81  	SecurityGroupId          string             `json:"security_group_id"`
    82  	MultiWrite               bool               `json:"multi_write"`
    83  	SupportIpV6              bool               `json:"support_ip_v6"`
    84  	InheritId                string             `json:"inherit_id"`
    85  	Gtid                     string             `json:"gtid"`
    86  	AlarmNotify              AlarmNotifyInfo    `json:"alarm_notify"`
    87  	IncreStartPosition       string             `json:"incre_start_position"`
    88  	Tags                     []tags.ResourceTag `json:"tags"`
    89  	PeriodOrder              OrderInfo          `json:"period_order"`
    90  }
    91  
    92  type InstInfo struct {
    93  	EngineType string `json:"engine_type"`
    94  	InstType   string `json:"inst_type"`
    95  	Ip         string `json:"ip"`
    96  	PublicIp   string `json:"public_ip"`
    97  	StartTime  string `json:"start_time"`
    98  	Status     string `json:"status"`
    99  	VolumeSize int    `json:"volume_size"`
   100  }
   101  
   102  type ObjectInfo struct {
   103  	Id        string `json:"id"`
   104  	ParentId  string `json:"parent_id"`
   105  	Type      string `json:"type"`
   106  	Name      string `json:"name"`
   107  	AliasName string `json:"alias_name"`
   108  }
   109  
   110  type DefaultRootDb struct {
   111  	DbName     string `json:"db_name"`
   112  	DbEncoding string `json:"db_encoding"`
   113  }
   114  
   115  type OrderInfo struct {
   116  	Status       string `json:"status"`
   117  	OrderId      string `json:"order_id"`
   118  	ChargingMode int    `json:"charging_mode"`
   119  	PeriodType   int    `json:"period_type"`
   120  	PeriodNum    int    `json:"period_num"`
   121  	IsAutoRenew  int    `json:"is_auto_renew"`
   122  	EffTime      string `json:"eff_time"`
   123  	ExpTime      string `json:"exp_time"`
   124  }
   125  
   126  type ActionResp struct {
   127  	Results []ActionResult `json:"results"`
   128  	Count   int            `json:"count"`
   129  }
   130  
   131  type ActionResult struct {
   132  	Id string `json:"id"`
   133  	// success
   134  	// failed
   135  	Status    string `json:"status"`
   136  	ErrorCode string `json:"error_code"`
   137  	ErrorMsg  string `json:"error_msg"`
   138  	// only valid in TestConnection
   139  	Success bool `json:"success"`
   140  }
   141  
   142  type PrecheckResp struct {
   143  	Results []PreCheckDetail `json:"results"`
   144  	Count   int              `json:"count"`
   145  }
   146  
   147  type PreCheckDetail struct {
   148  	Id         string `json:"id"`
   149  	PrecheckId string `json:"precheck_id"`
   150  	Status     string `json:"status"`
   151  	ErrorCode  string `json:"error_code"`
   152  	ErrorMsg   string `json:"error_msg"`
   153  }
   154  
   155  type PrecheckResultResp struct {
   156  	Count   int              `json:"count"`
   157  	Results []PrecheckResult `json:"results"`
   158  }
   159  
   160  type PrecheckResult struct {
   161  	PrecheckId      string      `json:"precheck_id"`
   162  	Result          bool        `json:"result"`
   163  	Process         string      `json:"process"`
   164  	TotalPassedRate string      `json:"total_passed_rate"`
   165  	RdsInstanceId   string      `json:"rds_instance_id"`
   166  	JobDirection    string      `json:"job_direction"`
   167  	PrecheckResult  []CheckItem `json:"precheck_result"`
   168  	ErrorMsg        string      `json:"error_msg"`
   169  	ErrorCode       string      `json:"error_code"`
   170  }
   171  
   172  type CheckItem struct {
   173  	Item          string                 `json:"item"`
   174  	Result        string                 `json:"result"`
   175  	FailedReason  string                 `json:"failed_reason"`
   176  	Data          string                 `json:"data"`
   177  	RawErrorMsg   string                 `json:"raw_error_msg"`
   178  	Group         string                 `json:"group"`
   179  	FailedSubJobs []PrecheckFailSubJobVO `json:"failed_sub_jobs"`
   180  }
   181  
   182  type PrecheckFailSubJobVO struct {
   183  	Id          string `json:"id"`
   184  	Name        string `json:"name"`
   185  	CheckResult string `json:"check_result"`
   186  }
   187  
   188  type JobsListResp struct {
   189  	TotalRecord int       `json:"total_record"`
   190  	Jobs        []JobInfo `json:"jobs"`
   191  }
   192  
   193  type JobInfo struct {
   194  	Id               string            `json:"id"`
   195  	Name             string            `json:"name"`
   196  	Status           string            `json:"status"`
   197  	Description      string            `json:"description"`
   198  	CreateTime       string            `json:"create_time"`
   199  	EngineType       string            `json:"engine_type"`
   200  	NetType          string            `json:"net_type"`
   201  	BillingTag       bool              `json:"billing_tag"`
   202  	JobDirection     string            `json:"job_direction"`
   203  	DbUseType        string            `json:"db_use_type"`
   204  	TaskType         string            `json:"task_type"`
   205  	Children         []ChildrenJobInfo `json:"children"`
   206  	NodeNewFramework bool              `json:"node_newFramework"`
   207  }
   208  
   209  type ChildrenJobInfo struct {
   210  	BillingTag       bool   `json:"billing_tag"`
   211  	CreateTime       string `json:"create_time"`
   212  	DbUseType        string `json:"db_use_type"`
   213  	Description      string `json:"description"`
   214  	EngineType       string `json:"engine_type"`
   215  	ErrorMsg         string `json:"error_msg"`
   216  	Id               string `json:"id"`
   217  	JobDirection     string `json:"job_direction"`
   218  	Name             string `json:"name"`
   219  	NetType          string `json:"net_type"`
   220  	NodeNewFramework bool   `json:"node_newFramework"`
   221  	Status           string `json:"status"`
   222  	TaskType         string `json:"task_type"`
   223  }
   224  
   225  type ProgressResp struct {
   226  	Count   int      `json:"count"`
   227  	Results []Result `json:"results"`
   228  }
   229  
   230  type Result struct {
   231  	JobId                 string                  `json:"job_id"`
   232  	Progress              string                  `json:"progress"`
   233  	IncreTransDelay       string                  `json:"incre_trans_delay"`
   234  	IncreTransDelayMillis string                  `json:"incre_trans_delay_millis"`
   235  	TaskMode              string                  `json:"task_mode"`
   236  	TransferStatus        string                  `json:"transfer_status"`
   237  	ProcessTime           string                  `json:"process_time"`
   238  	RemainingTime         string                  `json:"remaining_time"`
   239  	ProgressMap           map[string]ProgressInfo `json:"progress_map"`
   240  	ErrorCode             string                  `json:"error_code"`
   241  	ErrorMsg              string                  `json:"error_msg"`
   242  }
   243  
   244  type ProgressInfo struct {
   245  	Completed     string `json:"completed"`
   246  	RemainingTime string `json:"remaining_time"`
   247  }