repository

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitRepository

func InitRepository()

Types

type Agent

type Agent struct {
	gorm.Model
	IP       string
	Port     int
	HostName string
	HostType string
}

type BackupJob

type BackupJob struct {
	gorm.Model
	StartTime  time.Time
	EndTime    time.Time
	Status     string
	ResourceID uint
	BackendID  uint
	PolicyID   uint
}

type BackupPolicy

type BackupPolicy struct {
	gorm.Model
	ResourceID uint
	Retention  int
	IsCompress bool `gorm:"default:false"`
	AgentID    uint
	Status     string

	ScheduleType string
	Cron         string
	Frequency    int
	StartTime    types.LocalTime
	EndTime      types.LocalTime
	IsActive     bool `gorm:"default:true"`
}

type BackupSet

type BackupSet struct {
	gorm.Model
	DataSetName string
	IsCompress  bool
	IsValid     bool `gorm:"default:false"`
	Size        int
	BackupJobID uint
	BackupTime  time.Time
	ResourceID  uint
	BackendID   uint
	Retention   int
}

type DBResource

type DBResource struct {
	gorm.Model
	Name     string
	DBType   string
	Version  string
	Server   string
	Port     int
	User     string
	Password string
	DBName   string
	Args     string
}

type Repository

type Repository struct {
	*database.Database
}
var Repo *Repository

func New

func New(opts *database.Options) (*Repository, error)

type RestoreDBResource

type RestoreDBResource struct {
	gorm.Model
	Name         string
	DBType       string
	Version      string
	Server       string
	Port         int
	User         string
	Password     string
	DBName       string
	Args         string
	RestoreJobID uint
	IsValid      bool `gorm:"default:false"`
	RestoreTime  time.Time
}

type RestoreJob

type RestoreJob struct {
	gorm.Model
	StartTime   time.Time
	EndTime     time.Time
	Status      string
	BackupSetID uint
}

type S3Backend

type S3Backend struct {
	gorm.Model
	EndPoint    string
	AccessKey   string
	SecretKey   string
	Bucket      string
	StorageType string
	DataType    string
}

type ScheduledJob

type ScheduledJob struct {
	gorm.Model

	JobType        string
	Status         string
	BackupPolicyID uint
}

Jump to

Keyboard shortcuts

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