user

package
v0.0.0-...-38edf11 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2025 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Label holds the string label denoting the user type in the database.
	Label = "user"
	// FieldID holds the string denoting the id field in the database.
	FieldID = "id"
	// FieldPrincipalName holds the string denoting the principal_name field in the database.
	FieldPrincipalName = "principal_name"
	// FieldDisplayName holds the string denoting the display_name field in the database.
	FieldDisplayName = "display_name"
	// EdgeSilences holds the string denoting the silences edge name in mutations.
	EdgeSilences = "silences"
	// EdgeAddresses holds the string denoting the addresses edge name in mutations.
	EdgeAddresses = "addresses"
	// Table holds the table name of the user in the database.
	Table = "user"
	// SilencesTable is the table that holds the silences relation/edge.
	SilencesTable = "msg_silence"
	// SilencesInverseTable is the table name for the Silence entity.
	// It exists in this package in order to avoid circular dependency with the "silence" package.
	SilencesInverseTable = "msg_silence"
	// SilencesColumn is the table column denoting the silences relation/edge.
	SilencesColumn = "created_by"
	// AddressesTable is the table that holds the addresses relation/edge.
	AddressesTable = "user_addr"
	// AddressesInverseTable is the table name for the UserAddr entity.
	// It exists in this package in order to avoid circular dependency with the "useraddr" package.
	AddressesInverseTable = "user_addr"
	// AddressesColumn is the table column denoting the addresses relation/edge.
	AddressesColumn = "user_id"
)

Variables

Columns holds all SQL columns for user fields.

View Source
var (
	Hooks [1]ent.Hook
)

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"

Functions

func And

func And(predicates ...predicate.User) predicate.User

And groups predicates with the AND operator between them.

func DisplayName

func DisplayName(v string) predicate.User

DisplayName applies equality check predicate on the "display_name" field. It's identical to DisplayNameEQ.

func DisplayNameContains

func DisplayNameContains(v string) predicate.User

DisplayNameContains applies the Contains predicate on the "display_name" field.

func DisplayNameContainsFold

func DisplayNameContainsFold(v string) predicate.User

DisplayNameContainsFold applies the ContainsFold predicate on the "display_name" field.

func DisplayNameEQ

func DisplayNameEQ(v string) predicate.User

DisplayNameEQ applies the EQ predicate on the "display_name" field.

func DisplayNameEqualFold

func DisplayNameEqualFold(v string) predicate.User

DisplayNameEqualFold applies the EqualFold predicate on the "display_name" field.

func DisplayNameGT

func DisplayNameGT(v string) predicate.User

DisplayNameGT applies the GT predicate on the "display_name" field.

func DisplayNameGTE

func DisplayNameGTE(v string) predicate.User

DisplayNameGTE applies the GTE predicate on the "display_name" field.

func DisplayNameHasPrefix

func DisplayNameHasPrefix(v string) predicate.User

DisplayNameHasPrefix applies the HasPrefix predicate on the "display_name" field.

func DisplayNameHasSuffix

func DisplayNameHasSuffix(v string) predicate.User

DisplayNameHasSuffix applies the HasSuffix predicate on the "display_name" field.

func DisplayNameIn

func DisplayNameIn(vs ...string) predicate.User

DisplayNameIn applies the In predicate on the "display_name" field.

func DisplayNameLT

func DisplayNameLT(v string) predicate.User

DisplayNameLT applies the LT predicate on the "display_name" field.

func DisplayNameLTE

func DisplayNameLTE(v string) predicate.User

DisplayNameLTE applies the LTE predicate on the "display_name" field.

func DisplayNameNEQ

func DisplayNameNEQ(v string) predicate.User

DisplayNameNEQ applies the NEQ predicate on the "display_name" field.

func DisplayNameNotIn

func DisplayNameNotIn(vs ...string) predicate.User

DisplayNameNotIn applies the NotIn predicate on the "display_name" field.

func HasAddresses

func HasAddresses() predicate.User

HasAddresses applies the HasEdge predicate on the "addresses" edge.

func HasAddressesWith

func HasAddressesWith(preds ...predicate.UserAddr) predicate.User

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

func HasSilences

func HasSilences() predicate.User

HasSilences applies the HasEdge predicate on the "silences" edge.

func HasSilencesWith

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

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

func ID

func ID(id int) predicate.User

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id int) predicate.User

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id int) predicate.User

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id int) predicate.User

IDGTE applies the GTE predicate on the ID field.

func IDIn

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

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id int) predicate.User

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id int) predicate.User

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id int) predicate.User

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

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

IDNotIn applies the NotIn predicate on the ID field.

func Not

Not applies the not operator on the given predicate.

func Or

func Or(predicates ...predicate.User) predicate.User

Or groups predicates with the OR operator between them.

func PrincipalName

func PrincipalName(v string) predicate.User

PrincipalName applies equality check predicate on the "principal_name" field. It's identical to PrincipalNameEQ.

func PrincipalNameContains

func PrincipalNameContains(v string) predicate.User

PrincipalNameContains applies the Contains predicate on the "principal_name" field.

func PrincipalNameContainsFold

func PrincipalNameContainsFold(v string) predicate.User

PrincipalNameContainsFold applies the ContainsFold predicate on the "principal_name" field.

func PrincipalNameEQ

func PrincipalNameEQ(v string) predicate.User

PrincipalNameEQ applies the EQ predicate on the "principal_name" field.

func PrincipalNameEqualFold

func PrincipalNameEqualFold(v string) predicate.User

PrincipalNameEqualFold applies the EqualFold predicate on the "principal_name" field.

func PrincipalNameGT

func PrincipalNameGT(v string) predicate.User

PrincipalNameGT applies the GT predicate on the "principal_name" field.

func PrincipalNameGTE

func PrincipalNameGTE(v string) predicate.User

PrincipalNameGTE applies the GTE predicate on the "principal_name" field.

func PrincipalNameHasPrefix

func PrincipalNameHasPrefix(v string) predicate.User

PrincipalNameHasPrefix applies the HasPrefix predicate on the "principal_name" field.

func PrincipalNameHasSuffix

func PrincipalNameHasSuffix(v string) predicate.User

PrincipalNameHasSuffix applies the HasSuffix predicate on the "principal_name" field.

func PrincipalNameIn

func PrincipalNameIn(vs ...string) predicate.User

PrincipalNameIn applies the In predicate on the "principal_name" field.

func PrincipalNameLT

func PrincipalNameLT(v string) predicate.User

PrincipalNameLT applies the LT predicate on the "principal_name" field.

func PrincipalNameLTE

func PrincipalNameLTE(v string) predicate.User

PrincipalNameLTE applies the LTE predicate on the "principal_name" field.

func PrincipalNameNEQ

func PrincipalNameNEQ(v string) predicate.User

PrincipalNameNEQ applies the NEQ predicate on the "principal_name" field.

func PrincipalNameNotIn

func PrincipalNameNotIn(vs ...string) predicate.User

PrincipalNameNotIn applies the NotIn predicate on the "principal_name" 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 User queries.

func ByAddresses

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

ByAddresses orders the results by addresses terms.

func ByAddressesCount

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

ByAddressesCount orders the results by addresses count.

func ByDisplayName

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

ByDisplayName orders the results by the display_name field.

func ByID

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

ByID orders the results by the id field.

func ByPrincipalName

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

ByPrincipalName orders the results by the principal_name field.

func BySilences

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

BySilences orders the results by silences terms.

func BySilencesCount

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

BySilencesCount orders the results by silences count.

Jump to

Keyboard shortcuts

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