mirror of
https://github.com/crowdsecurity/crowdsec.git
synced 2025-05-15 22:04:03 +02:00
330 lines
12 KiB
Go
330 lines
12 KiB
Go
// Code generated by ent, DO NOT EDIT.
|
|
|
|
package metric
|
|
|
|
import (
|
|
"time"
|
|
|
|
"entgo.io/ent/dialect/sql"
|
|
"github.com/crowdsecurity/crowdsec/pkg/database/ent/predicate"
|
|
)
|
|
|
|
// ID filters vertices based on their ID field.
|
|
func ID(id int) predicate.Metric {
|
|
return predicate.Metric(sql.FieldEQ(FieldID, id))
|
|
}
|
|
|
|
// IDEQ applies the EQ predicate on the ID field.
|
|
func IDEQ(id int) predicate.Metric {
|
|
return predicate.Metric(sql.FieldEQ(FieldID, id))
|
|
}
|
|
|
|
// IDNEQ applies the NEQ predicate on the ID field.
|
|
func IDNEQ(id int) predicate.Metric {
|
|
return predicate.Metric(sql.FieldNEQ(FieldID, id))
|
|
}
|
|
|
|
// IDIn applies the In predicate on the ID field.
|
|
func IDIn(ids ...int) predicate.Metric {
|
|
return predicate.Metric(sql.FieldIn(FieldID, ids...))
|
|
}
|
|
|
|
// IDNotIn applies the NotIn predicate on the ID field.
|
|
func IDNotIn(ids ...int) predicate.Metric {
|
|
return predicate.Metric(sql.FieldNotIn(FieldID, ids...))
|
|
}
|
|
|
|
// IDGT applies the GT predicate on the ID field.
|
|
func IDGT(id int) predicate.Metric {
|
|
return predicate.Metric(sql.FieldGT(FieldID, id))
|
|
}
|
|
|
|
// IDGTE applies the GTE predicate on the ID field.
|
|
func IDGTE(id int) predicate.Metric {
|
|
return predicate.Metric(sql.FieldGTE(FieldID, id))
|
|
}
|
|
|
|
// IDLT applies the LT predicate on the ID field.
|
|
func IDLT(id int) predicate.Metric {
|
|
return predicate.Metric(sql.FieldLT(FieldID, id))
|
|
}
|
|
|
|
// IDLTE applies the LTE predicate on the ID field.
|
|
func IDLTE(id int) predicate.Metric {
|
|
return predicate.Metric(sql.FieldLTE(FieldID, id))
|
|
}
|
|
|
|
// GeneratedBy applies equality check predicate on the "generated_by" field. It's identical to GeneratedByEQ.
|
|
func GeneratedBy(v string) predicate.Metric {
|
|
return predicate.Metric(sql.FieldEQ(FieldGeneratedBy, v))
|
|
}
|
|
|
|
// ReceivedAt applies equality check predicate on the "received_at" field. It's identical to ReceivedAtEQ.
|
|
func ReceivedAt(v time.Time) predicate.Metric {
|
|
return predicate.Metric(sql.FieldEQ(FieldReceivedAt, v))
|
|
}
|
|
|
|
// PushedAt applies equality check predicate on the "pushed_at" field. It's identical to PushedAtEQ.
|
|
func PushedAt(v time.Time) predicate.Metric {
|
|
return predicate.Metric(sql.FieldEQ(FieldPushedAt, v))
|
|
}
|
|
|
|
// Payload applies equality check predicate on the "payload" field. It's identical to PayloadEQ.
|
|
func Payload(v string) predicate.Metric {
|
|
return predicate.Metric(sql.FieldEQ(FieldPayload, v))
|
|
}
|
|
|
|
// GeneratedTypeEQ applies the EQ predicate on the "generated_type" field.
|
|
func GeneratedTypeEQ(v GeneratedType) predicate.Metric {
|
|
return predicate.Metric(sql.FieldEQ(FieldGeneratedType, v))
|
|
}
|
|
|
|
// GeneratedTypeNEQ applies the NEQ predicate on the "generated_type" field.
|
|
func GeneratedTypeNEQ(v GeneratedType) predicate.Metric {
|
|
return predicate.Metric(sql.FieldNEQ(FieldGeneratedType, v))
|
|
}
|
|
|
|
// GeneratedTypeIn applies the In predicate on the "generated_type" field.
|
|
func GeneratedTypeIn(vs ...GeneratedType) predicate.Metric {
|
|
return predicate.Metric(sql.FieldIn(FieldGeneratedType, vs...))
|
|
}
|
|
|
|
// GeneratedTypeNotIn applies the NotIn predicate on the "generated_type" field.
|
|
func GeneratedTypeNotIn(vs ...GeneratedType) predicate.Metric {
|
|
return predicate.Metric(sql.FieldNotIn(FieldGeneratedType, vs...))
|
|
}
|
|
|
|
// GeneratedByEQ applies the EQ predicate on the "generated_by" field.
|
|
func GeneratedByEQ(v string) predicate.Metric {
|
|
return predicate.Metric(sql.FieldEQ(FieldGeneratedBy, v))
|
|
}
|
|
|
|
// GeneratedByNEQ applies the NEQ predicate on the "generated_by" field.
|
|
func GeneratedByNEQ(v string) predicate.Metric {
|
|
return predicate.Metric(sql.FieldNEQ(FieldGeneratedBy, v))
|
|
}
|
|
|
|
// GeneratedByIn applies the In predicate on the "generated_by" field.
|
|
func GeneratedByIn(vs ...string) predicate.Metric {
|
|
return predicate.Metric(sql.FieldIn(FieldGeneratedBy, vs...))
|
|
}
|
|
|
|
// GeneratedByNotIn applies the NotIn predicate on the "generated_by" field.
|
|
func GeneratedByNotIn(vs ...string) predicate.Metric {
|
|
return predicate.Metric(sql.FieldNotIn(FieldGeneratedBy, vs...))
|
|
}
|
|
|
|
// GeneratedByGT applies the GT predicate on the "generated_by" field.
|
|
func GeneratedByGT(v string) predicate.Metric {
|
|
return predicate.Metric(sql.FieldGT(FieldGeneratedBy, v))
|
|
}
|
|
|
|
// GeneratedByGTE applies the GTE predicate on the "generated_by" field.
|
|
func GeneratedByGTE(v string) predicate.Metric {
|
|
return predicate.Metric(sql.FieldGTE(FieldGeneratedBy, v))
|
|
}
|
|
|
|
// GeneratedByLT applies the LT predicate on the "generated_by" field.
|
|
func GeneratedByLT(v string) predicate.Metric {
|
|
return predicate.Metric(sql.FieldLT(FieldGeneratedBy, v))
|
|
}
|
|
|
|
// GeneratedByLTE applies the LTE predicate on the "generated_by" field.
|
|
func GeneratedByLTE(v string) predicate.Metric {
|
|
return predicate.Metric(sql.FieldLTE(FieldGeneratedBy, v))
|
|
}
|
|
|
|
// GeneratedByContains applies the Contains predicate on the "generated_by" field.
|
|
func GeneratedByContains(v string) predicate.Metric {
|
|
return predicate.Metric(sql.FieldContains(FieldGeneratedBy, v))
|
|
}
|
|
|
|
// GeneratedByHasPrefix applies the HasPrefix predicate on the "generated_by" field.
|
|
func GeneratedByHasPrefix(v string) predicate.Metric {
|
|
return predicate.Metric(sql.FieldHasPrefix(FieldGeneratedBy, v))
|
|
}
|
|
|
|
// GeneratedByHasSuffix applies the HasSuffix predicate on the "generated_by" field.
|
|
func GeneratedByHasSuffix(v string) predicate.Metric {
|
|
return predicate.Metric(sql.FieldHasSuffix(FieldGeneratedBy, v))
|
|
}
|
|
|
|
// GeneratedByEqualFold applies the EqualFold predicate on the "generated_by" field.
|
|
func GeneratedByEqualFold(v string) predicate.Metric {
|
|
return predicate.Metric(sql.FieldEqualFold(FieldGeneratedBy, v))
|
|
}
|
|
|
|
// GeneratedByContainsFold applies the ContainsFold predicate on the "generated_by" field.
|
|
func GeneratedByContainsFold(v string) predicate.Metric {
|
|
return predicate.Metric(sql.FieldContainsFold(FieldGeneratedBy, v))
|
|
}
|
|
|
|
// ReceivedAtEQ applies the EQ predicate on the "received_at" field.
|
|
func ReceivedAtEQ(v time.Time) predicate.Metric {
|
|
return predicate.Metric(sql.FieldEQ(FieldReceivedAt, v))
|
|
}
|
|
|
|
// ReceivedAtNEQ applies the NEQ predicate on the "received_at" field.
|
|
func ReceivedAtNEQ(v time.Time) predicate.Metric {
|
|
return predicate.Metric(sql.FieldNEQ(FieldReceivedAt, v))
|
|
}
|
|
|
|
// ReceivedAtIn applies the In predicate on the "received_at" field.
|
|
func ReceivedAtIn(vs ...time.Time) predicate.Metric {
|
|
return predicate.Metric(sql.FieldIn(FieldReceivedAt, vs...))
|
|
}
|
|
|
|
// ReceivedAtNotIn applies the NotIn predicate on the "received_at" field.
|
|
func ReceivedAtNotIn(vs ...time.Time) predicate.Metric {
|
|
return predicate.Metric(sql.FieldNotIn(FieldReceivedAt, vs...))
|
|
}
|
|
|
|
// ReceivedAtGT applies the GT predicate on the "received_at" field.
|
|
func ReceivedAtGT(v time.Time) predicate.Metric {
|
|
return predicate.Metric(sql.FieldGT(FieldReceivedAt, v))
|
|
}
|
|
|
|
// ReceivedAtGTE applies the GTE predicate on the "received_at" field.
|
|
func ReceivedAtGTE(v time.Time) predicate.Metric {
|
|
return predicate.Metric(sql.FieldGTE(FieldReceivedAt, v))
|
|
}
|
|
|
|
// ReceivedAtLT applies the LT predicate on the "received_at" field.
|
|
func ReceivedAtLT(v time.Time) predicate.Metric {
|
|
return predicate.Metric(sql.FieldLT(FieldReceivedAt, v))
|
|
}
|
|
|
|
// ReceivedAtLTE applies the LTE predicate on the "received_at" field.
|
|
func ReceivedAtLTE(v time.Time) predicate.Metric {
|
|
return predicate.Metric(sql.FieldLTE(FieldReceivedAt, v))
|
|
}
|
|
|
|
// PushedAtEQ applies the EQ predicate on the "pushed_at" field.
|
|
func PushedAtEQ(v time.Time) predicate.Metric {
|
|
return predicate.Metric(sql.FieldEQ(FieldPushedAt, v))
|
|
}
|
|
|
|
// PushedAtNEQ applies the NEQ predicate on the "pushed_at" field.
|
|
func PushedAtNEQ(v time.Time) predicate.Metric {
|
|
return predicate.Metric(sql.FieldNEQ(FieldPushedAt, v))
|
|
}
|
|
|
|
// PushedAtIn applies the In predicate on the "pushed_at" field.
|
|
func PushedAtIn(vs ...time.Time) predicate.Metric {
|
|
return predicate.Metric(sql.FieldIn(FieldPushedAt, vs...))
|
|
}
|
|
|
|
// PushedAtNotIn applies the NotIn predicate on the "pushed_at" field.
|
|
func PushedAtNotIn(vs ...time.Time) predicate.Metric {
|
|
return predicate.Metric(sql.FieldNotIn(FieldPushedAt, vs...))
|
|
}
|
|
|
|
// PushedAtGT applies the GT predicate on the "pushed_at" field.
|
|
func PushedAtGT(v time.Time) predicate.Metric {
|
|
return predicate.Metric(sql.FieldGT(FieldPushedAt, v))
|
|
}
|
|
|
|
// PushedAtGTE applies the GTE predicate on the "pushed_at" field.
|
|
func PushedAtGTE(v time.Time) predicate.Metric {
|
|
return predicate.Metric(sql.FieldGTE(FieldPushedAt, v))
|
|
}
|
|
|
|
// PushedAtLT applies the LT predicate on the "pushed_at" field.
|
|
func PushedAtLT(v time.Time) predicate.Metric {
|
|
return predicate.Metric(sql.FieldLT(FieldPushedAt, v))
|
|
}
|
|
|
|
// PushedAtLTE applies the LTE predicate on the "pushed_at" field.
|
|
func PushedAtLTE(v time.Time) predicate.Metric {
|
|
return predicate.Metric(sql.FieldLTE(FieldPushedAt, v))
|
|
}
|
|
|
|
// PushedAtIsNil applies the IsNil predicate on the "pushed_at" field.
|
|
func PushedAtIsNil() predicate.Metric {
|
|
return predicate.Metric(sql.FieldIsNull(FieldPushedAt))
|
|
}
|
|
|
|
// PushedAtNotNil applies the NotNil predicate on the "pushed_at" field.
|
|
func PushedAtNotNil() predicate.Metric {
|
|
return predicate.Metric(sql.FieldNotNull(FieldPushedAt))
|
|
}
|
|
|
|
// PayloadEQ applies the EQ predicate on the "payload" field.
|
|
func PayloadEQ(v string) predicate.Metric {
|
|
return predicate.Metric(sql.FieldEQ(FieldPayload, v))
|
|
}
|
|
|
|
// PayloadNEQ applies the NEQ predicate on the "payload" field.
|
|
func PayloadNEQ(v string) predicate.Metric {
|
|
return predicate.Metric(sql.FieldNEQ(FieldPayload, v))
|
|
}
|
|
|
|
// PayloadIn applies the In predicate on the "payload" field.
|
|
func PayloadIn(vs ...string) predicate.Metric {
|
|
return predicate.Metric(sql.FieldIn(FieldPayload, vs...))
|
|
}
|
|
|
|
// PayloadNotIn applies the NotIn predicate on the "payload" field.
|
|
func PayloadNotIn(vs ...string) predicate.Metric {
|
|
return predicate.Metric(sql.FieldNotIn(FieldPayload, vs...))
|
|
}
|
|
|
|
// PayloadGT applies the GT predicate on the "payload" field.
|
|
func PayloadGT(v string) predicate.Metric {
|
|
return predicate.Metric(sql.FieldGT(FieldPayload, v))
|
|
}
|
|
|
|
// PayloadGTE applies the GTE predicate on the "payload" field.
|
|
func PayloadGTE(v string) predicate.Metric {
|
|
return predicate.Metric(sql.FieldGTE(FieldPayload, v))
|
|
}
|
|
|
|
// PayloadLT applies the LT predicate on the "payload" field.
|
|
func PayloadLT(v string) predicate.Metric {
|
|
return predicate.Metric(sql.FieldLT(FieldPayload, v))
|
|
}
|
|
|
|
// PayloadLTE applies the LTE predicate on the "payload" field.
|
|
func PayloadLTE(v string) predicate.Metric {
|
|
return predicate.Metric(sql.FieldLTE(FieldPayload, v))
|
|
}
|
|
|
|
// PayloadContains applies the Contains predicate on the "payload" field.
|
|
func PayloadContains(v string) predicate.Metric {
|
|
return predicate.Metric(sql.FieldContains(FieldPayload, v))
|
|
}
|
|
|
|
// PayloadHasPrefix applies the HasPrefix predicate on the "payload" field.
|
|
func PayloadHasPrefix(v string) predicate.Metric {
|
|
return predicate.Metric(sql.FieldHasPrefix(FieldPayload, v))
|
|
}
|
|
|
|
// PayloadHasSuffix applies the HasSuffix predicate on the "payload" field.
|
|
func PayloadHasSuffix(v string) predicate.Metric {
|
|
return predicate.Metric(sql.FieldHasSuffix(FieldPayload, v))
|
|
}
|
|
|
|
// PayloadEqualFold applies the EqualFold predicate on the "payload" field.
|
|
func PayloadEqualFold(v string) predicate.Metric {
|
|
return predicate.Metric(sql.FieldEqualFold(FieldPayload, v))
|
|
}
|
|
|
|
// PayloadContainsFold applies the ContainsFold predicate on the "payload" field.
|
|
func PayloadContainsFold(v string) predicate.Metric {
|
|
return predicate.Metric(sql.FieldContainsFold(FieldPayload, v))
|
|
}
|
|
|
|
// And groups predicates with the AND operator between them.
|
|
func And(predicates ...predicate.Metric) predicate.Metric {
|
|
return predicate.Metric(sql.AndPredicates(predicates...))
|
|
}
|
|
|
|
// Or groups predicates with the OR operator between them.
|
|
func Or(predicates ...predicate.Metric) predicate.Metric {
|
|
return predicate.Metric(sql.OrPredicates(predicates...))
|
|
}
|
|
|
|
// Not applies the not operator on the given predicate.
|
|
func Not(p predicate.Metric) predicate.Metric {
|
|
return predicate.Metric(sql.NotPredicates(p))
|
|
}
|