user

package
v0.0.0-...-4efd307 Latest Latest
Warning

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

Go to latest
Published: May 2, 2025 License: Apache-2.0 Imports: 9 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"
	// FieldUpdatedAt holds the string denoting the updated_at field in the database.
	FieldUpdatedAt = "updated_at"
	// FieldCreatedAt holds the string denoting the created_at field in the database.
	FieldCreatedAt = "created_at"
	// FieldDeletedAt holds the string denoting the deleted_at field in the database.
	FieldDeletedAt = "deleted_at"
	// FieldDeletedBy holds the string denoting the deleted_by field in the database.
	FieldDeletedBy = "deleted_by"
	// FieldDisplayName holds the string denoting the display_name field in the database.
	FieldDisplayName = "display_name"
	// FieldAlias holds the string denoting the alias field in the database.
	FieldAlias = "alias"
	// FieldProfileImage holds the string denoting the profile_image field in the database.
	FieldProfileImage = "profile_image"
	// FieldExternalID holds the string denoting the external_id field in the database.
	FieldExternalID = "external_id"
	// FieldAuthProvider holds the string denoting the auth_provider field in the database.
	FieldAuthProvider = "auth_provider"
	// FieldRole holds the string denoting the role field in the database.
	FieldRole = "role"
	// FieldLastSeenAt holds the string denoting the last_seen_at field in the database.
	FieldLastSeenAt = "last_seen_at"
	// FieldLastPostSeenCursor holds the string denoting the last_post_seen_cursor field in the database.
	FieldLastPostSeenCursor = "last_post_seen_cursor"
	// FieldAwards holds the string denoting the awards field in the database.
	FieldAwards = "awards"
	// EdgeSavedPosts holds the string denoting the saved_posts edge name in mutations.
	EdgeSavedPosts = "saved_posts"
	// EdgeLikedPosts holds the string denoting the liked_posts edge name in mutations.
	EdgeLikedPosts = "liked_posts"
	// EdgePublishedPosts holds the string denoting the published_posts edge name in mutations.
	EdgePublishedPosts = "published_posts"
	// EdgeComments holds the string denoting the comments edge name in mutations.
	EdgeComments = "comments"
	// EdgeAPIKeys holds the string denoting the api_keys edge name in mutations.
	EdgeAPIKeys = "api_keys"
	// EdgeRefreshTokens holds the string denoting the refresh_tokens edge name in mutations.
	EdgeRefreshTokens = "refresh_tokens"
	// Table holds the table name of the user in the database.
	Table = "users"
	// SavedPostsTable is the table that holds the saved_posts relation/edge. The primary key declared below.
	SavedPostsTable = "user_saved_posts"
	// SavedPostsInverseTable is the table name for the Post entity.
	// It exists in this package in order to avoid circular dependency with the "post" package.
	SavedPostsInverseTable = "posts"
	// LikedPostsTable is the table that holds the liked_posts relation/edge. The primary key declared below.
	LikedPostsTable = "user_liked_posts"
	// LikedPostsInverseTable is the table name for the Post entity.
	// It exists in this package in order to avoid circular dependency with the "post" package.
	LikedPostsInverseTable = "posts"
	// PublishedPostsTable is the table that holds the published_posts relation/edge.
	PublishedPostsTable = "posts"
	// PublishedPostsInverseTable is the table name for the Post entity.
	// It exists in this package in order to avoid circular dependency with the "post" package.
	PublishedPostsInverseTable = "posts"
	// PublishedPostsColumn is the table column denoting the published_posts relation/edge.
	PublishedPostsColumn = "owner_id"
	// CommentsTable is the table that holds the comments relation/edge.
	CommentsTable = "comments"
	// CommentsInverseTable is the table name for the Comment entity.
	// It exists in this package in order to avoid circular dependency with the "comment" package.
	CommentsInverseTable = "comments"
	// CommentsColumn is the table column denoting the comments relation/edge.
	CommentsColumn = "owner_id"
	// APIKeysTable is the table that holds the api_keys relation/edge.
	APIKeysTable = "api_keys"
	// APIKeysInverseTable is the table name for the ApiKey entity.
	// It exists in this package in order to avoid circular dependency with the "apikey" package.
	APIKeysInverseTable = "api_keys"
	// APIKeysColumn is the table column denoting the api_keys relation/edge.
	APIKeysColumn = "owner_id"
	// RefreshTokensTable is the table that holds the refresh_tokens relation/edge.
	RefreshTokensTable = "refresh_tokens"
	// RefreshTokensInverseTable is the table name for the RefreshToken entity.
	// It exists in this package in order to avoid circular dependency with the "refreshtoken" package.
	RefreshTokensInverseTable = "refresh_tokens"
	// RefreshTokensColumn is the table column denoting the refresh_tokens relation/edge.
	RefreshTokensColumn = "owner_id"
)
View Source
const DefaultAuthProvider = AuthProviderTWITCH

AuthProviderTWITCH is the default value of the AuthProvider enum.

View Source
const DefaultRole = RoleGUEST

RoleGUEST is the default value of the Role enum.

Variables

View Source
var (
	// SavedPostsPrimaryKey and SavedPostsColumn2 are the table columns denoting the
	// primary key for the saved_posts relation (M2M).
	SavedPostsPrimaryKey = []string{"user_id", "post_id"}
	// LikedPostsPrimaryKey and LikedPostsColumn2 are the table columns denoting the
	// primary key for the liked_posts relation (M2M).
	LikedPostsPrimaryKey = []string{"user_id", "post_id"}
)
View Source
var (
	Hooks        [3]ent.Hook
	Interceptors [1]ent.Interceptor
	Policy       ent.Policy
	// 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
	// DefaultCreatedAt holds the default value on creation for the "created_at" field.
	DefaultCreatedAt func() time.Time
	// UpdateDefaultLastSeenAt holds the default value on update for the "last_seen_at" field.
	UpdateDefaultLastSeenAt func() time.Time
	// DefaultID holds the default value on creation for the "id" field.
	DefaultID func() uuid.UUID
)

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/caliecode/la-clipasa/internal/ent/generated/runtime"

Columns holds all SQL columns for user fields.

Functions

func Alias

func Alias(v string) predicate.User

Alias applies equality check predicate on the "alias" field. It's identical to AliasEQ.

func AliasContains

func AliasContains(v string) predicate.User

AliasContains applies the Contains predicate on the "alias" field.

func AliasContainsFold

func AliasContainsFold(v string) predicate.User

AliasContainsFold applies the ContainsFold predicate on the "alias" field.

func AliasEQ

func AliasEQ(v string) predicate.User

AliasEQ applies the EQ predicate on the "alias" field.

func AliasEqualFold

func AliasEqualFold(v string) predicate.User

AliasEqualFold applies the EqualFold predicate on the "alias" field.

func AliasGT

func AliasGT(v string) predicate.User

AliasGT applies the GT predicate on the "alias" field.

func AliasGTE

func AliasGTE(v string) predicate.User

AliasGTE applies the GTE predicate on the "alias" field.

func AliasHasPrefix

func AliasHasPrefix(v string) predicate.User

AliasHasPrefix applies the HasPrefix predicate on the "alias" field.

func AliasHasSuffix

func AliasHasSuffix(v string) predicate.User

AliasHasSuffix applies the HasSuffix predicate on the "alias" field.

func AliasIn

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

AliasIn applies the In predicate on the "alias" field.

func AliasIsNil

func AliasIsNil() predicate.User

AliasIsNil applies the IsNil predicate on the "alias" field.

func AliasLT

func AliasLT(v string) predicate.User

AliasLT applies the LT predicate on the "alias" field.

func AliasLTE

func AliasLTE(v string) predicate.User

AliasLTE applies the LTE predicate on the "alias" field.

func AliasNEQ

func AliasNEQ(v string) predicate.User

AliasNEQ applies the NEQ predicate on the "alias" field.

func AliasNotIn

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

AliasNotIn applies the NotIn predicate on the "alias" field.

func AliasNotNil

func AliasNotNil() predicate.User

AliasNotNil applies the NotNil predicate on the "alias" field.

func And

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

And groups predicates with the AND operator between them.

func AuthProviderEQ

func AuthProviderEQ(v AuthProvider) predicate.User

AuthProviderEQ applies the EQ predicate on the "auth_provider" field.

func AuthProviderIn

func AuthProviderIn(vs ...AuthProvider) predicate.User

AuthProviderIn applies the In predicate on the "auth_provider" field.

func AuthProviderNEQ

func AuthProviderNEQ(v AuthProvider) predicate.User

AuthProviderNEQ applies the NEQ predicate on the "auth_provider" field.

func AuthProviderNotIn

func AuthProviderNotIn(vs ...AuthProvider) predicate.User

AuthProviderNotIn applies the NotIn predicate on the "auth_provider" field.

func AuthProviderValidator

func AuthProviderValidator(ap AuthProvider) error

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

func AwardsIsNil

func AwardsIsNil() predicate.User

AwardsIsNil applies the IsNil predicate on the "awards" field.

func AwardsNotNil

func AwardsNotNil() predicate.User

AwardsNotNil applies the NotNil predicate on the "awards" 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 DeletedAt

func DeletedAt(v time.Time) predicate.User

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

func DeletedAtEQ

func DeletedAtEQ(v time.Time) predicate.User

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

func DeletedAtGT

func DeletedAtGT(v time.Time) predicate.User

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

func DeletedAtGTE

func DeletedAtGTE(v time.Time) predicate.User

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

func DeletedAtIn

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

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

func DeletedAtIsNil

func DeletedAtIsNil() predicate.User

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

func DeletedAtLT

func DeletedAtLT(v time.Time) predicate.User

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

func DeletedAtLTE

func DeletedAtLTE(v time.Time) predicate.User

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

func DeletedAtNEQ

func DeletedAtNEQ(v time.Time) predicate.User

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

func DeletedAtNotIn

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

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

func DeletedAtNotNil

func DeletedAtNotNil() predicate.User

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

func DeletedBy

func DeletedBy(v string) predicate.User

DeletedBy applies equality check predicate on the "deleted_by" field. It's identical to DeletedByEQ.

func DeletedByContains

func DeletedByContains(v string) predicate.User

DeletedByContains applies the Contains predicate on the "deleted_by" field.

func DeletedByContainsFold

func DeletedByContainsFold(v string) predicate.User

DeletedByContainsFold applies the ContainsFold predicate on the "deleted_by" field.

func DeletedByEQ

func DeletedByEQ(v string) predicate.User

DeletedByEQ applies the EQ predicate on the "deleted_by" field.

func DeletedByEqualFold

func DeletedByEqualFold(v string) predicate.User

DeletedByEqualFold applies the EqualFold predicate on the "deleted_by" field.

func DeletedByGT

func DeletedByGT(v string) predicate.User

DeletedByGT applies the GT predicate on the "deleted_by" field.

func DeletedByGTE

func DeletedByGTE(v string) predicate.User

DeletedByGTE applies the GTE predicate on the "deleted_by" field.

func DeletedByHasPrefix

func DeletedByHasPrefix(v string) predicate.User

DeletedByHasPrefix applies the HasPrefix predicate on the "deleted_by" field.

func DeletedByHasSuffix

func DeletedByHasSuffix(v string) predicate.User

DeletedByHasSuffix applies the HasSuffix predicate on the "deleted_by" field.

func DeletedByIn

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

DeletedByIn applies the In predicate on the "deleted_by" field.

func DeletedByIsNil

func DeletedByIsNil() predicate.User

DeletedByIsNil applies the IsNil predicate on the "deleted_by" field.

func DeletedByLT

func DeletedByLT(v string) predicate.User

DeletedByLT applies the LT predicate on the "deleted_by" field.

func DeletedByLTE

func DeletedByLTE(v string) predicate.User

DeletedByLTE applies the LTE predicate on the "deleted_by" field.

func DeletedByNEQ

func DeletedByNEQ(v string) predicate.User

DeletedByNEQ applies the NEQ predicate on the "deleted_by" field.

func DeletedByNotIn

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

DeletedByNotIn applies the NotIn predicate on the "deleted_by" field.

func DeletedByNotNil

func DeletedByNotNil() predicate.User

DeletedByNotNil applies the NotNil predicate on the "deleted_by" 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 ExternalID

func ExternalID(v string) predicate.User

ExternalID applies equality check predicate on the "external_id" field. It's identical to ExternalIDEQ.

func ExternalIDContains

func ExternalIDContains(v string) predicate.User

ExternalIDContains applies the Contains predicate on the "external_id" field.

func ExternalIDContainsFold

func ExternalIDContainsFold(v string) predicate.User

ExternalIDContainsFold applies the ContainsFold predicate on the "external_id" field.

func ExternalIDEQ

func ExternalIDEQ(v string) predicate.User

ExternalIDEQ applies the EQ predicate on the "external_id" field.

func ExternalIDEqualFold

func ExternalIDEqualFold(v string) predicate.User

ExternalIDEqualFold applies the EqualFold predicate on the "external_id" field.

func ExternalIDGT

func ExternalIDGT(v string) predicate.User

ExternalIDGT applies the GT predicate on the "external_id" field.

func ExternalIDGTE

func ExternalIDGTE(v string) predicate.User

ExternalIDGTE applies the GTE predicate on the "external_id" field.

func ExternalIDHasPrefix

func ExternalIDHasPrefix(v string) predicate.User

ExternalIDHasPrefix applies the HasPrefix predicate on the "external_id" field.

func ExternalIDHasSuffix

func ExternalIDHasSuffix(v string) predicate.User

ExternalIDHasSuffix applies the HasSuffix predicate on the "external_id" field.

func ExternalIDIn

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

ExternalIDIn applies the In predicate on the "external_id" field.

func ExternalIDLT

func ExternalIDLT(v string) predicate.User

ExternalIDLT applies the LT predicate on the "external_id" field.

func ExternalIDLTE

func ExternalIDLTE(v string) predicate.User

ExternalIDLTE applies the LTE predicate on the "external_id" field.

func ExternalIDNEQ

func ExternalIDNEQ(v string) predicate.User

ExternalIDNEQ applies the NEQ predicate on the "external_id" field.

func ExternalIDNotIn

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

ExternalIDNotIn applies the NotIn predicate on the "external_id" field.

func HasAPIKeys

func HasAPIKeys() predicate.User

HasAPIKeys applies the HasEdge predicate on the "api_keys" edge.

func HasAPIKeysWith

func HasAPIKeysWith(preds ...predicate.ApiKey) predicate.User

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

func HasComments

func HasComments() predicate.User

HasComments applies the HasEdge predicate on the "comments" edge.

func HasCommentsWith

func HasCommentsWith(preds ...predicate.Comment) predicate.User

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

func HasLikedPosts

func HasLikedPosts() predicate.User

HasLikedPosts applies the HasEdge predicate on the "liked_posts" edge.

func HasLikedPostsWith

func HasLikedPostsWith(preds ...predicate.Post) predicate.User

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

func HasPublishedPosts

func HasPublishedPosts() predicate.User

HasPublishedPosts applies the HasEdge predicate on the "published_posts" edge.

func HasPublishedPostsWith

func HasPublishedPostsWith(preds ...predicate.Post) predicate.User

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

func HasRefreshTokens

func HasRefreshTokens() predicate.User

HasRefreshTokens applies the HasEdge predicate on the "refresh_tokens" edge.

func HasRefreshTokensWith

func HasRefreshTokensWith(preds ...predicate.RefreshToken) predicate.User

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

func HasSavedPosts

func HasSavedPosts() predicate.User

HasSavedPosts applies the HasEdge predicate on the "saved_posts" edge.

func HasSavedPostsWith

func HasSavedPostsWith(preds ...predicate.Post) predicate.User

HasSavedPostsWith applies the HasEdge predicate on the "saved_posts" 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 LastPostSeenCursor

func LastPostSeenCursor(v string) predicate.User

LastPostSeenCursor applies equality check predicate on the "last_post_seen_cursor" field. It's identical to LastPostSeenCursorEQ.

func LastPostSeenCursorContains

func LastPostSeenCursorContains(v string) predicate.User

LastPostSeenCursorContains applies the Contains predicate on the "last_post_seen_cursor" field.

func LastPostSeenCursorContainsFold

func LastPostSeenCursorContainsFold(v string) predicate.User

LastPostSeenCursorContainsFold applies the ContainsFold predicate on the "last_post_seen_cursor" field.

func LastPostSeenCursorEQ

func LastPostSeenCursorEQ(v string) predicate.User

LastPostSeenCursorEQ applies the EQ predicate on the "last_post_seen_cursor" field.

func LastPostSeenCursorEqualFold

func LastPostSeenCursorEqualFold(v string) predicate.User

LastPostSeenCursorEqualFold applies the EqualFold predicate on the "last_post_seen_cursor" field.

func LastPostSeenCursorGT

func LastPostSeenCursorGT(v string) predicate.User

LastPostSeenCursorGT applies the GT predicate on the "last_post_seen_cursor" field.

func LastPostSeenCursorGTE

func LastPostSeenCursorGTE(v string) predicate.User

LastPostSeenCursorGTE applies the GTE predicate on the "last_post_seen_cursor" field.

func LastPostSeenCursorHasPrefix

func LastPostSeenCursorHasPrefix(v string) predicate.User

LastPostSeenCursorHasPrefix applies the HasPrefix predicate on the "last_post_seen_cursor" field.

func LastPostSeenCursorHasSuffix

func LastPostSeenCursorHasSuffix(v string) predicate.User

LastPostSeenCursorHasSuffix applies the HasSuffix predicate on the "last_post_seen_cursor" field.

func LastPostSeenCursorIn

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

LastPostSeenCursorIn applies the In predicate on the "last_post_seen_cursor" field.

func LastPostSeenCursorIsNil

func LastPostSeenCursorIsNil() predicate.User

LastPostSeenCursorIsNil applies the IsNil predicate on the "last_post_seen_cursor" field.

func LastPostSeenCursorLT

func LastPostSeenCursorLT(v string) predicate.User

LastPostSeenCursorLT applies the LT predicate on the "last_post_seen_cursor" field.

func LastPostSeenCursorLTE

func LastPostSeenCursorLTE(v string) predicate.User

LastPostSeenCursorLTE applies the LTE predicate on the "last_post_seen_cursor" field.

func LastPostSeenCursorNEQ

func LastPostSeenCursorNEQ(v string) predicate.User

LastPostSeenCursorNEQ applies the NEQ predicate on the "last_post_seen_cursor" field.

func LastPostSeenCursorNotIn

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

LastPostSeenCursorNotIn applies the NotIn predicate on the "last_post_seen_cursor" field.

func LastPostSeenCursorNotNil

func LastPostSeenCursorNotNil() predicate.User

LastPostSeenCursorNotNil applies the NotNil predicate on the "last_post_seen_cursor" field.

func LastSeenAt

func LastSeenAt(v time.Time) predicate.User

LastSeenAt applies equality check predicate on the "last_seen_at" field. It's identical to LastSeenAtEQ.

func LastSeenAtEQ

func LastSeenAtEQ(v time.Time) predicate.User

LastSeenAtEQ applies the EQ predicate on the "last_seen_at" field.

func LastSeenAtGT

func LastSeenAtGT(v time.Time) predicate.User

LastSeenAtGT applies the GT predicate on the "last_seen_at" field.

func LastSeenAtGTE

func LastSeenAtGTE(v time.Time) predicate.User

LastSeenAtGTE applies the GTE predicate on the "last_seen_at" field.

func LastSeenAtIn

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

LastSeenAtIn applies the In predicate on the "last_seen_at" field.

func LastSeenAtIsNil

func LastSeenAtIsNil() predicate.User

LastSeenAtIsNil applies the IsNil predicate on the "last_seen_at" field.

func LastSeenAtLT

func LastSeenAtLT(v time.Time) predicate.User

LastSeenAtLT applies the LT predicate on the "last_seen_at" field.

func LastSeenAtLTE

func LastSeenAtLTE(v time.Time) predicate.User

LastSeenAtLTE applies the LTE predicate on the "last_seen_at" field.

func LastSeenAtNEQ

func LastSeenAtNEQ(v time.Time) predicate.User

LastSeenAtNEQ applies the NEQ predicate on the "last_seen_at" field.

func LastSeenAtNotIn

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

LastSeenAtNotIn applies the NotIn predicate on the "last_seen_at" field.

func LastSeenAtNotNil

func LastSeenAtNotNil() predicate.User

LastSeenAtNotNil applies the NotNil predicate on the "last_seen_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 ProfileImage

func ProfileImage(v string) predicate.User

ProfileImage applies equality check predicate on the "profile_image" field. It's identical to ProfileImageEQ.

func ProfileImageContains

func ProfileImageContains(v string) predicate.User

ProfileImageContains applies the Contains predicate on the "profile_image" field.

func ProfileImageContainsFold

func ProfileImageContainsFold(v string) predicate.User

ProfileImageContainsFold applies the ContainsFold predicate on the "profile_image" field.

func ProfileImageEQ

func ProfileImageEQ(v string) predicate.User

ProfileImageEQ applies the EQ predicate on the "profile_image" field.

func ProfileImageEqualFold

func ProfileImageEqualFold(v string) predicate.User

ProfileImageEqualFold applies the EqualFold predicate on the "profile_image" field.

func ProfileImageGT

func ProfileImageGT(v string) predicate.User

ProfileImageGT applies the GT predicate on the "profile_image" field.

func ProfileImageGTE

func ProfileImageGTE(v string) predicate.User

ProfileImageGTE applies the GTE predicate on the "profile_image" field.

func ProfileImageHasPrefix

func ProfileImageHasPrefix(v string) predicate.User

ProfileImageHasPrefix applies the HasPrefix predicate on the "profile_image" field.

func ProfileImageHasSuffix

func ProfileImageHasSuffix(v string) predicate.User

ProfileImageHasSuffix applies the HasSuffix predicate on the "profile_image" field.

func ProfileImageIn

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

ProfileImageIn applies the In predicate on the "profile_image" field.

func ProfileImageIsNil

func ProfileImageIsNil() predicate.User

ProfileImageIsNil applies the IsNil predicate on the "profile_image" field.

func ProfileImageLT

func ProfileImageLT(v string) predicate.User

ProfileImageLT applies the LT predicate on the "profile_image" field.

func ProfileImageLTE

func ProfileImageLTE(v string) predicate.User

ProfileImageLTE applies the LTE predicate on the "profile_image" field.

func ProfileImageNEQ

func ProfileImageNEQ(v string) predicate.User

ProfileImageNEQ applies the NEQ predicate on the "profile_image" field.

func ProfileImageNotIn

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

ProfileImageNotIn applies the NotIn predicate on the "profile_image" field.

func ProfileImageNotNil

func ProfileImageNotNil() predicate.User

ProfileImageNotNil applies the NotNil predicate on the "profile_image" field.

func RoleEQ

func RoleEQ(v Role) predicate.User

RoleEQ applies the EQ predicate on the "role" field.

func RoleIn

func RoleIn(vs ...Role) predicate.User

RoleIn applies the In predicate on the "role" field.

func RoleNEQ

func RoleNEQ(v Role) predicate.User

RoleNEQ applies the NEQ predicate on the "role" field.

func RoleNotIn

func RoleNotIn(vs ...Role) predicate.User

RoleNotIn applies the NotIn predicate on the "role" field.

func RoleValidator

func RoleValidator(r Role) error

RoleValidator is a validator for the "role" 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 AuthProvider

type AuthProvider string

AuthProvider defines the type for the "auth_provider" enum field.

const (
	AuthProviderTWITCH AuthProvider = "TWITCH"
)

AuthProvider values.

func AllAuthProviders

func AllAuthProviders() []AuthProvider

AllAuthProviders returns all AuthProvider values.

func (AuthProvider) MarshalGQL

func (e AuthProvider) MarshalGQL(w io.Writer)

MarshalGQL implements graphql.Marshaler interface.

func (AuthProvider) String

func (ap AuthProvider) String() string

func (*AuthProvider) UnmarshalGQL

func (e *AuthProvider) UnmarshalGQL(val interface{}) error

UnmarshalGQL implements graphql.Unmarshaler interface.

type OrderOption

type OrderOption func(*sql.Selector)

OrderOption defines the ordering options for the User queries.

func ByAPIKeys

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

ByAPIKeys orders the results by api_keys terms.

func ByAPIKeysCount

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

ByAPIKeysCount orders the results by api_keys count.

func ByAlias

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

ByAlias orders the results by the alias field.

func ByAuthProvider

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

ByAuthProvider orders the results by the auth_provider field.

func ByComments

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

ByComments orders the results by comments terms.

func ByCommentsCount

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

ByCommentsCount orders the results by comments count.

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 ByDeletedBy

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

ByDeletedBy orders the results by the deleted_by field.

func ByDisplayName

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

ByDisplayName orders the results by the display_name field.

func ByExternalID

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

ByExternalID orders the results by the external_id field.

func ByID

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

ByID orders the results by the id field.

func ByLastPostSeenCursor

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

ByLastPostSeenCursor orders the results by the last_post_seen_cursor field.

func ByLastSeenAt

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

ByLastSeenAt orders the results by the last_seen_at field.

func ByLikedPosts

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

ByLikedPosts orders the results by liked_posts terms.

func ByLikedPostsCount

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

ByLikedPostsCount orders the results by liked_posts count.

func ByProfileImage

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

ByProfileImage orders the results by the profile_image field.

func ByPublishedPosts

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

ByPublishedPosts orders the results by published_posts terms.

func ByPublishedPostsCount

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

ByPublishedPostsCount orders the results by published_posts count.

func ByRefreshTokens

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

ByRefreshTokens orders the results by refresh_tokens terms.

func ByRefreshTokensCount

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

ByRefreshTokensCount orders the results by refresh_tokens count.

func ByRole

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

ByRole orders the results by the role field.

func BySavedPosts

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

BySavedPosts orders the results by saved_posts terms.

func BySavedPostsCount

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

BySavedPostsCount orders the results by saved_posts count.

func ByUpdatedAt

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

ByUpdatedAt orders the results by the updated_at field.

type Role

type Role string

Role defines the type for the "role" enum field.

const (
	RoleGUEST     Role = "GUEST"
	RoleUSER      Role = "USER"
	RoleADMIN     Role = "ADMIN"
	RoleMODERATOR Role = "MODERATOR"
)

Role values.

func AllRoles

func AllRoles() []Role

AllRoles returns all Role values.

func (Role) MarshalGQL

func (e Role) MarshalGQL(w io.Writer)

MarshalGQL implements graphql.Marshaler interface.

func (Role) String

func (r Role) String() string

func (*Role) UnmarshalGQL

func (e *Role) UnmarshalGQL(val interface{}) error

UnmarshalGQL implements graphql.Unmarshaler interface.

Jump to

Keyboard shortcuts

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