session

package
v0.0.0-...-3c02646 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2021 License: MPL-2.0 Imports: 4 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"
	// FieldCreateTime holds the string denoting the create_time field in the database.
	FieldCreateTime = "create_time"
	// FieldUpdateTime holds the string denoting the update_time field in the database.
	FieldUpdateTime = "update_time"
	// FieldIPAddress holds the string denoting the ip_address field in the database.
	FieldIPAddress = "ip_address"
	// FieldBrowserName holds the string denoting the browser_name field in the database.
	FieldBrowserName = "browser_name"
	// FieldBrowserVersion holds the string denoting the browser_version field in the database.
	FieldBrowserVersion = "browser_version"
	// FieldDeviceOs holds the string denoting the device_os field in the database.
	FieldDeviceOs = "device_os"
	// FieldDeviceType holds the string denoting the device_type field in the database.
	FieldDeviceType = "device_type"
	// FieldTerminatedAt holds the string denoting the terminated_at field in the database.
	FieldTerminatedAt = "terminated_at"

	// EdgeToken holds the string denoting the token edge name in mutations.
	EdgeToken = "token"
	// EdgeUser holds the string denoting the user edge name in mutations.
	EdgeUser = "user"

	// Table holds the table name of the session in the database.
	Table = "sessions"
	// TokenTable is the table the holds the token relation/edge.
	TokenTable = "sessions"
	// TokenInverseTable is the table name for the Token entity.
	// It exists in this package in order to avoid circular dependency with the "token" package.
	TokenInverseTable = "tokens"
	// TokenColumn is the table column denoting the token relation/edge.
	TokenColumn = "token_session"
	// UserTable is the table the holds the user relation/edge.
	UserTable = "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_sessions"
)

Variables

View Source
var (
	// DefaultCreateTime holds the default value on creation for the create_time field.
	DefaultCreateTime func() time.Time
	// DefaultUpdateTime holds the default value on creation for the update_time field.
	DefaultUpdateTime func() time.Time
	// UpdateDefaultUpdateTime holds the default value on update for the update_time field.
	UpdateDefaultUpdateTime func() time.Time
)

Columns holds all SQL columns for session fields.

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

ForeignKeys holds the SQL foreign-keys that are owned by the Session type.

Functions

func And

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

And groups list of predicates with the AND operator between them.

func BrowserName

func BrowserName(v string) predicate.Session

BrowserName applies equality check predicate on the "browser_name" field. It's identical to BrowserNameEQ.

func BrowserNameContains

func BrowserNameContains(v string) predicate.Session

BrowserNameContains applies the Contains predicate on the "browser_name" field.

func BrowserNameContainsFold

func BrowserNameContainsFold(v string) predicate.Session

BrowserNameContainsFold applies the ContainsFold predicate on the "browser_name" field.

func BrowserNameEQ

func BrowserNameEQ(v string) predicate.Session

BrowserNameEQ applies the EQ predicate on the "browser_name" field.

func BrowserNameEqualFold

func BrowserNameEqualFold(v string) predicate.Session

BrowserNameEqualFold applies the EqualFold predicate on the "browser_name" field.

func BrowserNameGT

func BrowserNameGT(v string) predicate.Session

BrowserNameGT applies the GT predicate on the "browser_name" field.

func BrowserNameGTE

func BrowserNameGTE(v string) predicate.Session

BrowserNameGTE applies the GTE predicate on the "browser_name" field.

func BrowserNameHasPrefix

func BrowserNameHasPrefix(v string) predicate.Session

BrowserNameHasPrefix applies the HasPrefix predicate on the "browser_name" field.

func BrowserNameHasSuffix

func BrowserNameHasSuffix(v string) predicate.Session

BrowserNameHasSuffix applies the HasSuffix predicate on the "browser_name" field.

func BrowserNameIn

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

BrowserNameIn applies the In predicate on the "browser_name" field.

func BrowserNameLT

func BrowserNameLT(v string) predicate.Session

BrowserNameLT applies the LT predicate on the "browser_name" field.

func BrowserNameLTE

func BrowserNameLTE(v string) predicate.Session

BrowserNameLTE applies the LTE predicate on the "browser_name" field.

func BrowserNameNEQ

func BrowserNameNEQ(v string) predicate.Session

BrowserNameNEQ applies the NEQ predicate on the "browser_name" field.

func BrowserNameNotIn

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

BrowserNameNotIn applies the NotIn predicate on the "browser_name" field.

func BrowserVersion

func BrowserVersion(v string) predicate.Session

BrowserVersion applies equality check predicate on the "browser_version" field. It's identical to BrowserVersionEQ.

func BrowserVersionContains

func BrowserVersionContains(v string) predicate.Session

BrowserVersionContains applies the Contains predicate on the "browser_version" field.

func BrowserVersionContainsFold

func BrowserVersionContainsFold(v string) predicate.Session

BrowserVersionContainsFold applies the ContainsFold predicate on the "browser_version" field.

func BrowserVersionEQ

func BrowserVersionEQ(v string) predicate.Session

BrowserVersionEQ applies the EQ predicate on the "browser_version" field.

func BrowserVersionEqualFold

func BrowserVersionEqualFold(v string) predicate.Session

BrowserVersionEqualFold applies the EqualFold predicate on the "browser_version" field.

func BrowserVersionGT

func BrowserVersionGT(v string) predicate.Session

BrowserVersionGT applies the GT predicate on the "browser_version" field.

func BrowserVersionGTE

func BrowserVersionGTE(v string) predicate.Session

BrowserVersionGTE applies the GTE predicate on the "browser_version" field.

func BrowserVersionHasPrefix

func BrowserVersionHasPrefix(v string) predicate.Session

BrowserVersionHasPrefix applies the HasPrefix predicate on the "browser_version" field.

func BrowserVersionHasSuffix

func BrowserVersionHasSuffix(v string) predicate.Session

BrowserVersionHasSuffix applies the HasSuffix predicate on the "browser_version" field.

func BrowserVersionIn

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

BrowserVersionIn applies the In predicate on the "browser_version" field.

func BrowserVersionLT

func BrowserVersionLT(v string) predicate.Session

BrowserVersionLT applies the LT predicate on the "browser_version" field.

func BrowserVersionLTE

func BrowserVersionLTE(v string) predicate.Session

BrowserVersionLTE applies the LTE predicate on the "browser_version" field.

func BrowserVersionNEQ

func BrowserVersionNEQ(v string) predicate.Session

BrowserVersionNEQ applies the NEQ predicate on the "browser_version" field.

func BrowserVersionNotIn

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

BrowserVersionNotIn applies the NotIn predicate on the "browser_version" field.

func CreateTime

func CreateTime(v time.Time) predicate.Session

CreateTime applies equality check predicate on the "create_time" field. It's identical to CreateTimeEQ.

func CreateTimeEQ

func CreateTimeEQ(v time.Time) predicate.Session

CreateTimeEQ applies the EQ predicate on the "create_time" field.

func CreateTimeGT

func CreateTimeGT(v time.Time) predicate.Session

CreateTimeGT applies the GT predicate on the "create_time" field.

func CreateTimeGTE

func CreateTimeGTE(v time.Time) predicate.Session

CreateTimeGTE applies the GTE predicate on the "create_time" field.

func CreateTimeIn

func CreateTimeIn(vs ...time.Time) predicate.Session

CreateTimeIn applies the In predicate on the "create_time" field.

func CreateTimeLT

func CreateTimeLT(v time.Time) predicate.Session

CreateTimeLT applies the LT predicate on the "create_time" field.

func CreateTimeLTE

func CreateTimeLTE(v time.Time) predicate.Session

CreateTimeLTE applies the LTE predicate on the "create_time" field.

func CreateTimeNEQ

func CreateTimeNEQ(v time.Time) predicate.Session

CreateTimeNEQ applies the NEQ predicate on the "create_time" field.

func CreateTimeNotIn

func CreateTimeNotIn(vs ...time.Time) predicate.Session

CreateTimeNotIn applies the NotIn predicate on the "create_time" field.

func DeviceOs

func DeviceOs(v string) predicate.Session

DeviceOs applies equality check predicate on the "device_os" field. It's identical to DeviceOsEQ.

func DeviceOsContains

func DeviceOsContains(v string) predicate.Session

DeviceOsContains applies the Contains predicate on the "device_os" field.

func DeviceOsContainsFold

func DeviceOsContainsFold(v string) predicate.Session

DeviceOsContainsFold applies the ContainsFold predicate on the "device_os" field.

func DeviceOsEQ

func DeviceOsEQ(v string) predicate.Session

DeviceOsEQ applies the EQ predicate on the "device_os" field.

func DeviceOsEqualFold

func DeviceOsEqualFold(v string) predicate.Session

DeviceOsEqualFold applies the EqualFold predicate on the "device_os" field.

func DeviceOsGT

func DeviceOsGT(v string) predicate.Session

DeviceOsGT applies the GT predicate on the "device_os" field.

func DeviceOsGTE

func DeviceOsGTE(v string) predicate.Session

DeviceOsGTE applies the GTE predicate on the "device_os" field.

func DeviceOsHasPrefix

func DeviceOsHasPrefix(v string) predicate.Session

DeviceOsHasPrefix applies the HasPrefix predicate on the "device_os" field.

func DeviceOsHasSuffix

func DeviceOsHasSuffix(v string) predicate.Session

DeviceOsHasSuffix applies the HasSuffix predicate on the "device_os" field.

func DeviceOsIn

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

DeviceOsIn applies the In predicate on the "device_os" field.

func DeviceOsLT

func DeviceOsLT(v string) predicate.Session

DeviceOsLT applies the LT predicate on the "device_os" field.

func DeviceOsLTE

func DeviceOsLTE(v string) predicate.Session

DeviceOsLTE applies the LTE predicate on the "device_os" field.

func DeviceOsNEQ

func DeviceOsNEQ(v string) predicate.Session

DeviceOsNEQ applies the NEQ predicate on the "device_os" field.

func DeviceOsNotIn

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

DeviceOsNotIn applies the NotIn predicate on the "device_os" field.

func DeviceType

func DeviceType(v string) predicate.Session

DeviceType applies equality check predicate on the "device_type" field. It's identical to DeviceTypeEQ.

func DeviceTypeContains

func DeviceTypeContains(v string) predicate.Session

DeviceTypeContains applies the Contains predicate on the "device_type" field.

func DeviceTypeContainsFold

func DeviceTypeContainsFold(v string) predicate.Session

DeviceTypeContainsFold applies the ContainsFold predicate on the "device_type" field.

func DeviceTypeEQ

func DeviceTypeEQ(v string) predicate.Session

DeviceTypeEQ applies the EQ predicate on the "device_type" field.

func DeviceTypeEqualFold

func DeviceTypeEqualFold(v string) predicate.Session

DeviceTypeEqualFold applies the EqualFold predicate on the "device_type" field.

func DeviceTypeGT

func DeviceTypeGT(v string) predicate.Session

DeviceTypeGT applies the GT predicate on the "device_type" field.

func DeviceTypeGTE

func DeviceTypeGTE(v string) predicate.Session

DeviceTypeGTE applies the GTE predicate on the "device_type" field.

func DeviceTypeHasPrefix

func DeviceTypeHasPrefix(v string) predicate.Session

DeviceTypeHasPrefix applies the HasPrefix predicate on the "device_type" field.

func DeviceTypeHasSuffix

func DeviceTypeHasSuffix(v string) predicate.Session

DeviceTypeHasSuffix applies the HasSuffix predicate on the "device_type" field.

func DeviceTypeIn

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

DeviceTypeIn applies the In predicate on the "device_type" field.

func DeviceTypeLT

func DeviceTypeLT(v string) predicate.Session

DeviceTypeLT applies the LT predicate on the "device_type" field.

func DeviceTypeLTE

func DeviceTypeLTE(v string) predicate.Session

DeviceTypeLTE applies the LTE predicate on the "device_type" field.

func DeviceTypeNEQ

func DeviceTypeNEQ(v string) predicate.Session

DeviceTypeNEQ applies the NEQ predicate on the "device_type" field.

func DeviceTypeNotIn

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

DeviceTypeNotIn applies the NotIn predicate on the "device_type" field.

func HasToken

func HasToken() predicate.Session

HasToken applies the HasEdge predicate on the "token" edge.

func HasTokenWith

func HasTokenWith(preds ...predicate.Token) predicate.Session

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

func HasUser

func HasUser() predicate.Session

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

func HasUserWith

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

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

func ID

func ID(id int) predicate.Session

ID filters vertices based on their identifier.

func IDEQ

func IDEQ(id int) predicate.Session

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id int) predicate.Session

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id int) predicate.Session

IDGTE applies the GTE predicate on the ID field.

func IDIn

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

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id int) predicate.Session

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id int) predicate.Session

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id int) predicate.Session

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

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

IDNotIn applies the NotIn predicate on the ID field.

func IPAddress

func IPAddress(v string) predicate.Session

IPAddress applies equality check predicate on the "ip_address" field. It's identical to IPAddressEQ.

func IPAddressContains

func IPAddressContains(v string) predicate.Session

IPAddressContains applies the Contains predicate on the "ip_address" field.

func IPAddressContainsFold

func IPAddressContainsFold(v string) predicate.Session

IPAddressContainsFold applies the ContainsFold predicate on the "ip_address" field.

func IPAddressEQ

func IPAddressEQ(v string) predicate.Session

IPAddressEQ applies the EQ predicate on the "ip_address" field.

func IPAddressEqualFold

func IPAddressEqualFold(v string) predicate.Session

IPAddressEqualFold applies the EqualFold predicate on the "ip_address" field.

func IPAddressGT

func IPAddressGT(v string) predicate.Session

IPAddressGT applies the GT predicate on the "ip_address" field.

func IPAddressGTE

func IPAddressGTE(v string) predicate.Session

IPAddressGTE applies the GTE predicate on the "ip_address" field.

func IPAddressHasPrefix

func IPAddressHasPrefix(v string) predicate.Session

IPAddressHasPrefix applies the HasPrefix predicate on the "ip_address" field.

func IPAddressHasSuffix

func IPAddressHasSuffix(v string) predicate.Session

IPAddressHasSuffix applies the HasSuffix predicate on the "ip_address" field.

func IPAddressIn

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

IPAddressIn applies the In predicate on the "ip_address" field.

func IPAddressLT

func IPAddressLT(v string) predicate.Session

IPAddressLT applies the LT predicate on the "ip_address" field.

func IPAddressLTE

func IPAddressLTE(v string) predicate.Session

IPAddressLTE applies the LTE predicate on the "ip_address" field.

func IPAddressNEQ

func IPAddressNEQ(v string) predicate.Session

IPAddressNEQ applies the NEQ predicate on the "ip_address" field.

func IPAddressNotIn

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

IPAddressNotIn applies the NotIn predicate on the "ip_address" field.

func Not

Not applies the not operator on the given predicate.

func Or

func Or(predicates ...predicate.Session) predicate.Session

Or groups list of predicates with the OR operator between them.

func TerminatedAt

func TerminatedAt(v time.Time) predicate.Session

TerminatedAt applies equality check predicate on the "terminated_at" field. It's identical to TerminatedAtEQ.

func TerminatedAtEQ

func TerminatedAtEQ(v time.Time) predicate.Session

TerminatedAtEQ applies the EQ predicate on the "terminated_at" field.

func TerminatedAtGT

func TerminatedAtGT(v time.Time) predicate.Session

TerminatedAtGT applies the GT predicate on the "terminated_at" field.

func TerminatedAtGTE

func TerminatedAtGTE(v time.Time) predicate.Session

TerminatedAtGTE applies the GTE predicate on the "terminated_at" field.

func TerminatedAtIn

func TerminatedAtIn(vs ...time.Time) predicate.Session

TerminatedAtIn applies the In predicate on the "terminated_at" field.

func TerminatedAtIsNil

func TerminatedAtIsNil() predicate.Session

TerminatedAtIsNil applies the IsNil predicate on the "terminated_at" field.

func TerminatedAtLT

func TerminatedAtLT(v time.Time) predicate.Session

TerminatedAtLT applies the LT predicate on the "terminated_at" field.

func TerminatedAtLTE

func TerminatedAtLTE(v time.Time) predicate.Session

TerminatedAtLTE applies the LTE predicate on the "terminated_at" field.

func TerminatedAtNEQ

func TerminatedAtNEQ(v time.Time) predicate.Session

TerminatedAtNEQ applies the NEQ predicate on the "terminated_at" field.

func TerminatedAtNotIn

func TerminatedAtNotIn(vs ...time.Time) predicate.Session

TerminatedAtNotIn applies the NotIn predicate on the "terminated_at" field.

func TerminatedAtNotNil

func TerminatedAtNotNil() predicate.Session

TerminatedAtNotNil applies the NotNil predicate on the "terminated_at" field.

func UpdateTime

func UpdateTime(v time.Time) predicate.Session

UpdateTime applies equality check predicate on the "update_time" field. It's identical to UpdateTimeEQ.

func UpdateTimeEQ

func UpdateTimeEQ(v time.Time) predicate.Session

UpdateTimeEQ applies the EQ predicate on the "update_time" field.

func UpdateTimeGT

func UpdateTimeGT(v time.Time) predicate.Session

UpdateTimeGT applies the GT predicate on the "update_time" field.

func UpdateTimeGTE

func UpdateTimeGTE(v time.Time) predicate.Session

UpdateTimeGTE applies the GTE predicate on the "update_time" field.

func UpdateTimeIn

func UpdateTimeIn(vs ...time.Time) predicate.Session

UpdateTimeIn applies the In predicate on the "update_time" field.

func UpdateTimeLT

func UpdateTimeLT(v time.Time) predicate.Session

UpdateTimeLT applies the LT predicate on the "update_time" field.

func UpdateTimeLTE

func UpdateTimeLTE(v time.Time) predicate.Session

UpdateTimeLTE applies the LTE predicate on the "update_time" field.

func UpdateTimeNEQ

func UpdateTimeNEQ(v time.Time) predicate.Session

UpdateTimeNEQ applies the NEQ predicate on the "update_time" field.

func UpdateTimeNotIn

func UpdateTimeNotIn(vs ...time.Time) predicate.Session

UpdateTimeNotIn applies the NotIn predicate on the "update_time" 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