session

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Label holds the string label denoting the session type in the database.
	Label = "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"
	// FieldToken holds the string denoting the token field in the database.
	FieldToken = "token"
	// FieldCreatedAt holds the string denoting the created_at field in the database.
	FieldCreatedAt = "created_at"
	// FieldExpiresAt holds the string denoting the expires_at field in the database.
	FieldExpiresAt = "expires_at"
	// EdgeLogin holds the string denoting the login edge name in mutations.
	EdgeLogin = "login"
	// Table holds the table name of the session in the database.
	Table = "sessions"
	// LoginTable is the table that holds the login relation/edge.
	LoginTable = "sessions"
	// LoginInverseTable is the table name for the User entity.
	// It exists in this package in order to avoid circular dependency with the "user" package.
	LoginInverseTable = "users"
	// LoginColumn is the table column denoting the login relation/edge.
	LoginColumn = "session_login"
)

Variables

Columns holds all SQL columns for session fields.

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

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

View Source
var (
	// TokenValidator is a validator for the "token" field. It is called by the builders before save.
	TokenValidator func(string) error
)

Functions

func And

func And(predicates ...predicate.Session) predicate.Session

And groups predicates with the AND operator between them.

func CreatedAt

func CreatedAt(v int64) predicate.Session

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

func CreatedAtEQ

func CreatedAtEQ(v int64) predicate.Session

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

func CreatedAtGT

func CreatedAtGT(v int64) predicate.Session

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

func CreatedAtGTE

func CreatedAtGTE(v int64) predicate.Session

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

func CreatedAtIn

func CreatedAtIn(vs ...int64) predicate.Session

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

func CreatedAtLT

func CreatedAtLT(v int64) predicate.Session

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

func CreatedAtLTE

func CreatedAtLTE(v int64) predicate.Session

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

func CreatedAtNEQ

func CreatedAtNEQ(v int64) predicate.Session

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

func CreatedAtNotIn

func CreatedAtNotIn(vs ...int64) predicate.Session

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

func ExpiresAt

func ExpiresAt(v int64) predicate.Session

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

func ExpiresAtEQ

func ExpiresAtEQ(v int64) predicate.Session

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

func ExpiresAtGT

func ExpiresAtGT(v int64) predicate.Session

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

func ExpiresAtGTE

func ExpiresAtGTE(v int64) predicate.Session

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

func ExpiresAtIn

func ExpiresAtIn(vs ...int64) predicate.Session

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

func ExpiresAtLT

func ExpiresAtLT(v int64) predicate.Session

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

func ExpiresAtLTE

func ExpiresAtLTE(v int64) predicate.Session

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

func ExpiresAtNEQ

func ExpiresAtNEQ(v int64) predicate.Session

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

func ExpiresAtNotIn

func ExpiresAtNotIn(vs ...int64) predicate.Session

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

func HasLogin

func HasLogin() predicate.Session

HasLogin applies the HasEdge predicate on the "login" edge.

func HasLoginWith

func HasLoginWith(preds ...predicate.User) predicate.Session

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

func ID

func ID(id string) predicate.Session

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id string) predicate.Session

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id string) predicate.Session

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id string) predicate.Session

IDGTE applies the GTE predicate on the ID field.

func IDIn

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

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id string) predicate.Session

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id string) predicate.Session

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id string) predicate.Session

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

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

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.Session) predicate.Session

Or groups predicates with the OR operator between them.

func Token

func Token(v string) predicate.Session

Token applies equality check predicate on the "token" field. It's identical to TokenEQ.

func TokenContains

func TokenContains(v string) predicate.Session

TokenContains applies the Contains predicate on the "token" field.

func TokenContainsFold

func TokenContainsFold(v string) predicate.Session

TokenContainsFold applies the ContainsFold predicate on the "token" field.

func TokenEQ

func TokenEQ(v string) predicate.Session

TokenEQ applies the EQ predicate on the "token" field.

func TokenEqualFold

func TokenEqualFold(v string) predicate.Session

TokenEqualFold applies the EqualFold predicate on the "token" field.

func TokenGT

func TokenGT(v string) predicate.Session

TokenGT applies the GT predicate on the "token" field.

func TokenGTE

func TokenGTE(v string) predicate.Session

TokenGTE applies the GTE predicate on the "token" field.

func TokenHasPrefix

func TokenHasPrefix(v string) predicate.Session

TokenHasPrefix applies the HasPrefix predicate on the "token" field.

func TokenHasSuffix

func TokenHasSuffix(v string) predicate.Session

TokenHasSuffix applies the HasSuffix predicate on the "token" field.

func TokenIn

func TokenIn(vs ...string) predicate.Session

TokenIn applies the In predicate on the "token" field.

func TokenLT

func TokenLT(v string) predicate.Session

TokenLT applies the LT predicate on the "token" field.

func TokenLTE

func TokenLTE(v string) predicate.Session

TokenLTE applies the LTE predicate on the "token" field.

func TokenNEQ

func TokenNEQ(v string) predicate.Session

TokenNEQ applies the NEQ predicate on the "token" field.

func TokenNotIn

func TokenNotIn(vs ...string) predicate.Session

TokenNotIn applies the NotIn predicate on the "token" field.

func UserID

func UserID(v int) predicate.Session

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

func UserIDEQ

func UserIDEQ(v int) predicate.Session

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

func UserIDGT

func UserIDGT(v int) predicate.Session

UserIDGT applies the GT predicate on the "user_id" field.

func UserIDGTE

func UserIDGTE(v int) predicate.Session

UserIDGTE applies the GTE predicate on the "user_id" field.

func UserIDIn

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

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

func UserIDLT

func UserIDLT(v int) predicate.Session

UserIDLT applies the LT predicate on the "user_id" field.

func UserIDLTE

func UserIDLTE(v int) predicate.Session

UserIDLTE applies the LTE predicate on the "user_id" field.

func UserIDNEQ

func UserIDNEQ(v int) predicate.Session

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

func UserIDNotIn

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

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

This section is empty.

Jump to

Keyboard shortcuts

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