dao

package
v0.0.0-...-73f8a9c Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const ExecWaitTasksLimit = 5

Variables

View Source
var DB *gorm.DB

Functions

func GetDB

func GetDB() *gorm.DB

Types

type AdminDaoImpl

type AdminDaoImpl struct {
}
var Admin AdminDaoImpl

func (AdminDaoImpl) AddAdmin

func (AdminDaoImpl) AddAdmin(admin *admin.OwlAdmin) (int64, error)

func (AdminDaoImpl) DelAdmin

func (AdminDaoImpl) DelAdmin(id int64) error

func (AdminDaoImpl) GetAdmin

func (AdminDaoImpl) GetAdmin(username string) (*admin.OwlAdmin, error)

func (AdminDaoImpl) ListAdmin

type BackupImpl

type BackupImpl struct {
}
var BackupDAO BackupImpl

func (BackupImpl) AddBackup

func (BackupImpl) AddBackup(backup *task.OwlBackup) (int64, error)

func (BackupImpl) GetBackupInfoById

func (BackupImpl) GetBackupInfoById(id int64) (*task.OwlBackup, error)

func (BackupImpl) UpdateBackup

func (BackupImpl) UpdateBackup(backup *task.OwlBackup) error

type ClusterImpl

type ClusterImpl struct {
}
var Cluster ClusterImpl

func (ClusterImpl) AddCluster

func (ClusterImpl) AddCluster(db *gorm.DB, cluster *db_info.OwlCluster) (int64, error)

func (ClusterImpl) DelCluster

func (ClusterImpl) DelCluster(db *gorm.DB, id int64) error

func (ClusterImpl) GetClusterByName

func (ClusterImpl) GetClusterByName(db *gorm.DB, name string) (*db_info.OwlCluster, error)

func (ClusterImpl) ListAllCluster

func (ClusterImpl) ListAllCluster(db *gorm.DB) ([]db_info.OwlCluster, error)

func (ClusterImpl) ListCluster

func (ClusterImpl) ListCluster(db *gorm.DB, info request.SortPageInfo) ([]db_info.OwlCluster, error)

func (ClusterImpl) UpdateCluster

func (ClusterImpl) UpdateCluster(db *gorm.DB, cluster *db_info.OwlCluster) error

type RuleDaoImpl

type RuleDaoImpl struct {
}
var Rule RuleDaoImpl

func (RuleDaoImpl) ListAllStatus

func (RuleDaoImpl) ListAllStatus() ([]checker.OwlRuleStatus, error)

func (RuleDaoImpl) UpdateRuleStatus

func (RuleDaoImpl) UpdateRuleStatus(ruleStatus *checker.OwlRuleStatus) error

type SubTaskDaoImpl

type SubTaskDaoImpl struct {
}
var SubTask SubTaskDaoImpl

func (SubTaskDaoImpl) DelItem

func (SubTaskDaoImpl) DelItem(item *task.OwlExecItem) error

func (SubTaskDaoImpl) UpdateItem

func (SubTaskDaoImpl) UpdateItem(item *task.OwlExecItem) error

func (SubTaskDaoImpl) UpdateItemByBackupId

func (SubTaskDaoImpl) UpdateItemByBackupId(item *task.OwlExecItem) error

type TaskDaoImpl

type TaskDaoImpl struct {
}
var Task TaskDaoImpl

func (TaskDaoImpl) AddTask

func (TaskDaoImpl) AddTask(task *task.OwlTask) (int64, error)

func (TaskDaoImpl) GetExecWaitTask

func (TaskDaoImpl) GetExecWaitTask() ([]task.OwlTask, int64, error)

func (TaskDaoImpl) GetTask

func (TaskDaoImpl) GetTask(id int64) (*task.OwlTask, error)

func (TaskDaoImpl) ListTask

func (TaskDaoImpl) ListTask(info request.SortPageInfo, isDBA bool, status []task.ItemStatus) ([]task.OwlTask, int64, error)

func (TaskDaoImpl) UpdateTask

func (TaskDaoImpl) UpdateTask(task *task.OwlTask) error

Jump to

Keyboard shortcuts

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