migrate

package
v6.7.3 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DropUniqueFiledLimit added in v6.4.0

func DropUniqueFiledLimit(db *gorm.DB, dst interface{}, uniqueFiled string, pgUniqueFiled string)

func InsertPermPoints added in v6.3.0

func InsertPermPoints(db *gorm.DB)

func Migrate

func Migrate(db *gorm.DB)

func MigrateEsIndexPatternTable

func MigrateEsIndexPatternTable(db *gorm.DB) error

func MigrateTables added in v6.1.0

func MigrateTables(db *gorm.DB) error

Types

type AlertHisEvent added in v6.1.0

type AlertHisEvent struct {
	LastEvalTime int64 `gorm:"column:last_eval_time;bigint(20);not null;default:0;comment:for time filter;index:idx_last_eval_time"`
}

type AlertMute

type AlertMute struct {
	Severities string `gorm:"column:severities;type:varchar(32);not null;default:''"`
}

type AlertRule

type AlertRule struct {
	ExtraConfig string `gorm:"type:text;column:extra_config"` // extra config
}

type AlertSubscribe

type AlertSubscribe struct {
	ExtraConfig string       `gorm:"type:text;column:extra_config"` // extra config
	Severities  string       `gorm:"column:severities;type:varchar(32);not null;default:''"`
	BusiGroups  ormx.JSONArr `gorm:"column:busi_groups;type:varchar(4096);not null;default:'[]'"`
	Note        string       `gorm:"column:note;type:varchar(1024);default:'';comment:note"`
}

type AlertingEngines added in v6.1.0

type AlertingEngines struct {
	EngineCluster string `gorm:"column:engine_cluster;type:varchar(128);default:'';comment:n9e engine cluster"`
}

type ChartShare added in v6.1.0

type ChartShare struct {
	DatasourceId int64 `gorm:"column:datasource_id;bigint(20);not null;default:0;comment:datasource id"`
}

type Configs added in v6.3.0

type Configs struct {
	Note string `gorm:"column:note;type:varchar(1024);default:'';comment:note"`
	Cval string `gorm:"column:cval;type:text;comment:config value"`
	//mysql tinyint//postgresql smallint
	External  int    `gorm:"column:external;type:int;default:0;comment:0\\:built-in 1\\:external"`
	Encrypted int    `gorm:"column:encrypted;type:int;default:0;comment:0\\:plaintext 1\\:ciphertext"`
	CreateAt  int64  `gorm:"column:create_at;type:int;default:0;comment:create_at"`
	CreateBy  string `gorm:"column:create_by;type:varchar(64);default:'';comment:cerate_by"`
	UpdateAt  int64  `gorm:"column:update_at;type:int;default:0;comment:update_at"`
	UpdateBy  string `gorm:"column:update_by;type:varchar(64);default:'';comment:update_by"`
}

type Datasource added in v6.3.0

type Datasource struct {
	IsDefault bool `gorm:"column:is_default;int;not null;default:0;comment:is default datasource"`
}

type EsIndexPattern

type EsIndexPattern struct {
	Id                     int64  `gorm:"primaryKey;type:bigint unsigned"`
	DatasourceId           int64  `gorm:"type:bigint not null default '0';uniqueIndex:idx_ds_name"`
	Name                   string `gorm:"type:varchar(191) not null default '';uniqueIndex:idx_ds_name"`
	TimeField              string `gorm:"type:varchar(128) not null default ''"`
	AllowHideSystemIndices int    `gorm:"type:tinyint(1) not null default 0"`
	FieldsFormat           string `gorm:"type:varchar(4096) not null default ''"`
	CreateAt               int64  `gorm:"type:bigint  default '0'"`
	CreateBy               string `gorm:"type:varchar(64) default ''"`
	UpdateAt               int64  `gorm:"type:bigint  default '0'"`
	UpdateBy               string `gorm:"type:varchar(64) default ''"`
}

type NotifyTpl added in v6.7.0

type NotifyTpl struct {
	CreateAt int64  `gorm:"column:create_at;type:int;default:0;comment:create_at"`
	CreateBy string `gorm:"column:create_by;type:varchar(64);default:'';comment:cerate_by"`
	UpdateAt int64  `gorm:"column:update_at;type:int;default:0;comment:update_at"`
	UpdateBy string `gorm:"column:update_by;type:varchar(64);default:'';comment:update_by"`
}

type RecordingRule

type RecordingRule struct {
	QueryConfigs  string `gorm:"type:text;not null;column:query_configs"` // query_configs
	DatasourceIds string `gorm:"column:datasource_ids;type:varchar(255);default:'';comment:datasource ids"`
}

type Target added in v6.2.0

type Target struct {
	HostIp       string `gorm:"column:host_ip;varchar(15);default:'';comment:IPv4 string;index:idx_host_ip"`
	AgentVersion string `gorm:"column:agent_version;varchar(255);default:'';comment:agent version;index:idx_agent_version"`
}

type TaskRecord added in v6.1.0

type TaskRecord struct {
	EventId int64 `gorm:"column:event_id;bigint(20);not null;default:0;comment:event id;index:idx_event_id"`
}

Jump to

Keyboard shortcuts

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