monitor

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TableMonitor = "sp_monitor"
)

tables name

Variables

This section is empty.

Functions

This section is empty.

Types

type CompatibleTerminusKey

type CompatibleTerminusKey struct {
	TerminusKey        string `gorm:"column:terminus_key"`
	TerminusKeyRuntime string `gorm:"column:terminus_key_runtime"`
}

CompatibleTerminusKey .

type Monitor

type Monitor struct {
	Id                 int       `gorm:"column:id;primary_key"`
	MonitorId          string    `gorm:"column:monitor_id"`
	TerminusKey        string    `gorm:"column:terminus_key"`
	TerminusKeyRuntime string    `gorm:"column:terminus_key_runtime"`
	Workspace          string    `gorm:"column:workspace"`
	RuntimeId          string    `gorm:"column:runtime_id"`
	RuntimeName        string    `gorm:"column:runtime_name"`
	ApplicationId      string    `gorm:"column:application_id"`
	ApplicationName    string    `gorm:"column:application_name"`
	ProjectId          string    `gorm:"column:project_id"`
	ProjectName        string    `gorm:"column:project_name"`
	OrgId              string    `gorm:"column:org_id"`
	OrgName            string    `gorm:"column:org_name"`
	ClusterId          string    `gorm:"column:cluster_id"`
	ClusterName        string    `gorm:"column:cluster_name"`
	Config             string    `gorm:"column:config;default:''"`
	CallbackUrl        string    `gorm:"column:callback_url"`
	Version            string    `gorm:"column:version"`
	Plan               string    `gorm:"column:plan"`
	IsDelete           int       `gorm:"column:is_delete"`
	Created            time.Time `gorm:"column:created;"`
	Updated            time.Time `gorm:"column:updated;"`
}

Monitor .

func (Monitor) TableName

func (Monitor) TableName() string

type MonitorDB

type MonitorDB struct {
	*gorm.DB
}

MoniroeDB .

func (*MonitorDB) GetByFields

func (db *MonitorDB) GetByFields(fields map[string]interface{}) (*Monitor, error)

func (*MonitorDB) GetByTerminusKey

func (db *MonitorDB) GetByTerminusKey(terminusKey string) (*Monitor, error)

GetByTerminusKey .

func (*MonitorDB) GetMonitorByProjectId

func (db *MonitorDB) GetMonitorByProjectId(projectID int64) ([]*Monitor, error)

func (*MonitorDB) GetMonitorByProjectIdAndWorkspace

func (db *MonitorDB) GetMonitorByProjectIdAndWorkspace(projectID int64, workspace string) (*Monitor, error)

func (*MonitorDB) ListCompatibleTKs

func (db *MonitorDB) ListCompatibleTKs() ([]*CompatibleTerminusKey, error)

func (*MonitorDB) UpdateStatusByMonitorId

func (db *MonitorDB) UpdateStatusByMonitorId(monitorId string, delete int) error

Jump to

Keyboard shortcuts

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