silence

package
v0.0.0-...-ce64a08 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Label holds the string label denoting the silence type in the database.
	Label = "silence"
	// FieldID holds the string denoting the id field in the database.
	FieldID = "id"
	// FieldCreatedBy holds the string denoting the created_by field in the database.
	FieldCreatedBy = "created_by"
	// FieldCreatedAt holds the string denoting the created_at field in the database.
	FieldCreatedAt = "created_at"
	// FieldUpdatedBy holds the string denoting the updated_by field in the database.
	FieldUpdatedBy = "updated_by"
	// FieldUpdatedAt holds the string denoting the updated_at field in the database.
	FieldUpdatedAt = "updated_at"
	// FieldTenantID holds the string denoting the tenant_id field in the database.
	FieldTenantID = "tenant_id"
	// FieldMatchers holds the string denoting the matchers field in the database.
	FieldMatchers = "matchers"
	// 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"
	// FieldComments holds the string denoting the comments field in the database.
	FieldComments = "comments"
	// FieldState holds the string denoting the state field in the database.
	FieldState = "state"
	// EdgeUser holds the string denoting the user edge name in mutations.
	EdgeUser = "user"
	// Table holds the table name of the silence in the database.
	Table = "msg_silence"
	// UserTable is the table that holds the user relation/edge.
	UserTable = "msg_silence"
	// UserInverseTable is the table name for the User entity.
	// It exists in this package in order to avoid circular dependency with the "user" package.
	UserInverseTable = "user"
	// UserColumn is the table column denoting the user relation/edge.
	UserColumn = "created_by"
)
View Source
const DefaultState alert.SilenceState = "active"

Variables

View Source
var (
	Hooks        [3]ent.Hook
	Interceptors [1]ent.Interceptor
	// DefaultCreatedAt holds the default value on creation for the "created_at" field.
	DefaultCreatedAt func() time.Time
	// DefaultID holds the default value on creation for the "id" field.
	DefaultID func() int
)

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 silence fields.

Functions

func And

func And(predicates ...predicate.Silence) predicate.Silence

And groups predicates with the AND operator between them.

func Comments

func Comments(v string) predicate.Silence

Comments applies equality check predicate on the "comments" field. It's identical to CommentsEQ.

func CommentsContains

func CommentsContains(v string) predicate.Silence

CommentsContains applies the Contains predicate on the "comments" field.

func CommentsContainsFold

func CommentsContainsFold(v string) predicate.Silence

CommentsContainsFold applies the ContainsFold predicate on the "comments" field.

func CommentsEQ

func CommentsEQ(v string) predicate.Silence

CommentsEQ applies the EQ predicate on the "comments" field.

func CommentsEqualFold

func CommentsEqualFold(v string) predicate.Silence

CommentsEqualFold applies the EqualFold predicate on the "comments" field.

func CommentsGT

func CommentsGT(v string) predicate.Silence

CommentsGT applies the GT predicate on the "comments" field.

func CommentsGTE

func CommentsGTE(v string) predicate.Silence

CommentsGTE applies the GTE predicate on the "comments" field.

func CommentsHasPrefix

func CommentsHasPrefix(v string) predicate.Silence

CommentsHasPrefix applies the HasPrefix predicate on the "comments" field.

func CommentsHasSuffix

func CommentsHasSuffix(v string) predicate.Silence

CommentsHasSuffix applies the HasSuffix predicate on the "comments" field.

func CommentsIn

func CommentsIn(vs ...string) predicate.Silence

CommentsIn applies the In predicate on the "comments" field.

func CommentsIsNil

func CommentsIsNil() predicate.Silence

CommentsIsNil applies the IsNil predicate on the "comments" field.

func CommentsLT

func CommentsLT(v string) predicate.Silence

CommentsLT applies the LT predicate on the "comments" field.

func CommentsLTE

func CommentsLTE(v string) predicate.Silence

CommentsLTE applies the LTE predicate on the "comments" field.

func CommentsNEQ

func CommentsNEQ(v string) predicate.Silence

CommentsNEQ applies the NEQ predicate on the "comments" field.

func CommentsNotIn

func CommentsNotIn(vs ...string) predicate.Silence

CommentsNotIn applies the NotIn predicate on the "comments" field.

func CommentsNotNil

func CommentsNotNil() predicate.Silence

CommentsNotNil applies the NotNil predicate on the "comments" field.

func CreatedAt

func CreatedAt(v time.Time) predicate.Silence

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

func CreatedAtEQ

func CreatedAtEQ(v time.Time) predicate.Silence

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

func CreatedAtGT

func CreatedAtGT(v time.Time) predicate.Silence

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

func CreatedAtGTE

func CreatedAtGTE(v time.Time) predicate.Silence

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

func CreatedAtIn

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

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

func CreatedAtLT

func CreatedAtLT(v time.Time) predicate.Silence

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

func CreatedAtLTE

func CreatedAtLTE(v time.Time) predicate.Silence

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

func CreatedAtNEQ

func CreatedAtNEQ(v time.Time) predicate.Silence

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

func CreatedAtNotIn

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

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

func CreatedBy

func CreatedBy(v int) predicate.Silence

CreatedBy applies equality check predicate on the "created_by" field. It's identical to CreatedByEQ.

func CreatedByEQ

func CreatedByEQ(v int) predicate.Silence

CreatedByEQ applies the EQ predicate on the "created_by" field.

func CreatedByIn

func CreatedByIn(vs ...int) predicate.Silence

CreatedByIn applies the In predicate on the "created_by" field.

func CreatedByNEQ

func CreatedByNEQ(v int) predicate.Silence

CreatedByNEQ applies the NEQ predicate on the "created_by" field.

func CreatedByNotIn

func CreatedByNotIn(vs ...int) predicate.Silence

CreatedByNotIn applies the NotIn predicate on the "created_by" field.

func EndsAt

func EndsAt(v time.Time) predicate.Silence

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

func EndsAtEQ

func EndsAtEQ(v time.Time) predicate.Silence

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

func EndsAtGT

func EndsAtGT(v time.Time) predicate.Silence

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

func EndsAtGTE

func EndsAtGTE(v time.Time) predicate.Silence

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

func EndsAtIn

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

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

func EndsAtLT

func EndsAtLT(v time.Time) predicate.Silence

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

func EndsAtLTE

func EndsAtLTE(v time.Time) predicate.Silence

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

func EndsAtNEQ

func EndsAtNEQ(v time.Time) predicate.Silence

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

func EndsAtNotIn

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

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

func HasUser

func HasUser() predicate.Silence

HasUser applies the HasEdge predicate on the "user" edge.

func HasUserWith

func HasUserWith(preds ...predicate.User) predicate.Silence

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

func ID

func ID(id int) predicate.Silence

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id int) predicate.Silence

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id int) predicate.Silence

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id int) predicate.Silence

IDGTE applies the GTE predicate on the ID field.

func IDIn

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

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id int) predicate.Silence

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id int) predicate.Silence

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id int) predicate.Silence

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

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

IDNotIn applies the NotIn predicate on the ID field.

func MatchersIsNil

func MatchersIsNil() predicate.Silence

MatchersIsNil applies the IsNil predicate on the "matchers" field.

func MatchersNotNil

func MatchersNotNil() predicate.Silence

MatchersNotNil applies the NotNil predicate on the "matchers" field.

func Not

Not applies the not operator on the given predicate.

func Or

func Or(predicates ...predicate.Silence) predicate.Silence

Or groups predicates with the OR operator between them.

func StartsAt

func StartsAt(v time.Time) predicate.Silence

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

func StartsAtEQ

func StartsAtEQ(v time.Time) predicate.Silence

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

func StartsAtGT

func StartsAtGT(v time.Time) predicate.Silence

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

func StartsAtGTE

func StartsAtGTE(v time.Time) predicate.Silence

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

func StartsAtIn

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

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

func StartsAtLT

func StartsAtLT(v time.Time) predicate.Silence

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

func StartsAtLTE

func StartsAtLTE(v time.Time) predicate.Silence

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

func StartsAtNEQ

func StartsAtNEQ(v time.Time) predicate.Silence

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

func StartsAtNotIn

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

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.SilenceState) predicate.Silence

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

func StateNEQ

func StateNEQ(v alert.SilenceState) predicate.Silence

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

func StateNotIn

func StateNotIn(vs ...alert.SilenceState) predicate.Silence

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

func StateValidator

func StateValidator(s alert.SilenceState) 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.Silence

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

func TenantIDEQ

func TenantIDEQ(v int) predicate.Silence

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

func TenantIDGT

func TenantIDGT(v int) predicate.Silence

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

func TenantIDGTE

func TenantIDGTE(v int) predicate.Silence

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

func TenantIDIn

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

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

func TenantIDLT

func TenantIDLT(v int) predicate.Silence

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

func TenantIDLTE

func TenantIDLTE(v int) predicate.Silence

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

func TenantIDNEQ

func TenantIDNEQ(v int) predicate.Silence

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

func TenantIDNotIn

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

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

func UpdatedAt

func UpdatedAt(v time.Time) predicate.Silence

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

func UpdatedAtEQ

func UpdatedAtEQ(v time.Time) predicate.Silence

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

func UpdatedAtGT

func UpdatedAtGT(v time.Time) predicate.Silence

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

func UpdatedAtGTE

func UpdatedAtGTE(v time.Time) predicate.Silence

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

func UpdatedAtIn

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

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

func UpdatedAtIsNil

func UpdatedAtIsNil() predicate.Silence

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

func UpdatedAtLT

func UpdatedAtLT(v time.Time) predicate.Silence

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

func UpdatedAtLTE

func UpdatedAtLTE(v time.Time) predicate.Silence

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

func UpdatedAtNEQ

func UpdatedAtNEQ(v time.Time) predicate.Silence

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

func UpdatedAtNotIn

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

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

func UpdatedAtNotNil

func UpdatedAtNotNil() predicate.Silence

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

func UpdatedBy

func UpdatedBy(v int) predicate.Silence

UpdatedBy applies equality check predicate on the "updated_by" field. It's identical to UpdatedByEQ.

func UpdatedByEQ

func UpdatedByEQ(v int) predicate.Silence

UpdatedByEQ applies the EQ predicate on the "updated_by" field.

func UpdatedByGT

func UpdatedByGT(v int) predicate.Silence

UpdatedByGT applies the GT predicate on the "updated_by" field.

func UpdatedByGTE

func UpdatedByGTE(v int) predicate.Silence

UpdatedByGTE applies the GTE predicate on the "updated_by" field.

func UpdatedByIn

func UpdatedByIn(vs ...int) predicate.Silence

UpdatedByIn applies the In predicate on the "updated_by" field.

func UpdatedByIsNil

func UpdatedByIsNil() predicate.Silence

UpdatedByIsNil applies the IsNil predicate on the "updated_by" field.

func UpdatedByLT

func UpdatedByLT(v int) predicate.Silence

UpdatedByLT applies the LT predicate on the "updated_by" field.

func UpdatedByLTE

func UpdatedByLTE(v int) predicate.Silence

UpdatedByLTE applies the LTE predicate on the "updated_by" field.

func UpdatedByNEQ

func UpdatedByNEQ(v int) predicate.Silence

UpdatedByNEQ applies the NEQ predicate on the "updated_by" field.

func UpdatedByNotIn

func UpdatedByNotIn(vs ...int) predicate.Silence

UpdatedByNotIn applies the NotIn predicate on the "updated_by" field.

func UpdatedByNotNil

func UpdatedByNotNil() predicate.Silence

UpdatedByNotNil applies the NotNil predicate on the "updated_by" 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 Silence queries.

func ByComments

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

ByComments orders the results by the comments field.

func ByCreatedAt

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

ByCreatedAt orders the results by the created_at field.

func ByCreatedBy

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

ByCreatedBy orders the results by the created_by field.

func ByEndsAt

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

ByEndsAt orders the results by the ends_at field.

func ByID

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

ByID orders the results by the id field.

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 ByUpdatedAt

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

ByUpdatedAt orders the results by the updated_at field.

func ByUpdatedBy

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

ByUpdatedBy orders the results by the updated_by field.

func ByUserField

func ByUserField(field string, opts ...sql.OrderTermOption) OrderOption

ByUserField orders the results by user field.

Jump to

Keyboard shortcuts

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