passkey

package
v4.0.0-...-5b82330 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2026 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Label holds the string label denoting the passkey type in the database.
	Label = "passkey"
	// FieldID holds the string denoting the id field in the database.
	FieldID = "id"
	// 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"
	// FieldUserID holds the string denoting the user_id field in the database.
	FieldUserID = "user_id"
	// FieldCredentialID holds the string denoting the credential_id field in the database.
	FieldCredentialID = "credential_id"
	// FieldName holds the string denoting the name field in the database.
	FieldName = "name"
	// FieldCredential holds the string denoting the credential field in the database.
	FieldCredential = "credential"
	// FieldUsedAt holds the string denoting the used_at field in the database.
	FieldUsedAt = "used_at"
	// EdgeUser holds the string denoting the user edge name in mutations.
	EdgeUser = "user"
	// Table holds the table name of the passkey in the database.
	Table = "passkeys"
	// UserTable is the table that holds the user relation/edge.
	UserTable = "passkeys"
	// UserInverseTable is the table name for the User entity.
	// It exists in this package in order to avoid circular dependency with the "user" package.
	UserInverseTable = "users"
	// UserColumn is the table column denoting the user relation/edge.
	UserColumn = "user_id"
)

Variables

View Source
var (
	Hooks        [1]ent.Hook
	Interceptors [1]ent.Interceptor
	// 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
)

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/cloudreve/Cloudreve/v4/ent/runtime"

Columns holds all SQL columns for passkey fields.

Functions

func And

func And(predicates ...predicate.Passkey) predicate.Passkey

And groups predicates with the AND operator between them.

func CreatedAt

func CreatedAt(v time.Time) predicate.Passkey

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

func CreatedAtEQ

func CreatedAtEQ(v time.Time) predicate.Passkey

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

func CreatedAtGT

func CreatedAtGT(v time.Time) predicate.Passkey

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

func CreatedAtGTE

func CreatedAtGTE(v time.Time) predicate.Passkey

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

func CreatedAtIn

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

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

func CreatedAtLT

func CreatedAtLT(v time.Time) predicate.Passkey

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

func CreatedAtLTE

func CreatedAtLTE(v time.Time) predicate.Passkey

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

func CreatedAtNEQ

func CreatedAtNEQ(v time.Time) predicate.Passkey

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

func CreatedAtNotIn

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

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

func CredentialID

func CredentialID(v string) predicate.Passkey

CredentialID applies equality check predicate on the "credential_id" field. It's identical to CredentialIDEQ.

func CredentialIDContains

func CredentialIDContains(v string) predicate.Passkey

CredentialIDContains applies the Contains predicate on the "credential_id" field.

func CredentialIDContainsFold

func CredentialIDContainsFold(v string) predicate.Passkey

CredentialIDContainsFold applies the ContainsFold predicate on the "credential_id" field.

func CredentialIDEQ

func CredentialIDEQ(v string) predicate.Passkey

CredentialIDEQ applies the EQ predicate on the "credential_id" field.

func CredentialIDEqualFold

func CredentialIDEqualFold(v string) predicate.Passkey

CredentialIDEqualFold applies the EqualFold predicate on the "credential_id" field.

func CredentialIDGT

func CredentialIDGT(v string) predicate.Passkey

CredentialIDGT applies the GT predicate on the "credential_id" field.

func CredentialIDGTE

func CredentialIDGTE(v string) predicate.Passkey

CredentialIDGTE applies the GTE predicate on the "credential_id" field.

func CredentialIDHasPrefix

func CredentialIDHasPrefix(v string) predicate.Passkey

CredentialIDHasPrefix applies the HasPrefix predicate on the "credential_id" field.

func CredentialIDHasSuffix

func CredentialIDHasSuffix(v string) predicate.Passkey

CredentialIDHasSuffix applies the HasSuffix predicate on the "credential_id" field.

func CredentialIDIn

func CredentialIDIn(vs ...string) predicate.Passkey

CredentialIDIn applies the In predicate on the "credential_id" field.

func CredentialIDLT

func CredentialIDLT(v string) predicate.Passkey

CredentialIDLT applies the LT predicate on the "credential_id" field.

func CredentialIDLTE

func CredentialIDLTE(v string) predicate.Passkey

CredentialIDLTE applies the LTE predicate on the "credential_id" field.

func CredentialIDNEQ

func CredentialIDNEQ(v string) predicate.Passkey

CredentialIDNEQ applies the NEQ predicate on the "credential_id" field.

func CredentialIDNotIn

func CredentialIDNotIn(vs ...string) predicate.Passkey

CredentialIDNotIn applies the NotIn predicate on the "credential_id" field.

func DeletedAt

func DeletedAt(v time.Time) predicate.Passkey

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

func DeletedAtEQ

func DeletedAtEQ(v time.Time) predicate.Passkey

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

func DeletedAtGT

func DeletedAtGT(v time.Time) predicate.Passkey

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

func DeletedAtGTE

func DeletedAtGTE(v time.Time) predicate.Passkey

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

func DeletedAtIn

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

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

func DeletedAtIsNil

func DeletedAtIsNil() predicate.Passkey

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

func DeletedAtLT

func DeletedAtLT(v time.Time) predicate.Passkey

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

func DeletedAtLTE

func DeletedAtLTE(v time.Time) predicate.Passkey

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

func DeletedAtNEQ

func DeletedAtNEQ(v time.Time) predicate.Passkey

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

func DeletedAtNotIn

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

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

func DeletedAtNotNil

func DeletedAtNotNil() predicate.Passkey

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

func HasUser

func HasUser() predicate.Passkey

HasUser applies the HasEdge predicate on the "user" edge.

func HasUserWith

func HasUserWith(preds ...predicate.User) predicate.Passkey

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

func ID

func ID(id int) predicate.Passkey

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id int) predicate.Passkey

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id int) predicate.Passkey

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id int) predicate.Passkey

IDGTE applies the GTE predicate on the ID field.

func IDIn

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

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id int) predicate.Passkey

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id int) predicate.Passkey

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id int) predicate.Passkey

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

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

IDNotIn applies the NotIn predicate on the ID field.

func Name

func Name(v string) predicate.Passkey

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

func NameContains

func NameContains(v string) predicate.Passkey

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

func NameContainsFold

func NameContainsFold(v string) predicate.Passkey

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

func NameEQ

func NameEQ(v string) predicate.Passkey

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

func NameEqualFold

func NameEqualFold(v string) predicate.Passkey

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

func NameGT

func NameGT(v string) predicate.Passkey

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

func NameGTE

func NameGTE(v string) predicate.Passkey

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

func NameHasPrefix

func NameHasPrefix(v string) predicate.Passkey

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

func NameHasSuffix

func NameHasSuffix(v string) predicate.Passkey

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

func NameIn

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

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

func NameLT

func NameLT(v string) predicate.Passkey

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

func NameLTE

func NameLTE(v string) predicate.Passkey

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

func NameNEQ

func NameNEQ(v string) predicate.Passkey

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

func NameNotIn

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

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

func Not

Not applies the not operator on the given predicate.

func Or

func Or(predicates ...predicate.Passkey) predicate.Passkey

Or groups predicates with the OR operator between them.

func UpdatedAt

func UpdatedAt(v time.Time) predicate.Passkey

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

func UpdatedAtEQ

func UpdatedAtEQ(v time.Time) predicate.Passkey

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

func UpdatedAtGT

func UpdatedAtGT(v time.Time) predicate.Passkey

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

func UpdatedAtGTE

func UpdatedAtGTE(v time.Time) predicate.Passkey

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

func UpdatedAtIn

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

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

func UpdatedAtLT

func UpdatedAtLT(v time.Time) predicate.Passkey

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

func UpdatedAtLTE

func UpdatedAtLTE(v time.Time) predicate.Passkey

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

func UpdatedAtNEQ

func UpdatedAtNEQ(v time.Time) predicate.Passkey

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

func UpdatedAtNotIn

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

UpdatedAtNotIn applies the NotIn predicate on the "updated_at" field.

func UsedAt

func UsedAt(v time.Time) predicate.Passkey

UsedAt applies equality check predicate on the "used_at" field. It's identical to UsedAtEQ.

func UsedAtEQ

func UsedAtEQ(v time.Time) predicate.Passkey

UsedAtEQ applies the EQ predicate on the "used_at" field.

func UsedAtGT

func UsedAtGT(v time.Time) predicate.Passkey

UsedAtGT applies the GT predicate on the "used_at" field.

func UsedAtGTE

func UsedAtGTE(v time.Time) predicate.Passkey

UsedAtGTE applies the GTE predicate on the "used_at" field.

func UsedAtIn

func UsedAtIn(vs ...time.Time) predicate.Passkey

UsedAtIn applies the In predicate on the "used_at" field.

func UsedAtIsNil

func UsedAtIsNil() predicate.Passkey

UsedAtIsNil applies the IsNil predicate on the "used_at" field.

func UsedAtLT

func UsedAtLT(v time.Time) predicate.Passkey

UsedAtLT applies the LT predicate on the "used_at" field.

func UsedAtLTE

func UsedAtLTE(v time.Time) predicate.Passkey

UsedAtLTE applies the LTE predicate on the "used_at" field.

func UsedAtNEQ

func UsedAtNEQ(v time.Time) predicate.Passkey

UsedAtNEQ applies the NEQ predicate on the "used_at" field.

func UsedAtNotIn

func UsedAtNotIn(vs ...time.Time) predicate.Passkey

UsedAtNotIn applies the NotIn predicate on the "used_at" field.

func UsedAtNotNil

func UsedAtNotNil() predicate.Passkey

UsedAtNotNil applies the NotNil predicate on the "used_at" field.

func UserID

func UserID(v int) predicate.Passkey

UserID applies equality check predicate on the "user_id" field. It's identical to UserIDEQ.

func UserIDEQ

func UserIDEQ(v int) predicate.Passkey

UserIDEQ applies the EQ predicate on the "user_id" field.

func UserIDIn

func UserIDIn(vs ...int) predicate.Passkey

UserIDIn applies the In predicate on the "user_id" field.

func UserIDNEQ

func UserIDNEQ(v int) predicate.Passkey

UserIDNEQ applies the NEQ predicate on the "user_id" field.

func UserIDNotIn

func UserIDNotIn(vs ...int) predicate.Passkey

UserIDNotIn applies the NotIn predicate on the "user_id" 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 Passkey queries.

func ByCreatedAt

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

ByCreatedAt orders the results by the created_at field.

func ByCredentialID

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

ByCredentialID orders the results by the credential_id field.

func ByDeletedAt

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

ByDeletedAt orders the results by the deleted_at field.

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 ByUpdatedAt

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

ByUpdatedAt orders the results by the updated_at field.

func ByUsedAt

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

ByUsedAt orders the results by the used_at field.

func ByUserField

func ByUserField(field string, opts ...sql.OrderTermOption) OrderOption

ByUserField orders the results by user field.

func ByUserID

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

ByUserID orders the results by the user_id field.

Jump to

Keyboard shortcuts

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