sessions

package
v0.0.0-...-33a8a84 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2025 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Label holds the string label denoting the sessions type in the database.
	Label = "sessions"
	// FieldID holds the string denoting the id field in the database.
	FieldID = "token"
	// FieldData holds the string denoting the data field in the database.
	FieldData = "data"
	// FieldExpiry holds the string denoting the expiry field in the database.
	FieldExpiry = "expiry"
	// EdgeOwner holds the string denoting the owner edge name in mutations.
	EdgeOwner = "owner"
	// UserFieldID holds the string denoting the ID field of the User.
	UserFieldID = "uid"
	// Table holds the table name of the sessions in the database.
	Table = "sessions"
	// OwnerTable is the table that holds the owner relation/edge.
	OwnerTable = "sessions"
	// OwnerInverseTable is the table name for the User entity.
	// It exists in this package in order to avoid circular dependency with the "user" package.
	OwnerInverseTable = "users"
	// OwnerColumn is the table column denoting the owner relation/edge.
	OwnerColumn = "user_sessions"
)

Variables

View Source
var (
	// DataValidator is a validator for the "data" field. It is called by the builders before save.
	DataValidator func([]byte) error
	// IDValidator is a validator for the "id" field. It is called by the builders before save.
	IDValidator func(string) error
)

Columns holds all SQL columns for sessions fields.

View Source
var ForeignKeys = []string{
	"user_sessions",
}

ForeignKeys holds the SQL foreign-keys that are owned by the "sessions" table and are not defined as standalone fields in the schema.

Functions

func And

func And(predicates ...predicate.Sessions) predicate.Sessions

And groups predicates with the AND operator between them.

func Data

func Data(v []byte) predicate.Sessions

Data applies equality check predicate on the "data" field. It's identical to DataEQ.

func DataEQ

func DataEQ(v []byte) predicate.Sessions

DataEQ applies the EQ predicate on the "data" field.

func DataGT

func DataGT(v []byte) predicate.Sessions

DataGT applies the GT predicate on the "data" field.

func DataGTE

func DataGTE(v []byte) predicate.Sessions

DataGTE applies the GTE predicate on the "data" field.

func DataIn

func DataIn(vs ...[]byte) predicate.Sessions

DataIn applies the In predicate on the "data" field.

func DataLT

func DataLT(v []byte) predicate.Sessions

DataLT applies the LT predicate on the "data" field.

func DataLTE

func DataLTE(v []byte) predicate.Sessions

DataLTE applies the LTE predicate on the "data" field.

func DataNEQ

func DataNEQ(v []byte) predicate.Sessions

DataNEQ applies the NEQ predicate on the "data" field.

func DataNotIn

func DataNotIn(vs ...[]byte) predicate.Sessions

DataNotIn applies the NotIn predicate on the "data" field.

func Expiry

func Expiry(v time.Time) predicate.Sessions

Expiry applies equality check predicate on the "expiry" field. It's identical to ExpiryEQ.

func ExpiryEQ

func ExpiryEQ(v time.Time) predicate.Sessions

ExpiryEQ applies the EQ predicate on the "expiry" field.

func ExpiryGT

func ExpiryGT(v time.Time) predicate.Sessions

ExpiryGT applies the GT predicate on the "expiry" field.

func ExpiryGTE

func ExpiryGTE(v time.Time) predicate.Sessions

ExpiryGTE applies the GTE predicate on the "expiry" field.

func ExpiryIn

func ExpiryIn(vs ...time.Time) predicate.Sessions

ExpiryIn applies the In predicate on the "expiry" field.

func ExpiryLT

func ExpiryLT(v time.Time) predicate.Sessions

ExpiryLT applies the LT predicate on the "expiry" field.

func ExpiryLTE

func ExpiryLTE(v time.Time) predicate.Sessions

ExpiryLTE applies the LTE predicate on the "expiry" field.

func ExpiryNEQ

func ExpiryNEQ(v time.Time) predicate.Sessions

ExpiryNEQ applies the NEQ predicate on the "expiry" field.

func ExpiryNotIn

func ExpiryNotIn(vs ...time.Time) predicate.Sessions

ExpiryNotIn applies the NotIn predicate on the "expiry" field.

func HasOwner

func HasOwner() predicate.Sessions

HasOwner applies the HasEdge predicate on the "owner" edge.

func HasOwnerWith

func HasOwnerWith(preds ...predicate.User) predicate.Sessions

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

func ID

func ID(id string) predicate.Sessions

ID filters vertices based on their ID field.

func IDContainsFold

func IDContainsFold(id string) predicate.Sessions

IDContainsFold applies the ContainsFold predicate on the ID field.

func IDEQ

func IDEQ(id string) predicate.Sessions

IDEQ applies the EQ predicate on the ID field.

func IDEqualFold

func IDEqualFold(id string) predicate.Sessions

IDEqualFold applies the EqualFold predicate on the ID field.

func IDGT

func IDGT(id string) predicate.Sessions

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id string) predicate.Sessions

IDGTE applies the GTE predicate on the ID field.

func IDIn

func IDIn(ids ...string) predicate.Sessions

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id string) predicate.Sessions

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id string) predicate.Sessions

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id string) predicate.Sessions

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

func IDNotIn(ids ...string) predicate.Sessions

IDNotIn applies the NotIn predicate on the ID field.

func Not

Not applies the not operator on the given predicate.

func Or

func Or(predicates ...predicate.Sessions) predicate.Sessions

Or groups predicates with the OR operator between them.

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

func ByExpiry

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

ByExpiry orders the results by the expiry field.

func ByID

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

ByID orders the results by the id field.

func ByOwnerField

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

ByOwnerField orders the results by owner field.

Jump to

Keyboard shortcuts

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