notificationrule

package
v1.0.0-beta.174 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Label holds the string label denoting the notificationrule type in the database.
	Label = "notification_rule"
	// FieldID holds the string denoting the id field in the database.
	FieldID = "id"
	// FieldNamespace holds the string denoting the namespace field in the database.
	FieldNamespace = "namespace"
	// 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"
	// FieldDeletedAt holds the string denoting the deleted_at field in the database.
	FieldDeletedAt = "deleted_at"
	// FieldType holds the string denoting the type field in the database.
	FieldType = "type"
	// FieldName holds the string denoting the name field in the database.
	FieldName = "name"
	// FieldDisabled holds the string denoting the disabled field in the database.
	FieldDisabled = "disabled"
	// FieldConfig holds the string denoting the config field in the database.
	FieldConfig = "config"
	// EdgeChannels holds the string denoting the channels edge name in mutations.
	EdgeChannels = "channels"
	// EdgeEvents holds the string denoting the events edge name in mutations.
	EdgeEvents = "events"
	// Table holds the table name of the notificationrule in the database.
	Table = "notification_rules"
	// ChannelsTable is the table that holds the channels relation/edge. The primary key declared below.
	ChannelsTable = "notification_channel_rules"
	// ChannelsInverseTable is the table name for the NotificationChannel entity.
	// It exists in this package in order to avoid circular dependency with the "notificationchannel" package.
	ChannelsInverseTable = "notification_channels"
	// EventsTable is the table that holds the events relation/edge.
	EventsTable = "notification_events"
	// EventsInverseTable is the table name for the NotificationEvent entity.
	// It exists in this package in order to avoid circular dependency with the "notificationevent" package.
	EventsInverseTable = "notification_events"
	// EventsColumn is the table column denoting the events relation/edge.
	EventsColumn = "rule_id"
)

Variables

View Source
var (
	// NamespaceValidator is a validator for the "namespace" field. It is called by the builders before save.
	NamespaceValidator func(string) error
	// DefaultCreatedAt holds the default value on creation for the "created_at" field.
	DefaultCreatedAt func() time.Time
	// DefaultUpdatedAt holds the default value on creation for the "updated_at" field.
	DefaultUpdatedAt func() time.Time
	// UpdateDefaultUpdatedAt holds the default value on update for the "updated_at" field.
	UpdateDefaultUpdatedAt func() time.Time
	// NameValidator is a validator for the "name" field. It is called by the builders before save.
	NameValidator func(string) error
	// DefaultDisabled holds the default value on creation for the "disabled" field.
	DefaultDisabled bool
	// DefaultID holds the default value on creation for the "id" field.
	DefaultID func() string
	// ValueScanner of all NotificationRule fields.
	ValueScanner struct {
		Config field.TypeValueScanner[notification.RuleConfig]
	}
)
View Source
var (
	// ChannelsPrimaryKey and ChannelsColumn2 are the table columns denoting the
	// primary key for the channels relation (M2M).
	ChannelsPrimaryKey = []string{"notification_channel_id", "notification_rule_id"}
)

Columns holds all SQL columns for notificationrule fields.

Functions

func And

And groups predicates with the AND operator between them.

func CreatedAt

func CreatedAt(v time.Time) predicate.NotificationRule

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

func CreatedAtEQ

func CreatedAtEQ(v time.Time) predicate.NotificationRule

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

func CreatedAtGT

func CreatedAtGT(v time.Time) predicate.NotificationRule

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

func CreatedAtGTE

func CreatedAtGTE(v time.Time) predicate.NotificationRule

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

func CreatedAtIn

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

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

func CreatedAtLT

func CreatedAtLT(v time.Time) predicate.NotificationRule

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

func CreatedAtLTE

func CreatedAtLTE(v time.Time) predicate.NotificationRule

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

func CreatedAtNEQ

func CreatedAtNEQ(v time.Time) predicate.NotificationRule

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

func CreatedAtNotIn

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

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

func DeletedAt

func DeletedAt(v time.Time) predicate.NotificationRule

DeletedAt applies equality check predicate on the "deleted_at" field. It's identical to DeletedAtEQ.

func DeletedAtEQ

func DeletedAtEQ(v time.Time) predicate.NotificationRule

DeletedAtEQ applies the EQ predicate on the "deleted_at" field.

func DeletedAtGT

func DeletedAtGT(v time.Time) predicate.NotificationRule

DeletedAtGT applies the GT predicate on the "deleted_at" field.

func DeletedAtGTE

func DeletedAtGTE(v time.Time) predicate.NotificationRule

DeletedAtGTE applies the GTE predicate on the "deleted_at" field.

func DeletedAtIn

func DeletedAtIn(vs ...time.Time) predicate.NotificationRule

DeletedAtIn applies the In predicate on the "deleted_at" field.

func DeletedAtIsNil

func DeletedAtIsNil() predicate.NotificationRule

DeletedAtIsNil applies the IsNil predicate on the "deleted_at" field.

func DeletedAtLT

func DeletedAtLT(v time.Time) predicate.NotificationRule

DeletedAtLT applies the LT predicate on the "deleted_at" field.

func DeletedAtLTE

func DeletedAtLTE(v time.Time) predicate.NotificationRule

DeletedAtLTE applies the LTE predicate on the "deleted_at" field.

func DeletedAtNEQ

func DeletedAtNEQ(v time.Time) predicate.NotificationRule

DeletedAtNEQ applies the NEQ predicate on the "deleted_at" field.

func DeletedAtNotIn

func DeletedAtNotIn(vs ...time.Time) predicate.NotificationRule

DeletedAtNotIn applies the NotIn predicate on the "deleted_at" field.

func DeletedAtNotNil

func DeletedAtNotNil() predicate.NotificationRule

DeletedAtNotNil applies the NotNil predicate on the "deleted_at" field.

func Disabled

func Disabled(v bool) predicate.NotificationRule

Disabled applies equality check predicate on the "disabled" field. It's identical to DisabledEQ.

func DisabledEQ

func DisabledEQ(v bool) predicate.NotificationRule

DisabledEQ applies the EQ predicate on the "disabled" field.

func DisabledIsNil

func DisabledIsNil() predicate.NotificationRule

DisabledIsNil applies the IsNil predicate on the "disabled" field.

func DisabledNEQ

func DisabledNEQ(v bool) predicate.NotificationRule

DisabledNEQ applies the NEQ predicate on the "disabled" field.

func DisabledNotNil

func DisabledNotNil() predicate.NotificationRule

DisabledNotNil applies the NotNil predicate on the "disabled" field.

func HasChannels

func HasChannels() predicate.NotificationRule

HasChannels applies the HasEdge predicate on the "channels" edge.

func HasChannelsWith

func HasChannelsWith(preds ...predicate.NotificationChannel) predicate.NotificationRule

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

func HasEvents

func HasEvents() predicate.NotificationRule

HasEvents applies the HasEdge predicate on the "events" edge.

func HasEventsWith

func HasEventsWith(preds ...predicate.NotificationEvent) predicate.NotificationRule

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

func ID

ID filters vertices based on their ID field.

func IDContainsFold

func IDContainsFold(id string) predicate.NotificationRule

IDContainsFold applies the ContainsFold predicate on the ID field.

func IDEQ

IDEQ applies the EQ predicate on the ID field.

func IDEqualFold

func IDEqualFold(id string) predicate.NotificationRule

IDEqualFold applies the EqualFold predicate on the ID field.

func IDGT

IDGT applies the GT predicate on the ID field.

func IDGTE

IDGTE applies the GTE predicate on the ID field.

func IDIn

func IDIn(ids ...string) predicate.NotificationRule

IDIn applies the In predicate on the ID field.

func IDLT

IDLT applies the LT predicate on the ID field.

func IDLTE

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

func IDNotIn(ids ...string) predicate.NotificationRule

IDNotIn applies the NotIn predicate on the ID field.

func Name

Name applies equality check predicate on the "name" field. It's identical to NameEQ.

func NameContains

func NameContains(v string) predicate.NotificationRule

NameContains applies the Contains predicate on the "name" field.

func NameContainsFold

func NameContainsFold(v string) predicate.NotificationRule

NameContainsFold applies the ContainsFold predicate on the "name" field.

func NameEQ

NameEQ applies the EQ predicate on the "name" field.

func NameEqualFold

func NameEqualFold(v string) predicate.NotificationRule

NameEqualFold applies the EqualFold predicate on the "name" field.

func NameGT

NameGT applies the GT predicate on the "name" field.

func NameGTE

NameGTE applies the GTE predicate on the "name" field.

func NameHasPrefix

func NameHasPrefix(v string) predicate.NotificationRule

NameHasPrefix applies the HasPrefix predicate on the "name" field.

func NameHasSuffix

func NameHasSuffix(v string) predicate.NotificationRule

NameHasSuffix applies the HasSuffix predicate on the "name" field.

func NameIn

func NameIn(vs ...string) predicate.NotificationRule

NameIn applies the In predicate on the "name" field.

func NameLT

NameLT applies the LT predicate on the "name" field.

func NameLTE

NameLTE applies the LTE predicate on the "name" field.

func NameNEQ

NameNEQ applies the NEQ predicate on the "name" field.

func NameNotIn

func NameNotIn(vs ...string) predicate.NotificationRule

NameNotIn applies the NotIn predicate on the "name" field.

func Namespace

func Namespace(v string) predicate.NotificationRule

Namespace applies equality check predicate on the "namespace" field. It's identical to NamespaceEQ.

func NamespaceContains

func NamespaceContains(v string) predicate.NotificationRule

NamespaceContains applies the Contains predicate on the "namespace" field.

func NamespaceContainsFold

func NamespaceContainsFold(v string) predicate.NotificationRule

NamespaceContainsFold applies the ContainsFold predicate on the "namespace" field.

func NamespaceEQ

func NamespaceEQ(v string) predicate.NotificationRule

NamespaceEQ applies the EQ predicate on the "namespace" field.

func NamespaceEqualFold

func NamespaceEqualFold(v string) predicate.NotificationRule

NamespaceEqualFold applies the EqualFold predicate on the "namespace" field.

func NamespaceGT

func NamespaceGT(v string) predicate.NotificationRule

NamespaceGT applies the GT predicate on the "namespace" field.

func NamespaceGTE

func NamespaceGTE(v string) predicate.NotificationRule

NamespaceGTE applies the GTE predicate on the "namespace" field.

func NamespaceHasPrefix

func NamespaceHasPrefix(v string) predicate.NotificationRule

NamespaceHasPrefix applies the HasPrefix predicate on the "namespace" field.

func NamespaceHasSuffix

func NamespaceHasSuffix(v string) predicate.NotificationRule

NamespaceHasSuffix applies the HasSuffix predicate on the "namespace" field.

func NamespaceIn

func NamespaceIn(vs ...string) predicate.NotificationRule

NamespaceIn applies the In predicate on the "namespace" field.

func NamespaceLT

func NamespaceLT(v string) predicate.NotificationRule

NamespaceLT applies the LT predicate on the "namespace" field.

func NamespaceLTE

func NamespaceLTE(v string) predicate.NotificationRule

NamespaceLTE applies the LTE predicate on the "namespace" field.

func NamespaceNEQ

func NamespaceNEQ(v string) predicate.NotificationRule

NamespaceNEQ applies the NEQ predicate on the "namespace" field.

func NamespaceNotIn

func NamespaceNotIn(vs ...string) predicate.NotificationRule

NamespaceNotIn applies the NotIn predicate on the "namespace" field.

func Not

Not applies the not operator on the given predicate.

func Or

Or groups predicates with the OR operator between them.

func TypeEQ

TypeEQ applies the EQ predicate on the "type" field.

func TypeIn

TypeIn applies the In predicate on the "type" field.

func TypeNEQ

TypeNEQ applies the NEQ predicate on the "type" field.

func TypeNotIn

TypeNotIn applies the NotIn predicate on the "type" field.

func TypeValidator

func TypeValidator(_type notification.RuleType) error

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

func UpdatedAt

func UpdatedAt(v time.Time) predicate.NotificationRule

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

func UpdatedAtEQ

func UpdatedAtEQ(v time.Time) predicate.NotificationRule

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

func UpdatedAtGT

func UpdatedAtGT(v time.Time) predicate.NotificationRule

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

func UpdatedAtGTE

func UpdatedAtGTE(v time.Time) predicate.NotificationRule

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

func UpdatedAtIn

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

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

func UpdatedAtLT

func UpdatedAtLT(v time.Time) predicate.NotificationRule

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

func UpdatedAtLTE

func UpdatedAtLTE(v time.Time) predicate.NotificationRule

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

func UpdatedAtNEQ

func UpdatedAtNEQ(v time.Time) predicate.NotificationRule

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

func UpdatedAtNotIn

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

UpdatedAtNotIn applies the NotIn 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 NotificationRule queries.

func ByChannels

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

ByChannels orders the results by channels terms.

func ByChannelsCount

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

ByChannelsCount orders the results by channels count.

func ByConfig

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

ByConfig orders the results by the config field.

func ByCreatedAt

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

ByCreatedAt orders the results by the created_at field.

func ByDeletedAt

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

ByDeletedAt orders the results by the deleted_at field.

func ByDisabled

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

ByDisabled orders the results by the disabled field.

func ByEvents

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

ByEvents orders the results by events terms.

func ByEventsCount

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

ByEventsCount orders the results by events count.

func ByID

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

ByID orders the results by the id field.

func ByName

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

ByName orders the results by the name field.

func ByNamespace

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

ByNamespace orders the results by the namespace field.

func ByType

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

ByType orders the results by the type 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