model

package
v0.0.0-...-136905e Latest Latest
Warning

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

Go to latest
Published: May 13, 2024 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Overview

* Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License.

Index

Constants

View Source
const (
	SsBackupStatusWaiting    BackupStatus = "Waiting"
	SsBackupStatusRunning    BackupStatus = "Running"
	SsBackupStatusCompleted  BackupStatus = "Completed"
	SsBackupStatusFailed     BackupStatus = "Failed"
	SsBackupStatusCheckError BackupStatus = "CheckError"
	SsBackupStatusCanceled   BackupStatus = "Canceled"

	DBBackModeFull   DBBackupMode = "FULL"
	DBBackModePTrack DBBackupMode = "PTRACK"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AgentServerStatus

type AgentServerStatus struct {
	IP     string `json:"ip"`
	Port   uint16 `json:"port"`
	Status string `json:"status"`
}

type BackupDetailResp

type BackupDetailResp struct {
	Code int        `json:"code" validate:"required"`
	Msg  string     `json:"msg" validate:"required"`
	Data BackupInfo `json:"data"`
}

type BackupIn

type BackupIn struct {
	DBPort   uint16 `json:"db_port"`
	DBName   string `json:"db_name"`
	Username string `json:"username"`
	Password string `json:"password"`

	DnBackupPath string       `json:"dn_backup_path"`
	DnThreadsNum uint8        `json:"dn_threads_num"`
	DnBackupMode DBBackupMode `json:"dn_backup_mode"`
	Instance     string       `json:"instance"`
}

type BackupInfo

type BackupInfo struct {
	ID        string       `json:"dn_backup_id"`
	Path      string       `json:"dn_backup_path"`
	Mode      string       `json:"db_backup_mode"`
	Instance  string       `json:"instance"`
	StartTime string       `json:"start_time"`
	EndTime   string       `json:"end_time"`
	Status    BackupStatus `json:"status"`
}

type BackupListResp

type BackupListResp struct {
	Code int          `json:"code" validate:"required"`
	Msg  string       `json:"msg" validate:"required"`
	Data []BackupInfo `json:"data"`
}

type BackupMetaInfo

type BackupMetaInfo struct {
	ID         string       `json:"id"`
	CSN        string       `json:"csn"`
	BackupMode DBBackupMode `json:"backup_mode"`
	StartTime  string       `json:"start_time"`
	EndTime    string       `json:"end_time"`
	FileName   string
}

type BackupOut

type BackupOut struct {
	ID string `json:"backup_id"`
}

type BackupOutResp

type BackupOutResp struct {
	Code int       `json:"code" validate:"required"`
	Msg  string    `json:"msg" validate:"required"`
	Data BackupOut `json:"data"`
}

type BackupStatus

type BackupStatus string

type ClusterInfo

type ClusterInfo struct {
	MetaData     MetaData      `json:"meta_data"`
	SnapshotInfo *SnapshotInfo `json:"snapshot_info,omitempty"`
}

type DBBackupMode

type DBBackupMode string

type DataNode

type DataNode struct {
	IP        string       `json:"ip"`
	Port      uint16       `json:"port"`
	Status    BackupStatus `json:"status"`
	BackupID  string       `json:"backup_id"`
	StartTime string       `json:"start_time"`
	EndTime   string       `json:"end_time"`
}

type DeleteBackupIn

type DeleteBackupIn struct {
	DBPort   uint16 `json:"db_port"`
	DBName   string `json:"db_name"`
	Username string `json:"username"`
	Password string `json:"password"`

	DnBackupPath string `json:"dn_backup_path"`
	BackupID     string `json:"backup_id"`
	Instance     string `json:"instance"`
}

type DeleteBackupOut

type DeleteBackupOut struct {
	Code int    `json:"code" validate:"required"`
	Msg  string `json:"msg" validate:"required"`
	Data string `json:"data"`
}

type DeleteBackupResult

type DeleteBackupResult struct {
	IP     string       `json:"ip"`
	Port   uint16       `json:"port"`
	Status BackupStatus `json:"status"`
	Msg    string
}

type DiskSpaceIn

type DiskSpaceIn struct {
	// DiskPath is the path of the disk
	DiskPath string `json:"diskPath"`
}

type DiskSpaceInfo

type DiskSpaceInfo struct {
	Code int    `json:"code" validate:"required"`
	Msg  string `json:"msg" validate:"required"`
	Data string `json:"data"`
}

type DiskSpaceStatus

type DiskSpaceStatus struct {
	IP              string `json:"ip"`
	Path            string `json:"path"`
	DiskSpaceStatus string `json:"diskSpaceStatus"`
}

type HealthCheckIn

type HealthCheckIn struct {
	DBPort   uint16 `json:"db_port"`
	DBName   string `json:"db_name"`
	Username string `json:"username"`
	Password string `json:"password"`
}

type LsBackup

type LsBackup struct {
	Info     *BackupMetaInfo `json:"info"`
	DnList   []*DataNode     `json:"dn_list"`
	SsBackup *SsBackup       `json:"ss_backup"`
}

LsBackup LocalStorageBackup

type MetaData

type MetaData struct {
	Databases map[string]string `json:"databases"`
	Props     string            `json:"props"`
	Rules     string            `json:"rules"`
}

type RestoreIn

type RestoreIn struct {
	DBPort       uint16 `json:"db_port"`
	DBName       string `json:"db_name"`
	Username     string `json:"username"`
	Password     string `json:"password"`
	Instance     string `json:"instance"`
	DnBackupPath string `json:"dn_backup_path"`
	DnBackupID   string `json:"dn_backup_id"`
	DnThreadsNum uint8  `json:"dn_threads_num"`
}

type RestoreResp

type RestoreResp struct {
	Code int    `json:"code" validate:"required"`
	Msg  string `json:"msg" validate:"required"`
}

type RestoreResult

type RestoreResult struct {
	IP     string `json:"ip"`
	Port   uint16 `json:"port"`
	Status string `json:"status"`
}

type ShowDetailIn

type ShowDetailIn struct {
	DBPort       uint16 `json:"db_port"`
	DBName       string `json:"db_name"`
	Username     string `json:"username"`
	Password     string `json:"password"`
	DnBackupID   string `json:"dn_backup_id"`
	DnBackupPath string `json:"dn_backup_path"`
	Instance     string `json:"instance"`
}

type ShowListIn

type ShowListIn struct {
	DBPort       uint16 `json:"db_port"`
	DBName       string `json:"db_name"`
	Username     string `json:"username"`
	Password     string `json:"password"`
	DnBackupPath string `json:"dn_backup_path"`
	Instance     string `json:"instance"`
}

type SnapshotInfo

type SnapshotInfo struct {
	Csn        string `json:"csn"`
	CreateTime string `json:"create_time"`
}

type SsBackup

type SsBackup struct {
	Status       BackupStatus   `json:"status"`
	ClusterInfo  *ClusterInfo   `json:"cluster_info"`
	StorageNodes []*StorageNode `json:"storage_nodes"`
}

type SsBackupInfo

type SsBackupInfo struct {
	ClusterInfo ClusterInfo `json:"cluster_info"`
}

type StorageNode

type StorageNode struct {
	IP       string `json:"ip"`
	Port     uint16 `json:"port,string"`
	Username string `json:"username"`
	Password string `json:"password"`
	Database string `json:"database"`
	Remark   string `json:"remark,omitempty"`
}

type StorageNodesInfo

type StorageNodesInfo struct {
	StorageNodes map[string][]*StorageNode `json:"storage_nodes"`
}

Jump to

Keyboard shortcuts

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