user

package
v1.43.0 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 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"
	// FieldEmail holds the string denoting the email field in the database.
	FieldEmail = "email"
	// 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"
	// FieldHasRestrictedAccess holds the string denoting the has_restricted_access field in the database.
	FieldHasRestrictedAccess = "has_restricted_access"
	// FieldFirstName holds the string denoting the first_name field in the database.
	FieldFirstName = "first_name"
	// FieldLastName holds the string denoting the last_name field in the database.
	FieldLastName = "last_name"
	// EdgeMemberships holds the string denoting the memberships edge name in mutations.
	EdgeMemberships = "memberships"
	// EdgeGroupMemberships holds the string denoting the group_memberships edge name in mutations.
	EdgeGroupMemberships = "group_memberships"
	// Table holds the table name of the user in the database.
	Table = "users"
	// MembershipsTable is the table that holds the memberships relation/edge.
	MembershipsTable = "memberships"
	// MembershipsInverseTable is the table name for the Membership entity.
	// It exists in this package in order to avoid circular dependency with the "membership" package.
	MembershipsInverseTable = "memberships"
	// MembershipsColumn is the table column denoting the memberships relation/edge.
	MembershipsColumn = "user_memberships"
	// GroupMembershipsTable is the table that holds the group_memberships relation/edge.
	GroupMembershipsTable = "group_memberships"
	// GroupMembershipsInverseTable is the table name for the GroupMembership entity.
	// It exists in this package in order to avoid circular dependency with the "groupmembership" package.
	GroupMembershipsInverseTable = "group_memberships"
	// GroupMembershipsColumn is the table column denoting the group_memberships relation/edge.
	GroupMembershipsColumn = "user_id"
)

Variables

View Source
var (
	// EmailValidator is a validator for the "email" field. It is called by the builders before save.
	EmailValidator 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
	// DefaultID holds the default value on creation for the "id" field.
	DefaultID func() uuid.UUID
)

Columns holds all SQL columns for user fields.

Functions

func And

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

And groups predicates with the AND operator between them.

func CreatedAt

func CreatedAt(v time.Time) predicate.User

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

func CreatedAtEQ

func CreatedAtEQ(v time.Time) predicate.User

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

func CreatedAtGT

func CreatedAtGT(v time.Time) predicate.User

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

func CreatedAtGTE

func CreatedAtGTE(v time.Time) predicate.User

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

func CreatedAtIn

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

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

func CreatedAtLT

func CreatedAtLT(v time.Time) predicate.User

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

func CreatedAtLTE

func CreatedAtLTE(v time.Time) predicate.User

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

func CreatedAtNEQ

func CreatedAtNEQ(v time.Time) predicate.User

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

func CreatedAtNotIn

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

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

func Email

func Email(v string) predicate.User

Email applies equality check predicate on the "email" field. It's identical to EmailEQ.

func EmailContains

func EmailContains(v string) predicate.User

EmailContains applies the Contains predicate on the "email" field.

func EmailContainsFold

func EmailContainsFold(v string) predicate.User

EmailContainsFold applies the ContainsFold predicate on the "email" field.

func EmailEQ

func EmailEQ(v string) predicate.User

EmailEQ applies the EQ predicate on the "email" field.

func EmailEqualFold

func EmailEqualFold(v string) predicate.User

EmailEqualFold applies the EqualFold predicate on the "email" field.

func EmailGT

func EmailGT(v string) predicate.User

EmailGT applies the GT predicate on the "email" field.

func EmailGTE

func EmailGTE(v string) predicate.User

EmailGTE applies the GTE predicate on the "email" field.

func EmailHasPrefix

func EmailHasPrefix(v string) predicate.User

EmailHasPrefix applies the HasPrefix predicate on the "email" field.

func EmailHasSuffix

func EmailHasSuffix(v string) predicate.User

EmailHasSuffix applies the HasSuffix predicate on the "email" field.

func EmailIn

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

EmailIn applies the In predicate on the "email" field.

func EmailLT

func EmailLT(v string) predicate.User

EmailLT applies the LT predicate on the "email" field.

func EmailLTE

func EmailLTE(v string) predicate.User

EmailLTE applies the LTE predicate on the "email" field.

func EmailNEQ

func EmailNEQ(v string) predicate.User

EmailNEQ applies the NEQ predicate on the "email" field.

func EmailNotIn

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

EmailNotIn applies the NotIn predicate on the "email" field.

func FirstName added in v1.5.0

func FirstName(v string) predicate.User

FirstName applies equality check predicate on the "first_name" field. It's identical to FirstNameEQ.

func FirstNameContains added in v1.5.0

func FirstNameContains(v string) predicate.User

FirstNameContains applies the Contains predicate on the "first_name" field.

func FirstNameContainsFold added in v1.5.0

func FirstNameContainsFold(v string) predicate.User

FirstNameContainsFold applies the ContainsFold predicate on the "first_name" field.

func FirstNameEQ added in v1.5.0

func FirstNameEQ(v string) predicate.User

FirstNameEQ applies the EQ predicate on the "first_name" field.

func FirstNameEqualFold added in v1.5.0

func FirstNameEqualFold(v string) predicate.User

FirstNameEqualFold applies the EqualFold predicate on the "first_name" field.

func FirstNameGT added in v1.5.0

func FirstNameGT(v string) predicate.User

FirstNameGT applies the GT predicate on the "first_name" field.

func FirstNameGTE added in v1.5.0

func FirstNameGTE(v string) predicate.User

FirstNameGTE applies the GTE predicate on the "first_name" field.

func FirstNameHasPrefix added in v1.5.0

func FirstNameHasPrefix(v string) predicate.User

FirstNameHasPrefix applies the HasPrefix predicate on the "first_name" field.

func FirstNameHasSuffix added in v1.5.0

func FirstNameHasSuffix(v string) predicate.User

FirstNameHasSuffix applies the HasSuffix predicate on the "first_name" field.

func FirstNameIn added in v1.5.0

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

FirstNameIn applies the In predicate on the "first_name" field.

func FirstNameIsNil added in v1.5.0

func FirstNameIsNil() predicate.User

FirstNameIsNil applies the IsNil predicate on the "first_name" field.

func FirstNameLT added in v1.5.0

func FirstNameLT(v string) predicate.User

FirstNameLT applies the LT predicate on the "first_name" field.

func FirstNameLTE added in v1.5.0

func FirstNameLTE(v string) predicate.User

FirstNameLTE applies the LTE predicate on the "first_name" field.

func FirstNameNEQ added in v1.5.0

func FirstNameNEQ(v string) predicate.User

FirstNameNEQ applies the NEQ predicate on the "first_name" field.

func FirstNameNotIn added in v1.5.0

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

FirstNameNotIn applies the NotIn predicate on the "first_name" field.

func FirstNameNotNil added in v1.5.0

func FirstNameNotNil() predicate.User

FirstNameNotNil applies the NotNil predicate on the "first_name" field.

func HasGroupMemberships added in v1.38.1

func HasGroupMemberships() predicate.User

HasGroupMemberships applies the HasEdge predicate on the "group_memberships" edge.

func HasGroupMembershipsWith added in v1.38.1

func HasGroupMembershipsWith(preds ...predicate.GroupMembership) predicate.User

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

func HasMemberships

func HasMemberships() predicate.User

HasMemberships applies the HasEdge predicate on the "memberships" edge.

func HasMembershipsWith

func HasMembershipsWith(preds ...predicate.Membership) predicate.User

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

func HasRestrictedAccess added in v0.186.0

func HasRestrictedAccess(v bool) predicate.User

HasRestrictedAccess applies equality check predicate on the "has_restricted_access" field. It's identical to HasRestrictedAccessEQ.

func HasRestrictedAccessEQ added in v0.186.0

func HasRestrictedAccessEQ(v bool) predicate.User

HasRestrictedAccessEQ applies the EQ predicate on the "has_restricted_access" field.

func HasRestrictedAccessIsNil added in v0.186.0

func HasRestrictedAccessIsNil() predicate.User

HasRestrictedAccessIsNil applies the IsNil predicate on the "has_restricted_access" field.

func HasRestrictedAccessNEQ added in v0.186.0

func HasRestrictedAccessNEQ(v bool) predicate.User

HasRestrictedAccessNEQ applies the NEQ predicate on the "has_restricted_access" field.

func HasRestrictedAccessNotNil added in v0.186.0

func HasRestrictedAccessNotNil() predicate.User

HasRestrictedAccessNotNil applies the NotNil predicate on the "has_restricted_access" field.

func ID

func ID(id uuid.UUID) predicate.User

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id uuid.UUID) predicate.User

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id uuid.UUID) predicate.User

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id uuid.UUID) predicate.User

IDGTE applies the GTE predicate on the ID field.

func IDIn

func IDIn(ids ...uuid.UUID) predicate.User

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id uuid.UUID) predicate.User

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id uuid.UUID) predicate.User

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id uuid.UUID) predicate.User

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

func IDNotIn(ids ...uuid.UUID) predicate.User

IDNotIn applies the NotIn predicate on the ID field.

func LastName added in v1.5.0

func LastName(v string) predicate.User

LastName applies equality check predicate on the "last_name" field. It's identical to LastNameEQ.

func LastNameContains added in v1.5.0

func LastNameContains(v string) predicate.User

LastNameContains applies the Contains predicate on the "last_name" field.

func LastNameContainsFold added in v1.5.0

func LastNameContainsFold(v string) predicate.User

LastNameContainsFold applies the ContainsFold predicate on the "last_name" field.

func LastNameEQ added in v1.5.0

func LastNameEQ(v string) predicate.User

LastNameEQ applies the EQ predicate on the "last_name" field.

func LastNameEqualFold added in v1.5.0

func LastNameEqualFold(v string) predicate.User

LastNameEqualFold applies the EqualFold predicate on the "last_name" field.

func LastNameGT added in v1.5.0

func LastNameGT(v string) predicate.User

LastNameGT applies the GT predicate on the "last_name" field.

func LastNameGTE added in v1.5.0

func LastNameGTE(v string) predicate.User

LastNameGTE applies the GTE predicate on the "last_name" field.

func LastNameHasPrefix added in v1.5.0

func LastNameHasPrefix(v string) predicate.User

LastNameHasPrefix applies the HasPrefix predicate on the "last_name" field.

func LastNameHasSuffix added in v1.5.0

func LastNameHasSuffix(v string) predicate.User

LastNameHasSuffix applies the HasSuffix predicate on the "last_name" field.

func LastNameIn added in v1.5.0

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

LastNameIn applies the In predicate on the "last_name" field.

func LastNameIsNil added in v1.5.0

func LastNameIsNil() predicate.User

LastNameIsNil applies the IsNil predicate on the "last_name" field.

func LastNameLT added in v1.5.0

func LastNameLT(v string) predicate.User

LastNameLT applies the LT predicate on the "last_name" field.

func LastNameLTE added in v1.5.0

func LastNameLTE(v string) predicate.User

LastNameLTE applies the LTE predicate on the "last_name" field.

func LastNameNEQ added in v1.5.0

func LastNameNEQ(v string) predicate.User

LastNameNEQ applies the NEQ predicate on the "last_name" field.

func LastNameNotIn added in v1.5.0

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

LastNameNotIn applies the NotIn predicate on the "last_name" field.

func LastNameNotNil added in v1.5.0

func LastNameNotNil() predicate.User

LastNameNotNil applies the NotNil predicate on the "last_name" 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 UpdatedAt added in v1.41.0

func UpdatedAt(v time.Time) predicate.User

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

func UpdatedAtEQ added in v1.41.0

func UpdatedAtEQ(v time.Time) predicate.User

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

func UpdatedAtGT added in v1.41.0

func UpdatedAtGT(v time.Time) predicate.User

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

func UpdatedAtGTE added in v1.41.0

func UpdatedAtGTE(v time.Time) predicate.User

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

func UpdatedAtIn added in v1.41.0

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

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

func UpdatedAtLT added in v1.41.0

func UpdatedAtLT(v time.Time) predicate.User

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

func UpdatedAtLTE added in v1.41.0

func UpdatedAtLTE(v time.Time) predicate.User

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

func UpdatedAtNEQ added in v1.41.0

func UpdatedAtNEQ(v time.Time) predicate.User

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

func UpdatedAtNotIn added in v1.41.0

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

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 User queries.

func ByCreatedAt

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

ByCreatedAt orders the results by the created_at field.

func ByEmail

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

ByEmail orders the results by the email field.

func ByFirstName added in v1.5.0

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

ByFirstName orders the results by the first_name field.

func ByGroupMemberships added in v1.38.1

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

ByGroupMemberships orders the results by group_memberships terms.

func ByGroupMembershipsCount added in v1.38.1

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

ByGroupMembershipsCount orders the results by group_memberships count.

func ByHasRestrictedAccess added in v0.186.0

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

ByHasRestrictedAccess orders the results by the has_restricted_access field.

func ByID

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

ByID orders the results by the id field.

func ByLastName added in v1.5.0

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

ByLastName orders the results by the last_name field.

func ByMemberships

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

ByMemberships orders the results by memberships terms.

func ByMembershipsCount

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

ByMembershipsCount orders the results by memberships count.

func ByUpdatedAt added in v1.41.0

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