model

package
v0.0.0-...-83d3498 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNotFound = sqlx.ErrNotFound

Functions

This section is empty.

Types

type AlertRule

type AlertRule struct {
	Id          uint64 `db:"id"`
	Name        string `db:"name"`
	Type        string `db:"type"`
	Group       string `db:"group"`
	Tag         string `db:"tag"`
	To          int64  `db:"to"`
	Expr        string `db:"expr"`
	Operator    string `db:"operator"`
	Value       string `db:"value"`
	For         string `db:"for"`
	AnnoSummary string `db:"anno_summary"`
	AnnoTag     string `db:"anno_tag"`
	AnnoDesc    string `db:"anno_desc"`
	IsWrite     int64  `db:"is_write"`
}

type AlertRuleLabels

type AlertRuleLabels struct {
	Id          uint64 `db:"id"`
	AlertRuleId uint64 `db:"alert_rule_id"`
	Key         string `db:"key"`
	Value       string `db:"value"`
}

type AlertRuleLabelsModel

type AlertRuleLabelsModel interface {
	Trans(ctx context.Context, fn func(ctx context.Context, session sqlx.Session) error) error
	FindByAlertRuleID(ctx context.Context, alertruleid uint64) ([]mm.AlertRuleLabels, error)
	TransFindByAlertRuleID(ctx context.Context, session sqlx.Session, alertruleid uint64) ([]mm.AlertRuleLabels, error)
}

AlertRuleLabelsModel is an interface to be customized, add more methods here, and implement the added methods in customAlertRuleLabelsModel.

func NewAlertRuleLabelsModel

func NewAlertRuleLabelsModel(conn sqlx.SqlConn, c cache.CacheConf) AlertRuleLabelsModel

NewAlertRuleLabelsModel returns a model for the database table.

type AlertRuleModel

type AlertRuleModel interface {
	Trans(ctx context.Context, fn func(ctx context.Context, session sqlx.Session) error) error
	FindPading_NC(ctx context.Context, param PagingAlertRuleParam) ([]AlertRule, error)
	Count_NC(ctx context.Context, param CountAlertRuleParam) (uint64, error)
	// contains filtered or unexported methods
}

AlertRuleModel is an interface to be customized, add more methods here, and implement the added methods in customAlertRuleModel.

func NewAlertRuleModel

func NewAlertRuleModel(conn sqlx.SqlConn, c cache.CacheConf) AlertRuleModel

NewAlertRuleModel returns a model for the database table.

type CountAlertRuleParam

type CountAlertRuleParam struct {
	Search struct {
		Name string
		Type string
	}
}

type PagingAlertRuleParam

type PagingAlertRuleParam struct {
	Page     int64
	PageSize int64
	OrderKey string
	Order    string

	Search struct {
		Name string
		Type string
	}
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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