oauthgrant

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 oauthgrant type in the database.
	Label = "oauth_grant"
	// 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"
	// FieldClientID holds the string denoting the client_id field in the database.
	FieldClientID = "client_id"
	// FieldScopes holds the string denoting the scopes field in the database.
	FieldScopes = "scopes"
	// FieldLastUsedAt holds the string denoting the last_used_at field in the database.
	FieldLastUsedAt = "last_used_at"
	// EdgeUser holds the string denoting the user edge name in mutations.
	EdgeUser = "user"
	// EdgeClient holds the string denoting the client edge name in mutations.
	EdgeClient = "client"
	// Table holds the table name of the oauthgrant in the database.
	Table = "oauth_grants"
	// UserTable is the table that holds the user relation/edge.
	UserTable = "oauth_grants"
	// 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"
	// ClientTable is the table that holds the client relation/edge.
	ClientTable = "oauth_grants"
	// ClientInverseTable is the table name for the OAuthClient entity.
	// It exists in this package in order to avoid circular dependency with the "oauthclient" package.
	ClientInverseTable = "oauth_clients"
	// ClientColumn is the table column denoting the client relation/edge.
	ClientColumn = "client_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
	// DefaultScopes holds the default value on creation for the "scopes" field.
	DefaultScopes []string
)

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 oauthgrant fields.

Functions

func And

func And(predicates ...predicate.OAuthGrant) predicate.OAuthGrant

And groups predicates with the AND operator between them.

func ClientID

func ClientID(v int) predicate.OAuthGrant

ClientID applies equality check predicate on the "client_id" field. It's identical to ClientIDEQ.

func ClientIDEQ

func ClientIDEQ(v int) predicate.OAuthGrant

ClientIDEQ applies the EQ predicate on the "client_id" field.

func ClientIDIn

func ClientIDIn(vs ...int) predicate.OAuthGrant

ClientIDIn applies the In predicate on the "client_id" field.

func ClientIDNEQ

func ClientIDNEQ(v int) predicate.OAuthGrant

ClientIDNEQ applies the NEQ predicate on the "client_id" field.

func ClientIDNotIn

func ClientIDNotIn(vs ...int) predicate.OAuthGrant

ClientIDNotIn applies the NotIn predicate on the "client_id" field.

func CreatedAt

func CreatedAt(v time.Time) predicate.OAuthGrant

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

func CreatedAtEQ

func CreatedAtEQ(v time.Time) predicate.OAuthGrant

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

func CreatedAtGT

func CreatedAtGT(v time.Time) predicate.OAuthGrant

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

func CreatedAtGTE

func CreatedAtGTE(v time.Time) predicate.OAuthGrant

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

func CreatedAtIn

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

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

func CreatedAtLT

func CreatedAtLT(v time.Time) predicate.OAuthGrant

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

func CreatedAtLTE

func CreatedAtLTE(v time.Time) predicate.OAuthGrant

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

func CreatedAtNEQ

func CreatedAtNEQ(v time.Time) predicate.OAuthGrant

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

func CreatedAtNotIn

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

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

func DeletedAt

func DeletedAt(v time.Time) predicate.OAuthGrant

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

func DeletedAtEQ

func DeletedAtEQ(v time.Time) predicate.OAuthGrant

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

func DeletedAtGT

func DeletedAtGT(v time.Time) predicate.OAuthGrant

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

func DeletedAtGTE

func DeletedAtGTE(v time.Time) predicate.OAuthGrant

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

func DeletedAtIn

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

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

func DeletedAtIsNil

func DeletedAtIsNil() predicate.OAuthGrant

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

func DeletedAtLT

func DeletedAtLT(v time.Time) predicate.OAuthGrant

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

func DeletedAtLTE

func DeletedAtLTE(v time.Time) predicate.OAuthGrant

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

func DeletedAtNEQ

func DeletedAtNEQ(v time.Time) predicate.OAuthGrant

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

func DeletedAtNotIn

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

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

func DeletedAtNotNil

func DeletedAtNotNil() predicate.OAuthGrant

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

func HasClient

func HasClient() predicate.OAuthGrant

HasClient applies the HasEdge predicate on the "client" edge.

func HasClientWith

func HasClientWith(preds ...predicate.OAuthClient) predicate.OAuthGrant

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

func HasUser

func HasUser() predicate.OAuthGrant

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

func HasUserWith

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

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

func ID

func ID(id int) predicate.OAuthGrant

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id int) predicate.OAuthGrant

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id int) predicate.OAuthGrant

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id int) predicate.OAuthGrant

IDGTE applies the GTE predicate on the ID field.

func IDIn

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

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id int) predicate.OAuthGrant

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id int) predicate.OAuthGrant

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id int) predicate.OAuthGrant

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

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

IDNotIn applies the NotIn predicate on the ID field.

func LastUsedAt

func LastUsedAt(v time.Time) predicate.OAuthGrant

LastUsedAt applies equality check predicate on the "last_used_at" field. It's identical to LastUsedAtEQ.

func LastUsedAtEQ

func LastUsedAtEQ(v time.Time) predicate.OAuthGrant

LastUsedAtEQ applies the EQ predicate on the "last_used_at" field.

func LastUsedAtGT

func LastUsedAtGT(v time.Time) predicate.OAuthGrant

LastUsedAtGT applies the GT predicate on the "last_used_at" field.

func LastUsedAtGTE

func LastUsedAtGTE(v time.Time) predicate.OAuthGrant

LastUsedAtGTE applies the GTE predicate on the "last_used_at" field.

func LastUsedAtIn

func LastUsedAtIn(vs ...time.Time) predicate.OAuthGrant

LastUsedAtIn applies the In predicate on the "last_used_at" field.

func LastUsedAtIsNil

func LastUsedAtIsNil() predicate.OAuthGrant

LastUsedAtIsNil applies the IsNil predicate on the "last_used_at" field.

func LastUsedAtLT

func LastUsedAtLT(v time.Time) predicate.OAuthGrant

LastUsedAtLT applies the LT predicate on the "last_used_at" field.

func LastUsedAtLTE

func LastUsedAtLTE(v time.Time) predicate.OAuthGrant

LastUsedAtLTE applies the LTE predicate on the "last_used_at" field.

func LastUsedAtNEQ

func LastUsedAtNEQ(v time.Time) predicate.OAuthGrant

LastUsedAtNEQ applies the NEQ predicate on the "last_used_at" field.

func LastUsedAtNotIn

func LastUsedAtNotIn(vs ...time.Time) predicate.OAuthGrant

LastUsedAtNotIn applies the NotIn predicate on the "last_used_at" field.

func LastUsedAtNotNil

func LastUsedAtNotNil() predicate.OAuthGrant

LastUsedAtNotNil applies the NotNil predicate on the "last_used_at" field.

func Not

Not applies the not operator on the given predicate.

func Or

func Or(predicates ...predicate.OAuthGrant) predicate.OAuthGrant

Or groups predicates with the OR operator between them.

func UpdatedAt

func UpdatedAt(v time.Time) predicate.OAuthGrant

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

func UpdatedAtEQ

func UpdatedAtEQ(v time.Time) predicate.OAuthGrant

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

func UpdatedAtGT

func UpdatedAtGT(v time.Time) predicate.OAuthGrant

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

func UpdatedAtGTE

func UpdatedAtGTE(v time.Time) predicate.OAuthGrant

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

func UpdatedAtIn

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

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

func UpdatedAtLT

func UpdatedAtLT(v time.Time) predicate.OAuthGrant

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

func UpdatedAtLTE

func UpdatedAtLTE(v time.Time) predicate.OAuthGrant

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

func UpdatedAtNEQ

func UpdatedAtNEQ(v time.Time) predicate.OAuthGrant

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

func UpdatedAtNotIn

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

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

func UserID

func UserID(v int) predicate.OAuthGrant

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

func UserIDEQ

func UserIDEQ(v int) predicate.OAuthGrant

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

func UserIDIn

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

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

func UserIDNEQ

func UserIDNEQ(v int) predicate.OAuthGrant

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

func UserIDNotIn

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

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

func ByClientField

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

ByClientField orders the results by client field.

func ByClientID

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

ByClientID orders the results by the client_id field.

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 ByID

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

ByID orders the results by the id field.

func ByLastUsedAt

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

ByLastUsedAt orders the results by the last_used_at field.

func ByUpdatedAt

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

ByUpdatedAt orders the results by the updated_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