user

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: May 13, 2026 License: Apache-2.0 Imports: 6 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"
	// FieldStatus holds the string denoting the status field in the database.
	FieldStatus = "status"
	// FieldPrimaryEmail holds the string denoting the primary_email field in the database.
	FieldPrimaryEmail = "primary_email"
	// FieldDisplayName holds the string denoting the display_name field in the database.
	FieldDisplayName = "display_name"
	// FieldAvatarURL holds the string denoting the avatar_url field in the database.
	FieldAvatarURL = "avatar_url"
	// FieldLastLoginAt holds the string denoting the last_login_at field in the database.
	FieldLastLoginAt = "last_login_at"
	// 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"
	// EdgeOrganizationMemberships holds the string denoting the organization_memberships edge name in mutations.
	EdgeOrganizationMemberships = "organization_memberships"
	// EdgeAcceptedOrganizationInvitations holds the string denoting the accepted_organization_invitations edge name in mutations.
	EdgeAcceptedOrganizationInvitations = "accepted_organization_invitations"
	// Table holds the table name of the user in the database.
	Table = "users"
	// OrganizationMembershipsTable is the table that holds the organization_memberships relation/edge.
	OrganizationMembershipsTable = "organization_memberships"
	// OrganizationMembershipsInverseTable is the table name for the OrganizationMembership entity.
	// It exists in this package in order to avoid circular dependency with the "organizationmembership" package.
	OrganizationMembershipsInverseTable = "organization_memberships"
	// OrganizationMembershipsColumn is the table column denoting the organization_memberships relation/edge.
	OrganizationMembershipsColumn = "user_id"
	// AcceptedOrganizationInvitationsTable is the table that holds the accepted_organization_invitations relation/edge.
	AcceptedOrganizationInvitationsTable = "organization_invitations"
	// AcceptedOrganizationInvitationsInverseTable is the table name for the OrganizationInvitation entity.
	// It exists in this package in order to avoid circular dependency with the "organizationinvitation" package.
	AcceptedOrganizationInvitationsInverseTable = "organization_invitations"
	// AcceptedOrganizationInvitationsColumn is the table column denoting the accepted_organization_invitations relation/edge.
	AcceptedOrganizationInvitationsColumn = "accepted_by_user_id"
)
View Source
const DefaultStatus = StatusActive

StatusActive is the default value of the Status enum.

Variables

View Source
var (
	// DefaultPrimaryEmail holds the default value on creation for the "primary_email" field.
	DefaultPrimaryEmail string
	// DefaultDisplayName holds the default value on creation for the "display_name" field.
	DefaultDisplayName string
	// DefaultAvatarURL holds the default value on creation for the "avatar_url" field.
	DefaultAvatarURL string
	// 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
	// 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 AvatarURL

func AvatarURL(v string) predicate.User

AvatarURL applies equality check predicate on the "avatar_url" field. It's identical to AvatarURLEQ.

func AvatarURLContains

func AvatarURLContains(v string) predicate.User

AvatarURLContains applies the Contains predicate on the "avatar_url" field.

func AvatarURLContainsFold

func AvatarURLContainsFold(v string) predicate.User

AvatarURLContainsFold applies the ContainsFold predicate on the "avatar_url" field.

func AvatarURLEQ

func AvatarURLEQ(v string) predicate.User

AvatarURLEQ applies the EQ predicate on the "avatar_url" field.

func AvatarURLEqualFold

func AvatarURLEqualFold(v string) predicate.User

AvatarURLEqualFold applies the EqualFold predicate on the "avatar_url" field.

func AvatarURLGT

func AvatarURLGT(v string) predicate.User

AvatarURLGT applies the GT predicate on the "avatar_url" field.

func AvatarURLGTE

func AvatarURLGTE(v string) predicate.User

AvatarURLGTE applies the GTE predicate on the "avatar_url" field.

func AvatarURLHasPrefix

func AvatarURLHasPrefix(v string) predicate.User

AvatarURLHasPrefix applies the HasPrefix predicate on the "avatar_url" field.

func AvatarURLHasSuffix

func AvatarURLHasSuffix(v string) predicate.User

AvatarURLHasSuffix applies the HasSuffix predicate on the "avatar_url" field.

func AvatarURLIn

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

AvatarURLIn applies the In predicate on the "avatar_url" field.

func AvatarURLLT

func AvatarURLLT(v string) predicate.User

AvatarURLLT applies the LT predicate on the "avatar_url" field.

func AvatarURLLTE

func AvatarURLLTE(v string) predicate.User

AvatarURLLTE applies the LTE predicate on the "avatar_url" field.

func AvatarURLNEQ

func AvatarURLNEQ(v string) predicate.User

AvatarURLNEQ applies the NEQ predicate on the "avatar_url" field.

func AvatarURLNotIn

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

AvatarURLNotIn applies the NotIn predicate on the "avatar_url" field.

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 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 HasAcceptedOrganizationInvitations added in v0.3.0

func HasAcceptedOrganizationInvitations() predicate.User

HasAcceptedOrganizationInvitations applies the HasEdge predicate on the "accepted_organization_invitations" edge.

func HasAcceptedOrganizationInvitationsWith added in v0.3.0

func HasAcceptedOrganizationInvitationsWith(preds ...predicate.OrganizationInvitation) predicate.User

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

func HasOrganizationMemberships added in v0.3.0

func HasOrganizationMemberships() predicate.User

HasOrganizationMemberships applies the HasEdge predicate on the "organization_memberships" edge.

func HasOrganizationMembershipsWith added in v0.3.0

func HasOrganizationMembershipsWith(preds ...predicate.OrganizationMembership) predicate.User

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

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 LastLoginAt

func LastLoginAt(v time.Time) predicate.User

LastLoginAt applies equality check predicate on the "last_login_at" field. It's identical to LastLoginAtEQ.

func LastLoginAtEQ

func LastLoginAtEQ(v time.Time) predicate.User

LastLoginAtEQ applies the EQ predicate on the "last_login_at" field.

func LastLoginAtGT

func LastLoginAtGT(v time.Time) predicate.User

LastLoginAtGT applies the GT predicate on the "last_login_at" field.

func LastLoginAtGTE

func LastLoginAtGTE(v time.Time) predicate.User

LastLoginAtGTE applies the GTE predicate on the "last_login_at" field.

func LastLoginAtIn

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

LastLoginAtIn applies the In predicate on the "last_login_at" field.

func LastLoginAtIsNil

func LastLoginAtIsNil() predicate.User

LastLoginAtIsNil applies the IsNil predicate on the "last_login_at" field.

func LastLoginAtLT

func LastLoginAtLT(v time.Time) predicate.User

LastLoginAtLT applies the LT predicate on the "last_login_at" field.

func LastLoginAtLTE

func LastLoginAtLTE(v time.Time) predicate.User

LastLoginAtLTE applies the LTE predicate on the "last_login_at" field.

func LastLoginAtNEQ

func LastLoginAtNEQ(v time.Time) predicate.User

LastLoginAtNEQ applies the NEQ predicate on the "last_login_at" field.

func LastLoginAtNotIn

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

LastLoginAtNotIn applies the NotIn predicate on the "last_login_at" field.

func LastLoginAtNotNil

func LastLoginAtNotNil() predicate.User

LastLoginAtNotNil applies the NotNil predicate on the "last_login_at" 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 PrimaryEmail

func PrimaryEmail(v string) predicate.User

PrimaryEmail applies equality check predicate on the "primary_email" field. It's identical to PrimaryEmailEQ.

func PrimaryEmailContains

func PrimaryEmailContains(v string) predicate.User

PrimaryEmailContains applies the Contains predicate on the "primary_email" field.

func PrimaryEmailContainsFold

func PrimaryEmailContainsFold(v string) predicate.User

PrimaryEmailContainsFold applies the ContainsFold predicate on the "primary_email" field.

func PrimaryEmailEQ

func PrimaryEmailEQ(v string) predicate.User

PrimaryEmailEQ applies the EQ predicate on the "primary_email" field.

func PrimaryEmailEqualFold

func PrimaryEmailEqualFold(v string) predicate.User

PrimaryEmailEqualFold applies the EqualFold predicate on the "primary_email" field.

func PrimaryEmailGT

func PrimaryEmailGT(v string) predicate.User

PrimaryEmailGT applies the GT predicate on the "primary_email" field.

func PrimaryEmailGTE

func PrimaryEmailGTE(v string) predicate.User

PrimaryEmailGTE applies the GTE predicate on the "primary_email" field.

func PrimaryEmailHasPrefix

func PrimaryEmailHasPrefix(v string) predicate.User

PrimaryEmailHasPrefix applies the HasPrefix predicate on the "primary_email" field.

func PrimaryEmailHasSuffix

func PrimaryEmailHasSuffix(v string) predicate.User

PrimaryEmailHasSuffix applies the HasSuffix predicate on the "primary_email" field.

func PrimaryEmailIn

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

PrimaryEmailIn applies the In predicate on the "primary_email" field.

func PrimaryEmailLT

func PrimaryEmailLT(v string) predicate.User

PrimaryEmailLT applies the LT predicate on the "primary_email" field.

func PrimaryEmailLTE

func PrimaryEmailLTE(v string) predicate.User

PrimaryEmailLTE applies the LTE predicate on the "primary_email" field.

func PrimaryEmailNEQ

func PrimaryEmailNEQ(v string) predicate.User

PrimaryEmailNEQ applies the NEQ predicate on the "primary_email" field.

func PrimaryEmailNotIn

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

PrimaryEmailNotIn applies the NotIn predicate on the "primary_email" field.

func StatusEQ

func StatusEQ(v Status) predicate.User

StatusEQ applies the EQ predicate on the "status" field.

func StatusIn

func StatusIn(vs ...Status) predicate.User

StatusIn applies the In predicate on the "status" field.

func StatusNEQ

func StatusNEQ(v Status) predicate.User

StatusNEQ applies the NEQ predicate on the "status" field.

func StatusNotIn

func StatusNotIn(vs ...Status) predicate.User

StatusNotIn applies the NotIn predicate on the "status" field.

func StatusValidator

func StatusValidator(s Status) error

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

func UpdatedAt

func UpdatedAt(v time.Time) predicate.User

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

func UpdatedAtEQ

func UpdatedAtEQ(v time.Time) predicate.User

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

func UpdatedAtGT

func UpdatedAtGT(v time.Time) predicate.User

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

func UpdatedAtGTE

func UpdatedAtGTE(v time.Time) predicate.User

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

func UpdatedAtIn

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

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

func UpdatedAtLT

func UpdatedAtLT(v time.Time) predicate.User

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

func UpdatedAtLTE

func UpdatedAtLTE(v time.Time) predicate.User

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

func UpdatedAtNEQ

func UpdatedAtNEQ(v time.Time) predicate.User

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

func UpdatedAtNotIn

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 ByAcceptedOrganizationInvitations added in v0.3.0

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

ByAcceptedOrganizationInvitations orders the results by accepted_organization_invitations terms.

func ByAcceptedOrganizationInvitationsCount added in v0.3.0

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

ByAcceptedOrganizationInvitationsCount orders the results by accepted_organization_invitations count.

func ByAvatarURL

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

ByAvatarURL orders the results by the avatar_url field.

func ByCreatedAt

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

ByCreatedAt orders the results by the created_at field.

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 ByLastLoginAt

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

ByLastLoginAt orders the results by the last_login_at field.

func ByOrganizationMemberships added in v0.3.0

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

ByOrganizationMemberships orders the results by organization_memberships terms.

func ByOrganizationMembershipsCount added in v0.3.0

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

ByOrganizationMembershipsCount orders the results by organization_memberships count.

func ByPrimaryEmail

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

ByPrimaryEmail orders the results by the primary_email field.

func ByStatus

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

ByStatus orders the results by the status field.

func ByUpdatedAt

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

ByUpdatedAt orders the results by the updated_at field.

type Status

type Status string

Status defines the type for the "status" enum field.

const (
	StatusActive   Status = "active"
	StatusDisabled Status = "disabled"
)

Status values.

func (Status) String

func (s Status) String() string

Jump to

Keyboard shortcuts

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