msgalert

package
v0.0.0-...-9f34937 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Label holds the string label denoting the msgalert type in the database.
	Label = "msg_alert"
	// FieldID holds the string denoting the id field in the database.
	FieldID = "id"
	// FieldTenantID holds the string denoting the tenant_id field in the database.
	FieldTenantID = "tenant_id"
	// FieldLabels holds the string denoting the labels field in the database.
	FieldLabels = "labels"
	// FieldAnnotations holds the string denoting the annotations field in the database.
	FieldAnnotations = "annotations"
	// FieldStartsAt holds the string denoting the starts_at field in the database.
	FieldStartsAt = "starts_at"
	// FieldEndsAt holds the string denoting the ends_at field in the database.
	FieldEndsAt = "ends_at"
	// FieldURL holds the string denoting the url field in the database.
	FieldURL = "url"
	// FieldTimeout holds the string denoting the timeout field in the database.
	FieldTimeout = "timeout"
	// FieldFingerprint holds the string denoting the fingerprint field in the database.
	FieldFingerprint = "fingerprint"
	// FieldState holds the string denoting the state field in the database.
	FieldState = "state"
	// FieldCreatedAt holds the string denoting the created_at field in the database.
	FieldCreatedAt = "created_at"
	// FieldUpdatedAt holds the string denoting the updated_at field in the database.
	FieldUpdatedAt = "updated_at"
	// FieldDeleted holds the string denoting the deleted field in the database.
	FieldDeleted = "deleted"
	// EdgeNlog holds the string denoting the nlog edge name in mutations.
	EdgeNlog = "nlog"
	// EdgeNlogAlerts holds the string denoting the nlog_alerts edge name in mutations.
	EdgeNlogAlerts = "nlog_alerts"
	// Table holds the table name of the msgalert in the database.
	Table = "msg_alert"
	// NlogTable is the table that holds the nlog relation/edge. The primary key declared below.
	NlogTable = "msg_nlog_alert"
	// NlogInverseTable is the table name for the Nlog entity.
	// It exists in this package in order to avoid circular dependency with the "nlog" package.
	NlogInverseTable = "msg_nlog"
	// NlogAlertsTable is the table that holds the nlog_alerts relation/edge.
	NlogAlertsTable = "msg_nlog_alert"
	// NlogAlertsInverseTable is the table name for the NlogAlert entity.
	// It exists in this package in order to avoid circular dependency with the "nlogalert" package.
	NlogAlertsInverseTable = "msg_nlog_alert"
	// NlogAlertsColumn is the table column denoting the nlog_alerts relation/edge.
	NlogAlertsColumn = "alert_id"
)
View Source
const DefaultState alert.AlertStatus = "none"

Variables

View Source
var (
	Hooks        [1]ent.Hook
	Interceptors [1]ent.Interceptor
	// DefaultTimeout holds the default value on creation for the "timeout" field.
	DefaultTimeout bool
	// DefaultCreatedAt holds the default value on creation for the "created_at" field.
	DefaultCreatedAt func() time.Time
	// DefaultDeleted holds the default value on creation for the "deleted" field.
	DefaultDeleted bool
)

Note that the variables below are initialized by the runtime package on the initialization of the application. Therefore, it should be imported in the main as follows:

import _ "github.com/woocoos/msgcenter/ent/runtime"

Columns holds all SQL columns for msgalert fields.

View Source
var (
	// NlogPrimaryKey and NlogColumn2 are the table columns denoting the
	// primary key for the nlog relation (M2M).
	NlogPrimaryKey = []string{"nlog_id", "alert_id"}
)

Functions

func And

func And(predicates ...predicate.MsgAlert) predicate.MsgAlert

And groups predicates with the AND operator between them.

func AnnotationsIsNil

func AnnotationsIsNil() predicate.MsgAlert

AnnotationsIsNil applies the IsNil predicate on the "annotations" field.

func AnnotationsNotNil

func AnnotationsNotNil() predicate.MsgAlert

AnnotationsNotNil applies the NotNil predicate on the "annotations" field.

func CreatedAt

func CreatedAt(v time.Time) predicate.MsgAlert

CreatedAt applies equality check predicate on the "created_at" field. It's identical to CreatedAtEQ.

func CreatedAtEQ

func CreatedAtEQ(v time.Time) predicate.MsgAlert

CreatedAtEQ applies the EQ predicate on the "created_at" field.

func CreatedAtGT

func CreatedAtGT(v time.Time) predicate.MsgAlert

CreatedAtGT applies the GT predicate on the "created_at" field.

func CreatedAtGTE

func CreatedAtGTE(v time.Time) predicate.MsgAlert

CreatedAtGTE applies the GTE predicate on the "created_at" field.

func CreatedAtIn

func CreatedAtIn(vs ...time.Time) predicate.MsgAlert

CreatedAtIn applies the In predicate on the "created_at" field.

func CreatedAtLT

func CreatedAtLT(v time.Time) predicate.MsgAlert

CreatedAtLT applies the LT predicate on the "created_at" field.

func CreatedAtLTE

func CreatedAtLTE(v time.Time) predicate.MsgAlert

CreatedAtLTE applies the LTE predicate on the "created_at" field.

func CreatedAtNEQ

func CreatedAtNEQ(v time.Time) predicate.MsgAlert

CreatedAtNEQ applies the NEQ predicate on the "created_at" field.

func CreatedAtNotIn

func CreatedAtNotIn(vs ...time.Time) predicate.MsgAlert

CreatedAtNotIn applies the NotIn predicate on the "created_at" field.

func Deleted

func Deleted(v bool) predicate.MsgAlert

Deleted applies equality check predicate on the "deleted" field. It's identical to DeletedEQ.

func DeletedEQ

func DeletedEQ(v bool) predicate.MsgAlert

DeletedEQ applies the EQ predicate on the "deleted" field.

func DeletedNEQ

func DeletedNEQ(v bool) predicate.MsgAlert

DeletedNEQ applies the NEQ predicate on the "deleted" field.

func EndsAt

func EndsAt(v time.Time) predicate.MsgAlert

EndsAt applies equality check predicate on the "ends_at" field. It's identical to EndsAtEQ.

func EndsAtEQ

func EndsAtEQ(v time.Time) predicate.MsgAlert

EndsAtEQ applies the EQ predicate on the "ends_at" field.

func EndsAtGT

func EndsAtGT(v time.Time) predicate.MsgAlert

EndsAtGT applies the GT predicate on the "ends_at" field.

func EndsAtGTE

func EndsAtGTE(v time.Time) predicate.MsgAlert

EndsAtGTE applies the GTE predicate on the "ends_at" field.

func EndsAtIn

func EndsAtIn(vs ...time.Time) predicate.MsgAlert

EndsAtIn applies the In predicate on the "ends_at" field.

func EndsAtIsNil

func EndsAtIsNil() predicate.MsgAlert

EndsAtIsNil applies the IsNil predicate on the "ends_at" field.

func EndsAtLT

func EndsAtLT(v time.Time) predicate.MsgAlert

EndsAtLT applies the LT predicate on the "ends_at" field.

func EndsAtLTE

func EndsAtLTE(v time.Time) predicate.MsgAlert

EndsAtLTE applies the LTE predicate on the "ends_at" field.

func EndsAtNEQ

func EndsAtNEQ(v time.Time) predicate.MsgAlert

EndsAtNEQ applies the NEQ predicate on the "ends_at" field.

func EndsAtNotIn

func EndsAtNotIn(vs ...time.Time) predicate.MsgAlert

EndsAtNotIn applies the NotIn predicate on the "ends_at" field.

func EndsAtNotNil

func EndsAtNotNil() predicate.MsgAlert

EndsAtNotNil applies the NotNil predicate on the "ends_at" field.

func Fingerprint

func Fingerprint(v string) predicate.MsgAlert

Fingerprint applies equality check predicate on the "fingerprint" field. It's identical to FingerprintEQ.

func FingerprintContains

func FingerprintContains(v string) predicate.MsgAlert

FingerprintContains applies the Contains predicate on the "fingerprint" field.

func FingerprintContainsFold

func FingerprintContainsFold(v string) predicate.MsgAlert

FingerprintContainsFold applies the ContainsFold predicate on the "fingerprint" field.

func FingerprintEQ

func FingerprintEQ(v string) predicate.MsgAlert

FingerprintEQ applies the EQ predicate on the "fingerprint" field.

func FingerprintEqualFold

func FingerprintEqualFold(v string) predicate.MsgAlert

FingerprintEqualFold applies the EqualFold predicate on the "fingerprint" field.

func FingerprintGT

func FingerprintGT(v string) predicate.MsgAlert

FingerprintGT applies the GT predicate on the "fingerprint" field.

func FingerprintGTE

func FingerprintGTE(v string) predicate.MsgAlert

FingerprintGTE applies the GTE predicate on the "fingerprint" field.

func FingerprintHasPrefix

func FingerprintHasPrefix(v string) predicate.MsgAlert

FingerprintHasPrefix applies the HasPrefix predicate on the "fingerprint" field.

func FingerprintHasSuffix

func FingerprintHasSuffix(v string) predicate.MsgAlert

FingerprintHasSuffix applies the HasSuffix predicate on the "fingerprint" field.

func FingerprintIn

func FingerprintIn(vs ...string) predicate.MsgAlert

FingerprintIn applies the In predicate on the "fingerprint" field.

func FingerprintLT

func FingerprintLT(v string) predicate.MsgAlert

FingerprintLT applies the LT predicate on the "fingerprint" field.

func FingerprintLTE

func FingerprintLTE(v string) predicate.MsgAlert

FingerprintLTE applies the LTE predicate on the "fingerprint" field.

func FingerprintNEQ

func FingerprintNEQ(v string) predicate.MsgAlert

FingerprintNEQ applies the NEQ predicate on the "fingerprint" field.

func FingerprintNotIn

func FingerprintNotIn(vs ...string) predicate.MsgAlert

FingerprintNotIn applies the NotIn predicate on the "fingerprint" field.

func HasNlog

func HasNlog() predicate.MsgAlert

HasNlog applies the HasEdge predicate on the "nlog" edge.

func HasNlogAlerts

func HasNlogAlerts() predicate.MsgAlert

HasNlogAlerts applies the HasEdge predicate on the "nlog_alerts" edge.

func HasNlogAlertsWith

func HasNlogAlertsWith(preds ...predicate.NlogAlert) predicate.MsgAlert

HasNlogAlertsWith applies the HasEdge predicate on the "nlog_alerts" edge with a given conditions (other predicates).

func HasNlogWith

func HasNlogWith(preds ...predicate.Nlog) predicate.MsgAlert

HasNlogWith applies the HasEdge predicate on the "nlog" edge with a given conditions (other predicates).

func ID

func ID(id int) predicate.MsgAlert

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id int) predicate.MsgAlert

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id int) predicate.MsgAlert

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id int) predicate.MsgAlert

IDGTE applies the GTE predicate on the ID field.

func IDIn

func IDIn(ids ...int) predicate.MsgAlert

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id int) predicate.MsgAlert

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id int) predicate.MsgAlert

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id int) predicate.MsgAlert

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

func IDNotIn(ids ...int) predicate.MsgAlert

IDNotIn applies the NotIn predicate on the ID field.

func LabelsIsNil

func LabelsIsNil() predicate.MsgAlert

LabelsIsNil applies the IsNil predicate on the "labels" field.

func LabelsNotNil

func LabelsNotNil() predicate.MsgAlert

LabelsNotNil applies the NotNil predicate on the "labels" field.

func Not

Not applies the not operator on the given predicate.

func Or

func Or(predicates ...predicate.MsgAlert) predicate.MsgAlert

Or groups predicates with the OR operator between them.

func StartsAt

func StartsAt(v time.Time) predicate.MsgAlert

StartsAt applies equality check predicate on the "starts_at" field. It's identical to StartsAtEQ.

func StartsAtEQ

func StartsAtEQ(v time.Time) predicate.MsgAlert

StartsAtEQ applies the EQ predicate on the "starts_at" field.

func StartsAtGT

func StartsAtGT(v time.Time) predicate.MsgAlert

StartsAtGT applies the GT predicate on the "starts_at" field.

func StartsAtGTE

func StartsAtGTE(v time.Time) predicate.MsgAlert

StartsAtGTE applies the GTE predicate on the "starts_at" field.

func StartsAtIn

func StartsAtIn(vs ...time.Time) predicate.MsgAlert

StartsAtIn applies the In predicate on the "starts_at" field.

func StartsAtLT

func StartsAtLT(v time.Time) predicate.MsgAlert

StartsAtLT applies the LT predicate on the "starts_at" field.

func StartsAtLTE

func StartsAtLTE(v time.Time) predicate.MsgAlert

StartsAtLTE applies the LTE predicate on the "starts_at" field.

func StartsAtNEQ

func StartsAtNEQ(v time.Time) predicate.MsgAlert

StartsAtNEQ applies the NEQ predicate on the "starts_at" field.

func StartsAtNotIn

func StartsAtNotIn(vs ...time.Time) predicate.MsgAlert

StartsAtNotIn applies the NotIn predicate on the "starts_at" field.

func StateEQ

StateEQ applies the EQ predicate on the "state" field.

func StateIn

func StateIn(vs ...alert.AlertStatus) predicate.MsgAlert

StateIn applies the In predicate on the "state" field.

func StateNEQ

func StateNEQ(v alert.AlertStatus) predicate.MsgAlert

StateNEQ applies the NEQ predicate on the "state" field.

func StateNotIn

func StateNotIn(vs ...alert.AlertStatus) predicate.MsgAlert

StateNotIn applies the NotIn predicate on the "state" field.

func StateValidator

func StateValidator(s alert.AlertStatus) error

StateValidator is a validator for the "state" field enum values. It is called by the builders before save.

func TenantID

func TenantID(v int) predicate.MsgAlert

TenantID applies equality check predicate on the "tenant_id" field. It's identical to TenantIDEQ.

func TenantIDEQ

func TenantIDEQ(v int) predicate.MsgAlert

TenantIDEQ applies the EQ predicate on the "tenant_id" field.

func TenantIDGT

func TenantIDGT(v int) predicate.MsgAlert

TenantIDGT applies the GT predicate on the "tenant_id" field.

func TenantIDGTE

func TenantIDGTE(v int) predicate.MsgAlert

TenantIDGTE applies the GTE predicate on the "tenant_id" field.

func TenantIDIn

func TenantIDIn(vs ...int) predicate.MsgAlert

TenantIDIn applies the In predicate on the "tenant_id" field.

func TenantIDLT

func TenantIDLT(v int) predicate.MsgAlert

TenantIDLT applies the LT predicate on the "tenant_id" field.

func TenantIDLTE

func TenantIDLTE(v int) predicate.MsgAlert

TenantIDLTE applies the LTE predicate on the "tenant_id" field.

func TenantIDNEQ

func TenantIDNEQ(v int) predicate.MsgAlert

TenantIDNEQ applies the NEQ predicate on the "tenant_id" field.

func TenantIDNotIn

func TenantIDNotIn(vs ...int) predicate.MsgAlert

TenantIDNotIn applies the NotIn predicate on the "tenant_id" field.

func Timeout

func Timeout(v bool) predicate.MsgAlert

Timeout applies equality check predicate on the "timeout" field. It's identical to TimeoutEQ.

func TimeoutEQ

func TimeoutEQ(v bool) predicate.MsgAlert

TimeoutEQ applies the EQ predicate on the "timeout" field.

func TimeoutNEQ

func TimeoutNEQ(v bool) predicate.MsgAlert

TimeoutNEQ applies the NEQ predicate on the "timeout" field.

func URL

func URL(v string) predicate.MsgAlert

URL applies equality check predicate on the "url" field. It's identical to URLEQ.

func URLContains

func URLContains(v string) predicate.MsgAlert

URLContains applies the Contains predicate on the "url" field.

func URLContainsFold

func URLContainsFold(v string) predicate.MsgAlert

URLContainsFold applies the ContainsFold predicate on the "url" field.

func URLEQ

func URLEQ(v string) predicate.MsgAlert

URLEQ applies the EQ predicate on the "url" field.

func URLEqualFold

func URLEqualFold(v string) predicate.MsgAlert

URLEqualFold applies the EqualFold predicate on the "url" field.

func URLGT

func URLGT(v string) predicate.MsgAlert

URLGT applies the GT predicate on the "url" field.

func URLGTE

func URLGTE(v string) predicate.MsgAlert

URLGTE applies the GTE predicate on the "url" field.

func URLHasPrefix

func URLHasPrefix(v string) predicate.MsgAlert

URLHasPrefix applies the HasPrefix predicate on the "url" field.

func URLHasSuffix

func URLHasSuffix(v string) predicate.MsgAlert

URLHasSuffix applies the HasSuffix predicate on the "url" field.

func URLIn

func URLIn(vs ...string) predicate.MsgAlert

URLIn applies the In predicate on the "url" field.

func URLIsNil

func URLIsNil() predicate.MsgAlert

URLIsNil applies the IsNil predicate on the "url" field.

func URLLT

func URLLT(v string) predicate.MsgAlert

URLLT applies the LT predicate on the "url" field.

func URLLTE

func URLLTE(v string) predicate.MsgAlert

URLLTE applies the LTE predicate on the "url" field.

func URLNEQ

func URLNEQ(v string) predicate.MsgAlert

URLNEQ applies the NEQ predicate on the "url" field.

func URLNotIn

func URLNotIn(vs ...string) predicate.MsgAlert

URLNotIn applies the NotIn predicate on the "url" field.

func URLNotNil

func URLNotNil() predicate.MsgAlert

URLNotNil applies the NotNil predicate on the "url" field.

func UpdatedAt

func UpdatedAt(v time.Time) predicate.MsgAlert

UpdatedAt applies equality check predicate on the "updated_at" field. It's identical to UpdatedAtEQ.

func UpdatedAtEQ

func UpdatedAtEQ(v time.Time) predicate.MsgAlert

UpdatedAtEQ applies the EQ predicate on the "updated_at" field.

func UpdatedAtGT

func UpdatedAtGT(v time.Time) predicate.MsgAlert

UpdatedAtGT applies the GT predicate on the "updated_at" field.

func UpdatedAtGTE

func UpdatedAtGTE(v time.Time) predicate.MsgAlert

UpdatedAtGTE applies the GTE predicate on the "updated_at" field.

func UpdatedAtIn

func UpdatedAtIn(vs ...time.Time) predicate.MsgAlert

UpdatedAtIn applies the In predicate on the "updated_at" field.

func UpdatedAtIsNil

func UpdatedAtIsNil() predicate.MsgAlert

UpdatedAtIsNil applies the IsNil predicate on the "updated_at" field.

func UpdatedAtLT

func UpdatedAtLT(v time.Time) predicate.MsgAlert

UpdatedAtLT applies the LT predicate on the "updated_at" field.

func UpdatedAtLTE

func UpdatedAtLTE(v time.Time) predicate.MsgAlert

UpdatedAtLTE applies the LTE predicate on the "updated_at" field.

func UpdatedAtNEQ

func UpdatedAtNEQ(v time.Time) predicate.MsgAlert

UpdatedAtNEQ applies the NEQ predicate on the "updated_at" field.

func UpdatedAtNotIn

func UpdatedAtNotIn(vs ...time.Time) predicate.MsgAlert

UpdatedAtNotIn applies the NotIn predicate on the "updated_at" field.

func UpdatedAtNotNil

func UpdatedAtNotNil() predicate.MsgAlert

UpdatedAtNotNil applies the NotNil predicate on the "updated_at" field.

func ValidColumn

func ValidColumn(column string) bool

ValidColumn reports if the column name is valid (part of the table columns).

Types

type OrderOption

type OrderOption func(*sql.Selector)

OrderOption defines the ordering options for the MsgAlert queries.

func ByCreatedAt

func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption

ByCreatedAt orders the results by the created_at field.

func ByDeleted

func ByDeleted(opts ...sql.OrderTermOption) OrderOption

ByDeleted orders the results by the deleted field.

func ByEndsAt

func ByEndsAt(opts ...sql.OrderTermOption) OrderOption

ByEndsAt orders the results by the ends_at field.

func ByFingerprint

func ByFingerprint(opts ...sql.OrderTermOption) OrderOption

ByFingerprint orders the results by the fingerprint field.

func ByID

func ByID(opts ...sql.OrderTermOption) OrderOption

ByID orders the results by the id field.

func ByNlog

func ByNlog(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption

ByNlog orders the results by nlog terms.

func ByNlogAlerts

func ByNlogAlerts(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption

ByNlogAlerts orders the results by nlog_alerts terms.

func ByNlogAlertsCount

func ByNlogAlertsCount(opts ...sql.OrderTermOption) OrderOption

ByNlogAlertsCount orders the results by nlog_alerts count.

func ByNlogCount

func ByNlogCount(opts ...sql.OrderTermOption) OrderOption

ByNlogCount orders the results by nlog count.

func ByStartsAt

func ByStartsAt(opts ...sql.OrderTermOption) OrderOption

ByStartsAt orders the results by the starts_at field.

func ByState

func ByState(opts ...sql.OrderTermOption) OrderOption

ByState orders the results by the state field.

func ByTenantID

func ByTenantID(opts ...sql.OrderTermOption) OrderOption

ByTenantID orders the results by the tenant_id field.

func ByTimeout

func ByTimeout(opts ...sql.OrderTermOption) OrderOption

ByTimeout orders the results by the timeout field.

func ByURL

func ByURL(opts ...sql.OrderTermOption) OrderOption

ByURL orders the results by the url field.

func ByUpdatedAt

func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption

ByUpdatedAt orders the results by the updated_at field.

Jump to

Keyboard shortcuts

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