Documentation ¶
Index ¶
- Constants
- Variables
- func And(predicates ...predicate.MsgAlert) predicate.MsgAlert
- func AnnotationsIsNil() predicate.MsgAlert
- func AnnotationsNotNil() predicate.MsgAlert
- func CreatedAt(v time.Time) predicate.MsgAlert
- func CreatedAtEQ(v time.Time) predicate.MsgAlert
- func CreatedAtGT(v time.Time) predicate.MsgAlert
- func CreatedAtGTE(v time.Time) predicate.MsgAlert
- func CreatedAtIn(vs ...time.Time) predicate.MsgAlert
- func CreatedAtLT(v time.Time) predicate.MsgAlert
- func CreatedAtLTE(v time.Time) predicate.MsgAlert
- func CreatedAtNEQ(v time.Time) predicate.MsgAlert
- func CreatedAtNotIn(vs ...time.Time) predicate.MsgAlert
- func Deleted(v bool) predicate.MsgAlert
- func DeletedEQ(v bool) predicate.MsgAlert
- func DeletedNEQ(v bool) predicate.MsgAlert
- func EndsAt(v time.Time) predicate.MsgAlert
- func EndsAtEQ(v time.Time) predicate.MsgAlert
- func EndsAtGT(v time.Time) predicate.MsgAlert
- func EndsAtGTE(v time.Time) predicate.MsgAlert
- func EndsAtIn(vs ...time.Time) predicate.MsgAlert
- func EndsAtIsNil() predicate.MsgAlert
- func EndsAtLT(v time.Time) predicate.MsgAlert
- func EndsAtLTE(v time.Time) predicate.MsgAlert
- func EndsAtNEQ(v time.Time) predicate.MsgAlert
- func EndsAtNotIn(vs ...time.Time) predicate.MsgAlert
- func EndsAtNotNil() predicate.MsgAlert
- func Fingerprint(v string) predicate.MsgAlert
- func FingerprintContains(v string) predicate.MsgAlert
- func FingerprintContainsFold(v string) predicate.MsgAlert
- func FingerprintEQ(v string) predicate.MsgAlert
- func FingerprintEqualFold(v string) predicate.MsgAlert
- func FingerprintGT(v string) predicate.MsgAlert
- func FingerprintGTE(v string) predicate.MsgAlert
- func FingerprintHasPrefix(v string) predicate.MsgAlert
- func FingerprintHasSuffix(v string) predicate.MsgAlert
- func FingerprintIn(vs ...string) predicate.MsgAlert
- func FingerprintLT(v string) predicate.MsgAlert
- func FingerprintLTE(v string) predicate.MsgAlert
- func FingerprintNEQ(v string) predicate.MsgAlert
- func FingerprintNotIn(vs ...string) predicate.MsgAlert
- func HasNlog() predicate.MsgAlert
- func HasNlogAlerts() predicate.MsgAlert
- func HasNlogAlertsWith(preds ...predicate.NlogAlert) predicate.MsgAlert
- func HasNlogWith(preds ...predicate.Nlog) predicate.MsgAlert
- func ID(id int) predicate.MsgAlert
- func IDEQ(id int) predicate.MsgAlert
- func IDGT(id int) predicate.MsgAlert
- func IDGTE(id int) predicate.MsgAlert
- func IDIn(ids ...int) predicate.MsgAlert
- func IDLT(id int) predicate.MsgAlert
- func IDLTE(id int) predicate.MsgAlert
- func IDNEQ(id int) predicate.MsgAlert
- func IDNotIn(ids ...int) predicate.MsgAlert
- func LabelsIsNil() predicate.MsgAlert
- func LabelsNotNil() predicate.MsgAlert
- func Not(p predicate.MsgAlert) predicate.MsgAlert
- func Or(predicates ...predicate.MsgAlert) predicate.MsgAlert
- func StartsAt(v time.Time) predicate.MsgAlert
- func StartsAtEQ(v time.Time) predicate.MsgAlert
- func StartsAtGT(v time.Time) predicate.MsgAlert
- func StartsAtGTE(v time.Time) predicate.MsgAlert
- func StartsAtIn(vs ...time.Time) predicate.MsgAlert
- func StartsAtLT(v time.Time) predicate.MsgAlert
- func StartsAtLTE(v time.Time) predicate.MsgAlert
- func StartsAtNEQ(v time.Time) predicate.MsgAlert
- func StartsAtNotIn(vs ...time.Time) predicate.MsgAlert
- func StateEQ(v alert.AlertStatus) predicate.MsgAlert
- func StateIn(vs ...alert.AlertStatus) predicate.MsgAlert
- func StateNEQ(v alert.AlertStatus) predicate.MsgAlert
- func StateNotIn(vs ...alert.AlertStatus) predicate.MsgAlert
- func StateValidator(s alert.AlertStatus) error
- func TenantID(v int) predicate.MsgAlert
- func TenantIDEQ(v int) predicate.MsgAlert
- func TenantIDGT(v int) predicate.MsgAlert
- func TenantIDGTE(v int) predicate.MsgAlert
- func TenantIDIn(vs ...int) predicate.MsgAlert
- func TenantIDLT(v int) predicate.MsgAlert
- func TenantIDLTE(v int) predicate.MsgAlert
- func TenantIDNEQ(v int) predicate.MsgAlert
- func TenantIDNotIn(vs ...int) predicate.MsgAlert
- func Timeout(v bool) predicate.MsgAlert
- func TimeoutEQ(v bool) predicate.MsgAlert
- func TimeoutNEQ(v bool) predicate.MsgAlert
- func URL(v string) predicate.MsgAlert
- func URLContains(v string) predicate.MsgAlert
- func URLContainsFold(v string) predicate.MsgAlert
- func URLEQ(v string) predicate.MsgAlert
- func URLEqualFold(v string) predicate.MsgAlert
- func URLGT(v string) predicate.MsgAlert
- func URLGTE(v string) predicate.MsgAlert
- func URLHasPrefix(v string) predicate.MsgAlert
- func URLHasSuffix(v string) predicate.MsgAlert
- func URLIn(vs ...string) predicate.MsgAlert
- func URLIsNil() predicate.MsgAlert
- func URLLT(v string) predicate.MsgAlert
- func URLLTE(v string) predicate.MsgAlert
- func URLNEQ(v string) predicate.MsgAlert
- func URLNotIn(vs ...string) predicate.MsgAlert
- func URLNotNil() predicate.MsgAlert
- func UpdatedAt(v time.Time) predicate.MsgAlert
- func UpdatedAtEQ(v time.Time) predicate.MsgAlert
- func UpdatedAtGT(v time.Time) predicate.MsgAlert
- func UpdatedAtGTE(v time.Time) predicate.MsgAlert
- func UpdatedAtIn(vs ...time.Time) predicate.MsgAlert
- func UpdatedAtIsNil() predicate.MsgAlert
- func UpdatedAtLT(v time.Time) predicate.MsgAlert
- func UpdatedAtLTE(v time.Time) predicate.MsgAlert
- func UpdatedAtNEQ(v time.Time) predicate.MsgAlert
- func UpdatedAtNotIn(vs ...time.Time) predicate.MsgAlert
- func UpdatedAtNotNil() predicate.MsgAlert
- func ValidColumn(column string) bool
- type OrderOption
- func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption
- func ByDeleted(opts ...sql.OrderTermOption) OrderOption
- func ByEndsAt(opts ...sql.OrderTermOption) OrderOption
- func ByFingerprint(opts ...sql.OrderTermOption) OrderOption
- func ByID(opts ...sql.OrderTermOption) OrderOption
- func ByNlog(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
- func ByNlogAlerts(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
- func ByNlogAlertsCount(opts ...sql.OrderTermOption) OrderOption
- func ByNlogCount(opts ...sql.OrderTermOption) OrderOption
- func ByStartsAt(opts ...sql.OrderTermOption) OrderOption
- func ByState(opts ...sql.OrderTermOption) OrderOption
- func ByTenantID(opts ...sql.OrderTermOption) OrderOption
- func ByTimeout(opts ...sql.OrderTermOption) OrderOption
- func ByURL(opts ...sql.OrderTermOption) OrderOption
- func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption
Constants ¶
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" )
const DefaultState alert.AlertStatus = "none"
Variables ¶
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"
var Columns = []string{ FieldID, FieldTenantID, FieldLabels, FieldAnnotations, FieldStartsAt, FieldEndsAt, FieldURL, FieldTimeout, FieldFingerprint, FieldState, FieldCreatedAt, FieldUpdatedAt, FieldDeleted, }
Columns holds all SQL columns for msgalert fields.
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 AnnotationsIsNil ¶
AnnotationsIsNil applies the IsNil predicate on the "annotations" field.
func AnnotationsNotNil ¶
AnnotationsNotNil applies the NotNil predicate on the "annotations" field.
func CreatedAt ¶
CreatedAt applies equality check predicate on the "created_at" field. It's identical to CreatedAtEQ.
func CreatedAtEQ ¶
CreatedAtEQ applies the EQ predicate on the "created_at" field.
func CreatedAtGT ¶
CreatedAtGT applies the GT predicate on the "created_at" field.
func CreatedAtGTE ¶
CreatedAtGTE applies the GTE predicate on the "created_at" field.
func CreatedAtIn ¶
CreatedAtIn applies the In predicate on the "created_at" field.
func CreatedAtLT ¶
CreatedAtLT applies the LT predicate on the "created_at" field.
func CreatedAtLTE ¶
CreatedAtLTE applies the LTE predicate on the "created_at" field.
func CreatedAtNEQ ¶
CreatedAtNEQ applies the NEQ predicate on the "created_at" field.
func CreatedAtNotIn ¶
CreatedAtNotIn applies the NotIn predicate on the "created_at" field.
func Deleted ¶
Deleted applies equality check predicate on the "deleted" field. It's identical to DeletedEQ.
func DeletedNEQ ¶
DeletedNEQ applies the NEQ predicate on the "deleted" field.
func EndsAt ¶
EndsAt applies equality check predicate on the "ends_at" field. It's identical to EndsAtEQ.
func EndsAtIsNil ¶
EndsAtIsNil applies the IsNil predicate on the "ends_at" field.
func EndsAtNotIn ¶
EndsAtNotIn applies the NotIn predicate on the "ends_at" field.
func EndsAtNotNil ¶
EndsAtNotNil applies the NotNil predicate on the "ends_at" field.
func Fingerprint ¶
Fingerprint applies equality check predicate on the "fingerprint" field. It's identical to FingerprintEQ.
func FingerprintContains ¶
FingerprintContains applies the Contains predicate on the "fingerprint" field.
func FingerprintContainsFold ¶
FingerprintContainsFold applies the ContainsFold predicate on the "fingerprint" field.
func FingerprintEQ ¶
FingerprintEQ applies the EQ predicate on the "fingerprint" field.
func FingerprintEqualFold ¶
FingerprintEqualFold applies the EqualFold predicate on the "fingerprint" field.
func FingerprintGT ¶
FingerprintGT applies the GT predicate on the "fingerprint" field.
func FingerprintGTE ¶
FingerprintGTE applies the GTE predicate on the "fingerprint" field.
func FingerprintHasPrefix ¶
FingerprintHasPrefix applies the HasPrefix predicate on the "fingerprint" field.
func FingerprintHasSuffix ¶
FingerprintHasSuffix applies the HasSuffix predicate on the "fingerprint" field.
func FingerprintIn ¶
FingerprintIn applies the In predicate on the "fingerprint" field.
func FingerprintLT ¶
FingerprintLT applies the LT predicate on the "fingerprint" field.
func FingerprintLTE ¶
FingerprintLTE applies the LTE predicate on the "fingerprint" field.
func FingerprintNEQ ¶
FingerprintNEQ applies the NEQ predicate on the "fingerprint" field.
func FingerprintNotIn ¶
FingerprintNotIn applies the NotIn predicate on the "fingerprint" field.
func HasNlogAlerts ¶
HasNlogAlerts applies the HasEdge predicate on the "nlog_alerts" edge.
func HasNlogAlertsWith ¶
HasNlogAlertsWith applies the HasEdge predicate on the "nlog_alerts" edge with a given conditions (other predicates).
func HasNlogWith ¶
HasNlogWith applies the HasEdge predicate on the "nlog" edge with a given conditions (other predicates).
func LabelsIsNil ¶
LabelsIsNil applies the IsNil predicate on the "labels" field.
func LabelsNotNil ¶
LabelsNotNil applies the NotNil predicate on the "labels" field.
func StartsAt ¶
StartsAt applies equality check predicate on the "starts_at" field. It's identical to StartsAtEQ.
func StartsAtEQ ¶
StartsAtEQ applies the EQ predicate on the "starts_at" field.
func StartsAtGT ¶
StartsAtGT applies the GT predicate on the "starts_at" field.
func StartsAtGTE ¶
StartsAtGTE applies the GTE predicate on the "starts_at" field.
func StartsAtIn ¶
StartsAtIn applies the In predicate on the "starts_at" field.
func StartsAtLT ¶
StartsAtLT applies the LT predicate on the "starts_at" field.
func StartsAtLTE ¶
StartsAtLTE applies the LTE predicate on the "starts_at" field.
func StartsAtNEQ ¶
StartsAtNEQ applies the NEQ predicate on the "starts_at" field.
func StartsAtNotIn ¶
StartsAtNotIn applies the NotIn predicate on the "starts_at" field.
func StateEQ ¶
func StateEQ(v alert.AlertStatus) predicate.MsgAlert
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 ¶
TenantID applies equality check predicate on the "tenant_id" field. It's identical to TenantIDEQ.
func TenantIDEQ ¶
TenantIDEQ applies the EQ predicate on the "tenant_id" field.
func TenantIDGT ¶
TenantIDGT applies the GT predicate on the "tenant_id" field.
func TenantIDGTE ¶
TenantIDGTE applies the GTE predicate on the "tenant_id" field.
func TenantIDIn ¶
TenantIDIn applies the In predicate on the "tenant_id" field.
func TenantIDLT ¶
TenantIDLT applies the LT predicate on the "tenant_id" field.
func TenantIDLTE ¶
TenantIDLTE applies the LTE predicate on the "tenant_id" field.
func TenantIDNEQ ¶
TenantIDNEQ applies the NEQ predicate on the "tenant_id" field.
func TenantIDNotIn ¶
TenantIDNotIn applies the NotIn predicate on the "tenant_id" field.
func Timeout ¶
Timeout applies equality check predicate on the "timeout" field. It's identical to TimeoutEQ.
func TimeoutNEQ ¶
TimeoutNEQ applies the NEQ predicate on the "timeout" field.
func URLContains ¶
URLContains applies the Contains predicate on the "url" field.
func URLContainsFold ¶
URLContainsFold applies the ContainsFold predicate on the "url" field.
func URLEqualFold ¶
URLEqualFold applies the EqualFold predicate on the "url" field.
func URLHasPrefix ¶
URLHasPrefix applies the HasPrefix predicate on the "url" field.
func URLHasSuffix ¶
URLHasSuffix applies the HasSuffix predicate on the "url" field.
func UpdatedAt ¶
UpdatedAt applies equality check predicate on the "updated_at" field. It's identical to UpdatedAtEQ.
func UpdatedAtEQ ¶
UpdatedAtEQ applies the EQ predicate on the "updated_at" field.
func UpdatedAtGT ¶
UpdatedAtGT applies the GT predicate on the "updated_at" field.
func UpdatedAtGTE ¶
UpdatedAtGTE applies the GTE predicate on the "updated_at" field.
func UpdatedAtIn ¶
UpdatedAtIn applies the In predicate on the "updated_at" field.
func UpdatedAtIsNil ¶
UpdatedAtIsNil applies the IsNil predicate on the "updated_at" field.
func UpdatedAtLT ¶
UpdatedAtLT applies the LT predicate on the "updated_at" field.
func UpdatedAtLTE ¶
UpdatedAtLTE applies the LTE predicate on the "updated_at" field.
func UpdatedAtNEQ ¶
UpdatedAtNEQ applies the NEQ predicate on the "updated_at" field.
func UpdatedAtNotIn ¶
UpdatedAtNotIn applies the NotIn predicate on the "updated_at" field.
func UpdatedAtNotNil ¶
UpdatedAtNotNil applies the NotNil predicate on the "updated_at" field.
func ValidColumn ¶
ValidColumn reports if the column name is valid (part of the table columns).
Types ¶
type OrderOption ¶
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.