models

package
v0.2.1-0...-d023f04 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2023 License: MPL-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AllocationDetail

type AllocationDetail struct {
	NodeId        string     `json:"node_id"`
	AllocationId  string     `json:"allocation_id"`
	TaskStatus    TaskStatus `json:"task_status"`
	DesiredStatus string     `json:"desired_status"`
}

type BaseResp

type BaseResp struct {
	Message string `json:"message"`
}

func BuildBaseResp

func BuildBaseResp(err error) BaseResp

type BasicTaskProfile

type BasicTaskProfile struct {
	JobBaseInfo       JobBaseInfo         `json:"job_base_info"`
	DtleNodeInfos     []DtleNodeInfo      `json:"dtle_node_infos"`
	ConnectionInfo    ConnectionInfo      `json:"connection_info"`
	Configuration     Configuration       `json:"configuration"`
	ReplicateDoDb     []*DataSourceConfig `json:"replicate_do_db"`
	ReplicateIgnoreDb []*DataSourceConfig `json:"replicate_ignore_db"`
}

type BinlogValidation

type BinlogValidation struct {
	Validated bool `json:"validated"`
	// Error is a string version of any error that may have occured
	Error string `json:"error"`
}

type BufferStat

type BufferStat struct {
	BinlogEventQueueSize int `json:"binlog_event_queue_size"`
	ExtractorTxQueueSize int `json:"extractor_tx_queue_size"`
	ApplierTxQueueSize   int `json:"applier_tx_queue_size"`
	SendByTimeout        int `json:"send_by_timeout"`
	SendBySizeFull       int `json:"send_by_size_full"`
}

type ButtonItem

type ButtonItem struct {
	Action string `json:"action"`
	Uri    string `json:"uri"`
	TextCn string `json:"text_cn"`
	TextEn string `json:"text_en"`
}

type CaptchaRespV2

type CaptchaRespV2 struct {
	Id         string `json:"id"`
	DataScheme string `json:"data_scheme"`
	BaseResp
}

type Configuration

type Configuration struct {
	FailOver   bool      `json:"fail_over"`
	RetryTimes int       `json:"retry_times"`
	SrcConfig  SrcConfig `json:"src_config"`
	DstConfig  DstConfig `json:"dst_config"`
}

type ConnectionInfo

type ConnectionInfo struct {
	SrcDataBase DatabaseConnectionConfig `json:"src_data_base"`
	DstDataBase DatabaseConnectionConfig `json:"dst_data_base"`
	DstKafka    KafkaDestTaskConfig      `json:"dst_kafka"`
}

type ConnectionReqV2

type ConnectionReqV2 struct {
	DatabaseType        string `query:"database_type" validate:"required"`
	ServiceName         string `query:"service_name"`
	Host                string `query:"host" validate:"required"`
	Port                int    `query:"port" validate:"required"`
	User                string `query:"user" validate:"required"`
	Password            string `query:"password" validate:"required"`
	IsPasswordEncrypted bool   `query:"is_password_encrypted"`
}

type ConnectionRespV2

type ConnectionRespV2 struct {
	BaseResp
}

type ConnectionValidation

type ConnectionValidation struct {
	Validated bool `json:"validated"`
	// Error is a string version of any error that may have occured
	Error string `json:"error"`
}

type CreateOrUpdateMysqlToKafkaJobParamV2

type CreateOrUpdateMysqlToKafkaJobParamV2 struct {
	JobId        string `json:"job_id" validate:"required"`
	TaskStepName string `json:"task_step_name"`
	// failover default:true
	Failover            *bool                `json:"failover" example:"true"`
	IsPasswordEncrypted bool                 `json:"is_password_encrypted"`
	SrcTask             *SrcTaskConfig       `json:"src_task" validate:"required"`
	DestTask            *KafkaDestTaskConfig `json:"dest_task" validate:"required"`
	Retry               int                  `json:"retry"`
}

type CreateOrUpdateMysqlToKafkaJobRespV2

type CreateOrUpdateMysqlToKafkaJobRespV2 struct {
	CreateOrUpdateMysqlToKafkaJobParamV2 `json:"job"`
	EvalCreateIndex                      uint64 `json:"eval_create_index"`
	JobModifyIndex                       uint64 `json:"job_modify_index"`
	BaseResp
}

type CreateOrUpdateMysqlToMysqlJobParamV2

type CreateOrUpdateMysqlToMysqlJobParamV2 struct {
	JobId               string          `json:"job_id" validate:"required"`
	TaskStepName        string          `json:"task_step_name"`
	Reverse             bool            `json:"reverse"`
	Failover            *bool           `json:"failover" example:"true"`
	IsPasswordEncrypted bool            `json:"is_password_encrypted"`
	SrcTask             *SrcTaskConfig  `json:"src_task" validate:"required"`
	DestTask            *DestTaskConfig `json:"dest_task" validate:"required"`
	Retry               int             `json:"retry"`
}

type CreateOrUpdateMysqlToMysqlJobRespV2

type CreateOrUpdateMysqlToMysqlJobRespV2 struct {
	CreateOrUpdateMysqlToMysqlJobParamV2 `json:"job"`
	EvalCreateIndex                      uint64 `json:"eval_create_index"`
	JobModifyIndex                       uint64 `json:"job_modify_index"`
	BaseResp
}

type CreateRoleReqV2

type CreateRoleReqV2 struct {
	Tenant              string   `json:"tenant"`
	Name                string   `json:"name"`
	OperationUsers      []string `json:"operation_users"`
	Authority           string   `json:"authority"`
	OperationObjectType string   `json:"operation_object_type"`
}

type CreateRoleRespV2

type CreateRoleRespV2 struct {
	BaseResp
}

type CreateUserReqV2

type CreateUserReqV2 struct {
	Username string `json:"username" validate:"required"`
	Tenant   string `json:"tenant" validate:"required"`
	Role     string `json:"role" validate:"required"`
	Remark   string `json:"remark"`
	PassWord string `json:"pass_word" validate:"required"`
}

type CreateUserRespV2

type CreateUserRespV2 struct {
	BaseResp
}

type CurrentCoordinates

type CurrentCoordinates struct {
	File               string `json:"file"`
	Position           int64  `json:"position"`
	GtidSet            string `json:"gtid_set"`
	RelayMasterLogFile string `json:"relay_master_log_file"`
	ReadMasterLogPos   int64  `json:"read_master_log_pos"`
	RetrievedGtidSet   string `json:"retrieved_gtid_set"`
}

type CurrentUserResp

type CurrentUserResp struct {
	CurrentUser *common.User `json:"current_user"`
	BaseResp
}

type DataSourceConfig

type DataSourceConfig struct {
	TableSchema       string         `json:"table_schema"`
	TableSchemaRegex  string         `json:"table_schema_regex"`
	TableSchemaRename string         `json:"table_schema_rename"`
	Tables            []*TableConfig `json:"tables"`
}

type DatabaseConnectionConfig

type DatabaseConnectionConfig struct {
	Host         string `json:"host" validate:"required"`
	Port         int    `json:"port" validate:"required"`
	User         string `json:"user" validate:"required"`
	Password     string `json:"password" validate:"required"`
	ServiceName  string `json:"service_name"`
	DatabaseType string `json:"database_type" validate:"required"`
}

type DelayCount

type DelayCount struct {
	Num  uint64 `json:"num"`
	Time int64  `json:"time"`
}

type DeleteJobReqV2

type DeleteJobReqV2 struct {
	JobId string `form:"job_id" validate:"required"`
}

type DeleteJobRespV2

type DeleteJobRespV2 struct {
	BaseResp
}

type DeleteRoleReqV2

type DeleteRoleReqV2 struct {
	Name   string `form:"name" validate:"required"`
	Tenant string `form:"tenant" validate:"required"`
}

type DeleteRoleRespV2

type DeleteRoleRespV2 struct {
	BaseResp
}

type DeleteUserReqV2

type DeleteUserReqV2 struct {
	Username string `form:"username" validate:"required"`
	Tenant   string `form:"tenant" validate:"required"`
}

type DeleteUserRespV2

type DeleteUserRespV2 struct {
	BaseResp
}

type DestTaskConfig

type DestTaskConfig struct {
	TaskName            string                    `json:"task_name" validate:"required"`
	NodeId              string                    `json:"node_id,omitempty"`
	DatabaseType        string                    `json:"database_type"`
	MysqlDestTaskConfig *MysqlDestTaskConfig      `json:"mysql_dest_task_config"`
	ConnectionConfig    *DatabaseConnectionConfig `json:"connection_config" validate:"required"`
}

type DiagnosisJobReqV2

type DiagnosisJobReqV2 struct {
	JobId string `query:"job_id" validate:"required"`
}

type DstConfig

type DstConfig struct {
	MysqlDestTaskConfig *MysqlDestTaskConfig `json:"mysql_dest_task_config"`
}

type DtleNodeInfo

type DtleNodeInfo struct {
	NodeAddr   string `json:"node_addr"`
	NodeId     string `json:"node_id"`
	DataSource string `json:"data_source"`
	Source     string `json:"source"`
}

type DumpProgress

type DumpProgress struct {
	ExecRowCount  int64 `json:"exec_row_count"`
	TotalRowCount int64 `json:"total_row_count"`
}

type GetJobPositionReqV2

type GetJobPositionReqV2 struct {
	JobId string `query:"job_id" validate:"required"`
}

type GetTaskProgressReqV2

type GetTaskProgressReqV2 struct {
	AllocationId string `query:"allocation_id" validate:"required"`
	TaskName     string `query:"task_name" validate:"required"`
	// internal usage:
	// the target dtle is the one handling the task specified by task_name.
	// it is expected to forward the api to the target dtle if the current dtle isn't the target dtle
	// nomad_http_address is the http address of the nomad that the target dtle is running with. the target dtle don't has to find out nomad_http_address again by this field
	NomadHttpAddress string `query:"nomad_http_address"`
}

type GetTaskProgressRespV2

type GetTaskProgressRespV2 struct {
	TaskStatus *TaskProgress `json:"tasks_status"`
	BaseResp
}

type GetUserLoginResV2

type GetUserLoginResV2 struct {
	BaseResp
	Data UserLoginResV2 `json:"data"`
}

type GtidModeValidation

type GtidModeValidation struct {
	Validated bool `json:"validated"`
	// Error is a string version of any error that may have occured
	Error string `json:"error"`
}

type JobBaseInfo

type JobBaseInfo struct {
	JobId             string           `json:"job_id"`
	SubscriptionTopic string           `json:"subscription_topic"`
	JobStatus         string           `json:"job_status"`
	JobCreateTime     string           `json:"job_create_time"`
	JobSteps          []common.JobStep `json:"job_steps"`
	Delay             int64            `json:"delay"`
	DumpProgress      *DumpProgress    `json:"dump_progress"`
	JobStage          string           `json:"job_stage"`
}

type JobListReqV2

type JobListReqV2 struct {
	FilterJobType     string `query:"filter_job_type"`
	FilterJobId       string `query:"filter_job_id"`
	FilterJobStatus   string `query:"filter_job_status"`
	FilterJobSrcIP    string `query:"filter_job_src_ip"`
	FilterJobSrcPort  string `query:"filter_job_src_port"`
	FilterJobDestIP   string `query:"filter_job_dest_ip"`
	FilterJobDestPort string `query:"filter_job_dest_port"`
	OrderBy           string `query:"order_by"`
}

type JobListRespV2

type JobListRespV2 struct {
	Jobs []common.JobListItemV2 `json:"jobs"`
	BaseResp
}

type JobPositionResp

type JobPositionResp struct {
	Position string `json:"position"`
	BaseResp
}

type KafkaDestTaskConfig

type KafkaDestTaskConfig struct {
	TaskName            string   `json:"task_name" validate:"required"`
	NodeId              string   `json:"node_id,omitempty"`
	BrokerAddrs         []string `json:"kafka_broker_addrs" validate:"required" example:"127.0.0.1:9092"`
	Topic               string   `json:"kafka_topic" validate:"required"`
	DateTimeZone        string   `json:"kafka_date_time_zone"`
	MessageGroupMaxSize uint64   `json:"message_group_max_size"`
	MessageGroupTimeout uint64   `json:"message_group_timeout"`
}

type KafkaDestTaskDetail

type KafkaDestTaskDetail struct {
	Allocations []AllocationDetail  `json:"allocations"`
	TaskConfig  KafkaDestTaskConfig `json:"task_config"`
}

type ListActionRespV2

type ListActionRespV2 struct {
	Authority []MenuItem `json:"authority"`
	BaseResp
}

type ListColumnsReqV2

type ListColumnsReqV2 struct {
	Host                string `query:"host" validate:"required"`
	Port                int    `query:"port" validate:"required"`
	User                string `query:"user" validate:"required"`
	Password            string `query:"password" validate:"required"`
	CharacterSet        string `query:"character_set"`
	DatabaseType        string `query:"database_type" validate:"required"`
	ServiceName         string `query:"service_name"`
	Schema              string `query:"schema" validate:"required"`
	Table               string `query:"table" validate:"required"`
	IsPasswordEncrypted bool   `query:"is_password_encrypted"`
}

type ListColumnsRespV2

type ListColumnsRespV2 struct {
	Columns []string `json:"columns"`
	BaseResp
}

type ListDatabaseSchemasReqV2

type ListDatabaseSchemasReqV2 struct {
	Host                string `query:"host" validate:"required"`
	Port                int    `query:"port" validate:"required"`
	User                string `query:"user" validate:"required"`
	Password            string `query:"password" validate:"required"`
	DatabaseType        string `query:"database_type" validate:"required"`
	ServiceName         string `query:"service_name"`
	CharacterSet        string `query:"character_set"`
	IsPasswordEncrypted bool   `query:"is_password_encrypted"`
}

type ListMySQLColumnsReqV2

type ListMySQLColumnsReqV2 struct {
	MysqlHost                string `query:"mysql_host" validate:"required"`
	MysqlPort                uint32 `query:"mysql_port" validate:"required"`
	MysqlUser                string `query:"mysql_user" validate:"required"`
	MysqlPassword            string `query:"mysql_password" validate:"required"`
	MysqlCharacterSet        string `query:"mysql_character_set"`
	MysqlSchema              string `query:"mysql_schema" validate:"required"`
	MysqlTable               string `query:"mysql_table" validate:"required"`
	IsMysqlPasswordEncrypted bool   `query:"is_mysql_password_encrypted"`
}

type ListMySQLSchemasReqV2

type ListMySQLSchemasReqV2 struct {
	MysqlHost                string `query:"mysql_host" validate:"required"`
	MysqlPort                uint32 `query:"mysql_port" validate:"required"`
	MysqlUser                string `query:"mysql_user" validate:"required"`
	MysqlPassword            string `query:"mysql_password" validate:"required"`
	MysqlCharacterSet        string `query:"mysql_character_set"`
	IsMysqlPasswordEncrypted bool   `query:"is_mysql_password_encrypted"`
}

type ListMysqlSchemasRespV2

type ListMysqlSchemasRespV2 struct {
	Schemas []*SchemaItem `json:"schemas"`
	BaseResp
}

type ListSchemasRespV2

type ListSchemasRespV2 struct {
	Schemas []*SchemaItem `json:"schemas"`
	BaseResp
}

type LoginWithoutVerifyCodeReqV2

type LoginWithoutVerifyCodeReqV2 struct {
	Tenant   string `json:"tenant" form:"tenant" example:"test" validate:"required"`
	Username string `json:"username" form:"username" example:"test" validate:"required"`
	Password string `json:"password" form:"password" example:"123456" validate:"required"`
}
type MenuItem struct {
	Name       string       `json:"name"`
	TextCn     string       `json:"text_cn"`
	TextEn     string       `json:"text_en"`
	MenuLevel  int          `json:"menu_level"`
	MenuUrl    string       `json:"menu_url"`
	Id         int          `json:"id"`
	ParentId   int          `json:"parent_id"`
	Operations []ButtonItem `json:"operations"`
	AdminOnly  bool         `json:"admin_only"`
}

type MySQLConnectionReqV2

type MySQLConnectionReqV2 struct {
	MysqlHost                string `query:"mysql_host" validate:"required"`
	MysqlPort                uint32 `query:"mysql_port" validate:"required"`
	MysqlUser                string `query:"mysql_user" validate:"required"`
	MysqlPassword            string `query:"mysql_password" validate:"required"`
	IsMysqlPasswordEncrypted bool   `query:"is_mysql_password_encrypted"`
}

type MysqlDestTaskConfig

type MysqlDestTaskConfig struct {
	ParallelWorkers       int  `json:"parallel_workers"`
	UseMySQLDependency    bool `json:"use_my_sql_dependency"`
	DependencyHistorySize int  `json:"dependency_history_size"`
	BulkInsert1           int  `json:"bulk_insert1"`
	BulkInsert2           int  `json:"bulk_insert2"`
	RetryTxLimit          int  `json:"retry_tx_limit"`
	SetGtidNext           bool `json:"set_gtid_next"`
}

type MysqlDestTaskDetail

type MysqlDestTaskDetail struct {
	Allocations []AllocationDetail `json:"allocations"`
	TaskConfig  DestTaskConfig     `json:"task_config"`
}

type MysqlSrcTaskConfig

type MysqlSrcTaskConfig struct {
	ExpandSyntaxSupport bool   `json:"expand_syntax_support"`
	Gtid                string `json:"gtid"`
	BinlogRelay         bool   `json:"binlog_relay"`
	WaitOnJob           string `json:"wait_on_job"`
	AutoGtid            bool   `json:"auto_gtid"`
	DumpEntryLimit      int    `json:"dump_entry_limit"`
	TwoWaySync          bool   `json:"two_way_sync"`
	TwoWaySyncGtid      string `json:"two_way_sync_gtid"`
}

type MysqlTaskValidationReport

type MysqlTaskValidationReport struct {
	TaskName             string                `json:"task_name"`
	ConnectionValidation *ConnectionValidation `json:"connection_validation"`
	PrivilegesValidation *PrivilegesValidation `json:"privileges_validation"`
	GtidModeValidation   *GtidModeValidation   `json:"gtid_mode_validation"`
	ServerIdValidation   *ServerIDValidation   `json:"server_id_validation"`
	BinlogValidation     *BinlogValidation     `json:"binlog_validation"`
}

type MysqlToKafkaJobDetailReqV2

type MysqlToKafkaJobDetailReqV2 struct {
	JobId string `query:"job_id" validate:"required"`
}

type MysqlToKafkaJobDetailRespV2

type MysqlToKafkaJobDetailRespV2 struct {
	BasicTaskProfile BasicTaskProfile `json:"basic_task_profile"`
	TaskLogs         []TaskLog        `json:"task_logs"`
	BaseResp
}

type MysqlToMysqlJobDetailReqV2

type MysqlToMysqlJobDetailReqV2 struct {
	JobId string `query:"job_id" validate:"required"`
}

type MysqlToMysqlJobDetailRespV2

type MysqlToMysqlJobDetailRespV2 struct {
	BasicTaskProfile BasicTaskProfile `json:"basic_task_profile"`
	TaskLogs         []TaskLog        `json:"task_logs"`
	BaseResp
}

type NatsMessageStatistics

type NatsMessageStatistics struct {
	InMsgs     uint64 `json:"in_messages"`
	OutMsgs    uint64 `json:"out_messages"`
	InBytes    uint64 `json:"in_bytes"`
	OutBytes   uint64 `json:"out_bytes"`
	Reconnects uint64 `json:"reconnects"`
}

type NodeListItemV2

type NodeListItemV2 struct {
	NodeAddress           string `json:"node_address"`
	NodeName              string `json:"node_name"`
	NodeId                string `json:"node_id"`
	NodeStatus            string `json:"node_status"`
	NodeStatusDescription string `json:"node_status_description"`
	Datacenter            string `json:"datacenter"`
	NomadVersion          string `json:"nomad_version"`
	DtleVersion           string `json:"dtle_version"`
	Leader                bool   `json:"leader"`
	Member                bool   `json:"member"`
}

type NodeListRespV2

type NodeListRespV2 struct {
	Nodes []NodeListItemV2 `json:"nodes"`
	BaseResp
}

type OracleConfig

type OracleConfig struct {
}

type OracleSrcTaskConfig

type OracleSrcTaskConfig struct {
	Scn int `json:"scn"`
}

type PauseJobReqV2

type PauseJobReqV2 struct {
	JobId string `form:"job_id" validate:"required"`
}

type PauseJobRespV2

type PauseJobRespV2 struct {
	BaseResp
}

type PrivilegesValidation

type PrivilegesValidation struct {
	Validated bool `json:"validated"`
	// Error is a string version of any error that may have occured
	Error string `json:"error"`
}

type ResetPasswordReqV2

type ResetPasswordReqV2 struct {
	Username            string `json:"username" validate:"required"`
	Tenant              string `json:"tenant" validate:"required"`
	Password            string `json:"password" validate:"required"`
	CurrentUserPassword string `json:"current_user_password" validate:"required"`
}

type ResetPasswordRespV2

type ResetPasswordRespV2 struct {
	BaseResp
}

type ResumeJobReqV2

type ResumeJobReqV2 struct {
	JobId string `form:"job_id" validate:"required"`
}

type ResumeJobRespV2

type ResumeJobRespV2 struct {
	BaseResp
}

type ReverseConfig

type ReverseConfig struct {
	SrcUser                  string `json:"src_user"`
	SrcPwd                   string `json:"src_pwd"`
	DestUser                 string `json:"dest_user"`
	DstPwd                   string `json:"dst_pwd"`
	IsMysqlPasswordEncrypted bool   `json:"is_mysql_password_encrypted"`
}

type ReverseJobReq

type ReverseJobReq struct {
	JobId         string         `json:"job_id" validate:"required"`
	ReverseConfig *ReverseConfig `json:"reverse_config"`
}

type ReverseJobResp

type ReverseJobResp struct {
	BaseResp
}

type ReverseStartReqV2

type ReverseStartReqV2 struct {
	JobId string `form:"job_id" validate:"required"`
}

type ReverseStartRespV2

type ReverseStartRespV2 struct {
	BaseResp
}

type RoleListReq

type RoleListReq struct {
	FilterTenant string `query:"filter_tenant"`
}

type RoleListResp

type RoleListResp struct {
	RoleList []*common.Role `json:"role_list"`
	BaseResp
}

type SchemaItem

type SchemaItem struct {
	SchemaName string       `json:"schema_name"`
	Tables     []*TableItem `json:"tables"`
}

type ServerIDValidation

type ServerIDValidation struct {
	Validated bool `json:"validated"`
	// Error is a string version of any error that may have occured
	Error string `json:"error"`
}

type SrcConfig

type SrcConfig struct {
	SkipCreateDbTable   bool                 `json:"skip_create_db_table"`
	DropTableIfExists   bool                 `json:"drop_table_if_exists"`
	MysqlSrcTaskConfig  *MysqlSrcTaskConfig  `json:"mysql_src_task_config"`
	OracleSrcTaskConfig *OracleSrcTaskConfig `json:"oracle_src_task_config"`
	GroupMaxSize        int                  `json:"group_max_size"`
	GroupTimeout        int                  `json:"group_timeout"`
	ReplChanBufferSize  int64                `json:"repl_chan_buffer_size"`
	ChunkSize           int64                `json:"chunk_size"`
	SQLFilter           []string             `json:"sql_filter"`
}

type SrcTaskConfig

type SrcTaskConfig struct {
	TaskName            string                    `json:"task_name" validate:"required"`
	NodeId              string                    `json:"node_id,omitempty"`
	ReplicateDoDb       []*DataSourceConfig       `json:"replicate_do_db"`
	ReplicateIgnoreDb   []*DataSourceConfig       `json:"replicate_ignore_db"`
	SkipCreateDbTable   bool                      `json:"skip_create_db_table"`
	DropTableIfExists   bool                      `json:"drop_table_if_exists"`
	MysqlSrcTaskConfig  *MysqlSrcTaskConfig       `json:"mysql_src_task_config"`
	OracleSrcTaskConfig *OracleSrcTaskConfig      `json:"oracle_src_task_config"`
	GroupMaxSize        int                       `json:"group_max_size"`
	GroupTimeout        int                       `json:"group_timeout"`
	ReplChanBufferSize  int64                     `json:"repl_chan_buffer_size"`
	ChunkSize           int64                     `json:"chunk_size"`
	ConnectionConfig    *DatabaseConnectionConfig `json:"connection_config" validate:"required"`
	SQLFilter           []string                  `json:"sql_filter"`
}

type SrcTaskDetail

type SrcTaskDetail struct {
	Allocations []AllocationDetail `json:"allocations"`
	TaskConfig  SrcTaskConfig      `json:"task_config"`
}

type TableConfig

type TableConfig struct {
	TableName     string   `json:"table_name"`
	TableRegex    string   `json:"table_regex"`
	TableRename   string   `json:"table_rename"`
	ColumnMapFrom []string `json:"column_map_from"`
	ColumnMapTo   []string `json:"column_map_to"`
	Where         string   `json:"where"`
}

type TableItem

type TableItem struct {
	TableName string `json:"table_name"`
}

type TaskEvent

type TaskEvent struct {
	EventType  string `json:"event_type"`
	SetupError string `json:"setup_error"`
	Message    string `json:"message"`
	Time       string `json:"time"`
}

type TaskLog

type TaskLog struct {
	TaskEvents   []TaskEvent `json:"task_events"`
	NodeId       string      `json:"node_id"`
	AllocationId string      `json:"allocation_id"`
	Address      string      `json:"address"`
	Target       string      `json:"target"`
	Status       string      `json:"status"`
}

type TaskProgress

type TaskProgress struct {
	CurrentCoordinates *CurrentCoordinates    `json:"current_coordinates"`
	DelayCount         *DelayCount            `json:"delay_count"`
	ProgressPct        string                 `json:"progress_PCT"`
	ExecMasterRowCount int64                  `json:"exec_master_row_count"`
	ExecMasterTxCount  int64                  `json:"exec_master_tx_count"`
	ReadMasterRowCount int64                  `json:"read_master_row_count"`
	ReadMasterTxCount  int64                  `json:"read_master_tx_count"`
	ETA                string                 `json:"ETA"`
	Backlog            string                 `json:"backlog"`
	ThroughputStat     *ThroughputStat        `json:"throughput_status"`
	NatsMsgStat        *NatsMessageStatistics `json:"nats_message_status"`
	BufferStat         *BufferStat            `json:"buffer_status"`
	Stage              string                 `json:"stage"`
	Timestamp          int64                  `json:"timestamp"`
}

type TaskStatus

type TaskStatus struct {
	TaskEvents []TaskEvent `json:"task_events"`
	StartedAt  time.Time   `json:"started_at"`
	FinishedAt time.Time   `json:"finished_at"`
	Status     string      `json:"status"`
}

type TenantListResp

type TenantListResp struct {
	TenantList []string `json:"tenant_list"`
	BaseResp
}

type ThroughputStat

type ThroughputStat struct {
	Num  uint64 `json:"num"`
	Time uint64 `json:"time"`
}

type UpdataLogLevelReqV2

type UpdataLogLevelReqV2 struct {
	DtleLogLevel string  `form:"dtle_log_level" validate:"required"`
	DebugJob     *string `form:"debug_job"`
}

type UpdataLogLevelRespV2

type UpdataLogLevelRespV2 struct {
	DtleLogLevel string `json:"dtle_log_level"`
	DebugJob     string `json:"debug_job"`
	BaseResp
}

type UpdateRoleReqV2

type UpdateRoleReqV2 struct {
	Tenant              string   `json:"tenant"`
	Name                string   `json:"name"`
	OperationUsers      []string `json:"operation_users"`
	Authority           string   `json:"authority"`
	OperationObjectType string   `json:"operation_object_type"`
}

type UpdateRoleRespV2

type UpdateRoleRespV2 struct {
	BaseResp
}

type UpdateUserReqV2

type UpdateUserReqV2 struct {
	Username string `json:"username" validate:"required"`
	Tenant   string `json:"tenant" validate:"required"`
	Role     string `json:"role" validate:"required"`
	Remark   string `json:"remark"`
}

type UpdateUserRespV2

type UpdateUserRespV2 struct {
	BaseResp
}

type UserListReq

type UserListReq struct {
	FilterUsername string `query:"filter_username"`
	FilterTenant   string `query:"filter_tenant"`
}

type UserListResp

type UserListResp struct {
	UserList []*common.User `json:"user_list"`
	BaseResp
}

type UserLoginReqV2

type UserLoginReqV2 struct {
	Tenant    string `json:"tenant" form:"tenant" example:"test" validate:"required"`
	Username  string `json:"username" form:"username" example:"test" validate:"required"`
	Password  string `json:"password" form:"password" example:"123456" validate:"required"`
	Captcha   string `json:"captcha" form:"captcha" example:"01722" validate:"required"`
	CaptchaId string `json:"captcha_id" form:"captcha_id" example:"Md9kzZQn9xohumhOTc81" validate:"required"`
}

type UserLoginResV2

type UserLoginResV2 struct {
	Token string `json:"token" example:"this is a jwt token string"`
}

type ValidateJobReqV2

type ValidateJobReqV2 struct {
	JobId               string          `json:"job_id" validate:"required"`
	IsPasswordEncrypted bool            `json:"is_password_encrypted"`
	SrcTaskConfig       *SrcTaskConfig  `json:"src_task" validate:"required"`
	DestTaskConfig      *DestTaskConfig `json:"dest_task" validate:"required"`
}

type ValidateJobRespV2

type ValidateJobRespV2 struct {
	// DriverConfigValidated indicates whether the agent validated the driver
	DriverConfigValidated bool `json:"driver_config_validated"`
	// config
	MysqlValidationTasks []*MysqlTaskValidationReport `json:"mysql_task_validation_report"`
	JobValidationError   string                       `json:"job_validation_error"`
	JobValidationWarning string                       `json:"job_validation_warning"`
	BaseResp
}

type VerifyCodeReqV2

type VerifyCodeReqV2 struct {
	CaptchaType string `form:"captcha_type"`
}

VerifyCodeReqV2 json request body.

Jump to

Keyboard shortcuts

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