Documentation
¶
Index ¶
- func AddEntity(entity interface{}) error
- func DeleteChartAndLines(chartId uint32) error
- func DeleteEntity(entity interface{}) error
- func DeleteLines(lineIds []uint32) error
- func GetEntity(entity interface{}) error
- func IsContactNameExist(name string) bool
- func NewMySQL(c *MySQLConfig) error
- func QueryAllEntity(entities interface{}) error
- func QueryUpdateContacts(updated time.Time, contacts *[]AlarmContact) error
- func QueryUpdateRules(updated time.Time, rules *[]AlarmRule) error
- func UpdateEntity(entity interface{}) error
- type AlarmContact
- type AlarmRule
- type Chart
- type Dashboard
- type Entity
- type Line
- type MetricWhiteList
- type MySQLConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeleteChartAndLines ¶
func DeleteEntity ¶
func DeleteEntity(entity interface{}) error
func DeleteLines ¶
func IsContactNameExist ¶
func NewMySQL ¶
func NewMySQL(c *MySQLConfig) error
func QueryAllEntity ¶
func QueryAllEntity(entities interface{}) error
func QueryUpdateContacts ¶
func QueryUpdateContacts(updated time.Time, contacts *[]AlarmContact) error
func UpdateEntity ¶
func UpdateEntity(entity interface{}) error
Types ¶
type AlarmContact ¶
type AlarmContact struct {
Entity
Name string `json:"name"`
Phone string `json:"phone"`
Mail string `json:"mail"`
Wechat string `json:"wechat"`
}
func (AlarmContact) TableName ¶
func (AlarmContact) TableName() string
type AlarmRule ¶
type Chart ¶
type Chart struct {
Entity
DashboardId uint32 `json:"dashboard_id"`
Name string `json:"name"`
Type string `json:"type"`
Aggregation string `json:"aggregation"`
DownSample string `json:"down_sample"`
TopnLimit int `json:"topn_limit"`
}
func QueryDashboardCharts ¶
type Dashboard ¶
type Entity ¶
type Entity struct {
ID uint32 `json:"id"`
Created time.Time `json:"created"`
Updated time.Time `json:"updated"`
IsDeleted int `json:"is_deleted"`
}
Entity all MySQL tables should include these columns, embed this structure to all table entity
func (*Entity) SetTimeNow ¶
func (p *Entity) SetTimeNow()
type Line ¶
type Line struct {
Entity
ChartId uint32 `json:"chart_id"`
Name string `json:"name"`
Metric string `json:"metric"`
Tags string `json:"tags"`
Offset int `json:"offset"`
}
func QueryChatLines ¶
type MetricWhiteList ¶
type MetricWhiteList struct {
Entity
Metric string `json:"metric"`
Creator string `json:"creator"`
AppName string `json:"app_name"`
}
func (MetricWhiteList) TableName ¶
func (MetricWhiteList) TableName() string
Click to show internal directories.
Click to hide internal directories.