authsession

package
v0.18.0 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Label holds the string label denoting the authsession type in the database.
	Label = "auth_session"
	// FieldID holds the string denoting the id field in the database.
	FieldID = "id"
	// FieldUserID holds the string denoting the user_id field in the database.
	FieldUserID = "user_id"
	// FieldTokenHash holds the string denoting the token_hash field in the database.
	FieldTokenHash = "token_hash"
	// FieldCreatedAt holds the string denoting the created_at field in the database.
	FieldCreatedAt = "created_at"
	// FieldLastSeenAt holds the string denoting the last_seen_at field in the database.
	FieldLastSeenAt = "last_seen_at"
	// FieldExpiresAt holds the string denoting the expires_at field in the database.
	FieldExpiresAt = "expires_at"
	// FieldUserAgent holds the string denoting the user_agent field in the database.
	FieldUserAgent = "user_agent"
	// FieldCreatedIP holds the string denoting the created_ip field in the database.
	FieldCreatedIP = "created_ip"
	// EdgeUser holds the string denoting the user edge name in mutations.
	EdgeUser = "user"
	// Table holds the table name of the authsession in the database.
	Table = "auth_sessions"
	// UserTable is the table that holds the user relation/edge.
	UserTable = "auth_sessions"
	// 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 (
	// TokenHashValidator is a validator for the "token_hash" field. It is called by the builders before save.
	TokenHashValidator func(string) error
	// DefaultCreatedAt holds the default value on creation for the "created_at" field.
	DefaultCreatedAt func() time.Time
	// DefaultLastSeenAt holds the default value on creation for the "last_seen_at" field.
	DefaultLastSeenAt func() time.Time
	// DefaultID holds the default value on creation for the "id" field.
	DefaultID func() uuid.UUID
)

Columns holds all SQL columns for authsession fields.

Functions

func And

func And(predicates ...predicate.AuthSession) predicate.AuthSession

And groups predicates with the AND operator between them.

func CreatedAt

func CreatedAt(v time.Time) predicate.AuthSession

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

func CreatedAtEQ

func CreatedAtEQ(v time.Time) predicate.AuthSession

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

func CreatedAtGT

func CreatedAtGT(v time.Time) predicate.AuthSession

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

func CreatedAtGTE

func CreatedAtGTE(v time.Time) predicate.AuthSession

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

func CreatedAtIn

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

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

func CreatedAtLT

func CreatedAtLT(v time.Time) predicate.AuthSession

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

func CreatedAtLTE

func CreatedAtLTE(v time.Time) predicate.AuthSession

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

func CreatedAtNEQ

func CreatedAtNEQ(v time.Time) predicate.AuthSession

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

func CreatedAtNotIn

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

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

func CreatedIP

func CreatedIP(v string) predicate.AuthSession

CreatedIP applies equality check predicate on the "created_ip" field. It's identical to CreatedIPEQ.

func CreatedIPContains

func CreatedIPContains(v string) predicate.AuthSession

CreatedIPContains applies the Contains predicate on the "created_ip" field.

func CreatedIPContainsFold

func CreatedIPContainsFold(v string) predicate.AuthSession

CreatedIPContainsFold applies the ContainsFold predicate on the "created_ip" field.

func CreatedIPEQ

func CreatedIPEQ(v string) predicate.AuthSession

CreatedIPEQ applies the EQ predicate on the "created_ip" field.

func CreatedIPEqualFold

func CreatedIPEqualFold(v string) predicate.AuthSession

CreatedIPEqualFold applies the EqualFold predicate on the "created_ip" field.

func CreatedIPGT

func CreatedIPGT(v string) predicate.AuthSession

CreatedIPGT applies the GT predicate on the "created_ip" field.

func CreatedIPGTE

func CreatedIPGTE(v string) predicate.AuthSession

CreatedIPGTE applies the GTE predicate on the "created_ip" field.

func CreatedIPHasPrefix

func CreatedIPHasPrefix(v string) predicate.AuthSession

CreatedIPHasPrefix applies the HasPrefix predicate on the "created_ip" field.

func CreatedIPHasSuffix

func CreatedIPHasSuffix(v string) predicate.AuthSession

CreatedIPHasSuffix applies the HasSuffix predicate on the "created_ip" field.

func CreatedIPIn

func CreatedIPIn(vs ...string) predicate.AuthSession

CreatedIPIn applies the In predicate on the "created_ip" field.

func CreatedIPIsNil

func CreatedIPIsNil() predicate.AuthSession

CreatedIPIsNil applies the IsNil predicate on the "created_ip" field.

func CreatedIPLT

func CreatedIPLT(v string) predicate.AuthSession

CreatedIPLT applies the LT predicate on the "created_ip" field.

func CreatedIPLTE

func CreatedIPLTE(v string) predicate.AuthSession

CreatedIPLTE applies the LTE predicate on the "created_ip" field.

func CreatedIPNEQ

func CreatedIPNEQ(v string) predicate.AuthSession

CreatedIPNEQ applies the NEQ predicate on the "created_ip" field.

func CreatedIPNotIn

func CreatedIPNotIn(vs ...string) predicate.AuthSession

CreatedIPNotIn applies the NotIn predicate on the "created_ip" field.

func CreatedIPNotNil

func CreatedIPNotNil() predicate.AuthSession

CreatedIPNotNil applies the NotNil predicate on the "created_ip" field.

func ExpiresAt

func ExpiresAt(v time.Time) predicate.AuthSession

ExpiresAt applies equality check predicate on the "expires_at" field. It's identical to ExpiresAtEQ.

func ExpiresAtEQ

func ExpiresAtEQ(v time.Time) predicate.AuthSession

ExpiresAtEQ applies the EQ predicate on the "expires_at" field.

func ExpiresAtGT

func ExpiresAtGT(v time.Time) predicate.AuthSession

ExpiresAtGT applies the GT predicate on the "expires_at" field.

func ExpiresAtGTE

func ExpiresAtGTE(v time.Time) predicate.AuthSession

ExpiresAtGTE applies the GTE predicate on the "expires_at" field.

func ExpiresAtIn

func ExpiresAtIn(vs ...time.Time) predicate.AuthSession

ExpiresAtIn applies the In predicate on the "expires_at" field.

func ExpiresAtLT

func ExpiresAtLT(v time.Time) predicate.AuthSession

ExpiresAtLT applies the LT predicate on the "expires_at" field.

func ExpiresAtLTE

func ExpiresAtLTE(v time.Time) predicate.AuthSession

ExpiresAtLTE applies the LTE predicate on the "expires_at" field.

func ExpiresAtNEQ

func ExpiresAtNEQ(v time.Time) predicate.AuthSession

ExpiresAtNEQ applies the NEQ predicate on the "expires_at" field.

func ExpiresAtNotIn

func ExpiresAtNotIn(vs ...time.Time) predicate.AuthSession

ExpiresAtNotIn applies the NotIn predicate on the "expires_at" field.

func HasUser

func HasUser() predicate.AuthSession

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

func HasUserWith

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

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

func ID

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id uuid.UUID) predicate.AuthSession

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id uuid.UUID) predicate.AuthSession

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id uuid.UUID) predicate.AuthSession

IDGTE applies the GTE predicate on the ID field.

func IDIn

func IDIn(ids ...uuid.UUID) predicate.AuthSession

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id uuid.UUID) predicate.AuthSession

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id uuid.UUID) predicate.AuthSession

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id uuid.UUID) predicate.AuthSession

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

func IDNotIn(ids ...uuid.UUID) predicate.AuthSession

IDNotIn applies the NotIn predicate on the ID field.

func LastSeenAt

func LastSeenAt(v time.Time) predicate.AuthSession

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

func LastSeenAtEQ

func LastSeenAtEQ(v time.Time) predicate.AuthSession

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

func LastSeenAtGT

func LastSeenAtGT(v time.Time) predicate.AuthSession

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

func LastSeenAtGTE

func LastSeenAtGTE(v time.Time) predicate.AuthSession

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

func LastSeenAtIn

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

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

func LastSeenAtLT

func LastSeenAtLT(v time.Time) predicate.AuthSession

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

func LastSeenAtLTE

func LastSeenAtLTE(v time.Time) predicate.AuthSession

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

func LastSeenAtNEQ

func LastSeenAtNEQ(v time.Time) predicate.AuthSession

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

func LastSeenAtNotIn

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

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

func Not

Not applies the not operator on the given predicate.

func Or

func Or(predicates ...predicate.AuthSession) predicate.AuthSession

Or groups predicates with the OR operator between them.

func TokenHash

func TokenHash(v string) predicate.AuthSession

TokenHash applies equality check predicate on the "token_hash" field. It's identical to TokenHashEQ.

func TokenHashContains

func TokenHashContains(v string) predicate.AuthSession

TokenHashContains applies the Contains predicate on the "token_hash" field.

func TokenHashContainsFold

func TokenHashContainsFold(v string) predicate.AuthSession

TokenHashContainsFold applies the ContainsFold predicate on the "token_hash" field.

func TokenHashEQ

func TokenHashEQ(v string) predicate.AuthSession

TokenHashEQ applies the EQ predicate on the "token_hash" field.

func TokenHashEqualFold

func TokenHashEqualFold(v string) predicate.AuthSession

TokenHashEqualFold applies the EqualFold predicate on the "token_hash" field.

func TokenHashGT

func TokenHashGT(v string) predicate.AuthSession

TokenHashGT applies the GT predicate on the "token_hash" field.

func TokenHashGTE

func TokenHashGTE(v string) predicate.AuthSession

TokenHashGTE applies the GTE predicate on the "token_hash" field.

func TokenHashHasPrefix

func TokenHashHasPrefix(v string) predicate.AuthSession

TokenHashHasPrefix applies the HasPrefix predicate on the "token_hash" field.

func TokenHashHasSuffix

func TokenHashHasSuffix(v string) predicate.AuthSession

TokenHashHasSuffix applies the HasSuffix predicate on the "token_hash" field.

func TokenHashIn

func TokenHashIn(vs ...string) predicate.AuthSession

TokenHashIn applies the In predicate on the "token_hash" field.

func TokenHashLT

func TokenHashLT(v string) predicate.AuthSession

TokenHashLT applies the LT predicate on the "token_hash" field.

func TokenHashLTE

func TokenHashLTE(v string) predicate.AuthSession

TokenHashLTE applies the LTE predicate on the "token_hash" field.

func TokenHashNEQ

func TokenHashNEQ(v string) predicate.AuthSession

TokenHashNEQ applies the NEQ predicate on the "token_hash" field.

func TokenHashNotIn

func TokenHashNotIn(vs ...string) predicate.AuthSession

TokenHashNotIn applies the NotIn predicate on the "token_hash" field.

func UserAgent

func UserAgent(v string) predicate.AuthSession

UserAgent applies equality check predicate on the "user_agent" field. It's identical to UserAgentEQ.

func UserAgentContains

func UserAgentContains(v string) predicate.AuthSession

UserAgentContains applies the Contains predicate on the "user_agent" field.

func UserAgentContainsFold

func UserAgentContainsFold(v string) predicate.AuthSession

UserAgentContainsFold applies the ContainsFold predicate on the "user_agent" field.

func UserAgentEQ

func UserAgentEQ(v string) predicate.AuthSession

UserAgentEQ applies the EQ predicate on the "user_agent" field.

func UserAgentEqualFold

func UserAgentEqualFold(v string) predicate.AuthSession

UserAgentEqualFold applies the EqualFold predicate on the "user_agent" field.

func UserAgentGT

func UserAgentGT(v string) predicate.AuthSession

UserAgentGT applies the GT predicate on the "user_agent" field.

func UserAgentGTE

func UserAgentGTE(v string) predicate.AuthSession

UserAgentGTE applies the GTE predicate on the "user_agent" field.

func UserAgentHasPrefix

func UserAgentHasPrefix(v string) predicate.AuthSession

UserAgentHasPrefix applies the HasPrefix predicate on the "user_agent" field.

func UserAgentHasSuffix

func UserAgentHasSuffix(v string) predicate.AuthSession

UserAgentHasSuffix applies the HasSuffix predicate on the "user_agent" field.

func UserAgentIn

func UserAgentIn(vs ...string) predicate.AuthSession

UserAgentIn applies the In predicate on the "user_agent" field.

func UserAgentIsNil

func UserAgentIsNil() predicate.AuthSession

UserAgentIsNil applies the IsNil predicate on the "user_agent" field.

func UserAgentLT

func UserAgentLT(v string) predicate.AuthSession

UserAgentLT applies the LT predicate on the "user_agent" field.

func UserAgentLTE

func UserAgentLTE(v string) predicate.AuthSession

UserAgentLTE applies the LTE predicate on the "user_agent" field.

func UserAgentNEQ

func UserAgentNEQ(v string) predicate.AuthSession

UserAgentNEQ applies the NEQ predicate on the "user_agent" field.

func UserAgentNotIn

func UserAgentNotIn(vs ...string) predicate.AuthSession

UserAgentNotIn applies the NotIn predicate on the "user_agent" field.

func UserAgentNotNil

func UserAgentNotNil() predicate.AuthSession

UserAgentNotNil applies the NotNil predicate on the "user_agent" field.

func UserID

func UserID(v uuid.UUID) predicate.AuthSession

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

func UserIDEQ

func UserIDEQ(v uuid.UUID) predicate.AuthSession

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

func UserIDIn

func UserIDIn(vs ...uuid.UUID) predicate.AuthSession

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

func UserIDNEQ

func UserIDNEQ(v uuid.UUID) predicate.AuthSession

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

func UserIDNotIn

func UserIDNotIn(vs ...uuid.UUID) predicate.AuthSession

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

func ByCreatedAt

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

ByCreatedAt orders the results by the created_at field.

func ByCreatedIP

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

ByCreatedIP orders the results by the created_ip field.

func ByExpiresAt

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

ByExpiresAt orders the results by the expires_at field.

func ByID

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

ByID orders the results by the id field.

func ByLastSeenAt

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

ByLastSeenAt orders the results by the last_seen_at field.

func ByTokenHash

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

ByTokenHash orders the results by the token_hash field.

func ByUserAgent

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

ByUserAgent orders the results by the user_agent 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