session

package
v0.2.4 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2024 License: Apache-2.0 Imports: 6 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"
	// 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"
	// FieldCreatedBy holds the string denoting the created_by field in the database.
	FieldCreatedBy = "created_by"
	// FieldUpdatedBy holds the string denoting the updated_by field in the database.
	FieldUpdatedBy = "updated_by"
	// FieldOwnerID holds the string denoting the owner_id field in the database.
	FieldOwnerID = "owner_id"
	// FieldSessionToken holds the string denoting the session_token field in the database.
	FieldSessionToken = "session_token"
	// FieldIssuedAt holds the string denoting the issued_at field in the database.
	FieldIssuedAt = "issued_at"
	// FieldExpiresAt holds the string denoting the expires_at field in the database.
	FieldExpiresAt = "expires_at"
	// FieldOrganizationID holds the string denoting the organization_id field in the database.
	FieldOrganizationID = "organization_id"
	// EdgeOwner holds the string denoting the owner edge name in mutations.
	EdgeOwner = "owner"
	// Table holds the table name of the session 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 = "owner_id"
)

Variables

View Source
var (
	Hooks [2]ent.Hook
	// 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
	// UpdateDefaultIssuedAt holds the default value on update for the "issued_at" field.
	UpdateDefaultIssuedAt func() time.Time
	// DefaultID holds the default value on creation for the "id" field.
	DefaultID func() 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/datumforge/datum/internal/ent/generated/runtime"

Columns holds all SQL columns for session fields.

Functions

func And

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

And groups predicates with the AND operator between them.

func CreatedAt

func CreatedAt(v time.Time) predicate.Session

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

func CreatedAtEQ

func CreatedAtEQ(v time.Time) predicate.Session

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

func CreatedAtGT

func CreatedAtGT(v time.Time) predicate.Session

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

func CreatedAtGTE

func CreatedAtGTE(v time.Time) predicate.Session

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

func CreatedAtIn

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

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

func CreatedAtLT

func CreatedAtLT(v time.Time) predicate.Session

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

func CreatedAtLTE

func CreatedAtLTE(v time.Time) predicate.Session

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

func CreatedAtNEQ

func CreatedAtNEQ(v time.Time) predicate.Session

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

func CreatedAtNotIn

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

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

func CreatedBy

func CreatedBy(v string) predicate.Session

CreatedBy applies equality check predicate on the "created_by" field. It's identical to CreatedByEQ.

func CreatedByContains

func CreatedByContains(v string) predicate.Session

CreatedByContains applies the Contains predicate on the "created_by" field.

func CreatedByContainsFold

func CreatedByContainsFold(v string) predicate.Session

CreatedByContainsFold applies the ContainsFold predicate on the "created_by" field.

func CreatedByEQ

func CreatedByEQ(v string) predicate.Session

CreatedByEQ applies the EQ predicate on the "created_by" field.

func CreatedByEqualFold

func CreatedByEqualFold(v string) predicate.Session

CreatedByEqualFold applies the EqualFold predicate on the "created_by" field.

func CreatedByGT

func CreatedByGT(v string) predicate.Session

CreatedByGT applies the GT predicate on the "created_by" field.

func CreatedByGTE

func CreatedByGTE(v string) predicate.Session

CreatedByGTE applies the GTE predicate on the "created_by" field.

func CreatedByHasPrefix

func CreatedByHasPrefix(v string) predicate.Session

CreatedByHasPrefix applies the HasPrefix predicate on the "created_by" field.

func CreatedByHasSuffix

func CreatedByHasSuffix(v string) predicate.Session

CreatedByHasSuffix applies the HasSuffix predicate on the "created_by" field.

func CreatedByIn

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

CreatedByIn applies the In predicate on the "created_by" field.

func CreatedByIsNil

func CreatedByIsNil() predicate.Session

CreatedByIsNil applies the IsNil predicate on the "created_by" field.

func CreatedByLT

func CreatedByLT(v string) predicate.Session

CreatedByLT applies the LT predicate on the "created_by" field.

func CreatedByLTE

func CreatedByLTE(v string) predicate.Session

CreatedByLTE applies the LTE predicate on the "created_by" field.

func CreatedByNEQ

func CreatedByNEQ(v string) predicate.Session

CreatedByNEQ applies the NEQ predicate on the "created_by" field.

func CreatedByNotIn

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

CreatedByNotIn applies the NotIn predicate on the "created_by" field.

func CreatedByNotNil

func CreatedByNotNil() predicate.Session

CreatedByNotNil applies the NotNil predicate on the "created_by" field.

func ExpiresAt

func ExpiresAt(v time.Time) predicate.Session

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

func ExpiresAtEQ

func ExpiresAtEQ(v time.Time) predicate.Session

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

func ExpiresAtGT

func ExpiresAtGT(v time.Time) predicate.Session

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

func ExpiresAtGTE

func ExpiresAtGTE(v time.Time) predicate.Session

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

func ExpiresAtIn

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

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

func ExpiresAtLT

func ExpiresAtLT(v time.Time) predicate.Session

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

func ExpiresAtLTE

func ExpiresAtLTE(v time.Time) predicate.Session

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

func ExpiresAtNEQ

func ExpiresAtNEQ(v time.Time) predicate.Session

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

func ExpiresAtNotIn

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

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

func HasOwner

func HasOwner() predicate.Session

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

func HasOwnerWith

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

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

func ID

func ID(id string) predicate.Session

ID filters vertices based on their ID field.

func IDContainsFold

func IDContainsFold(id string) predicate.Session

IDContainsFold applies the ContainsFold predicate on the ID field.

func IDEQ

func IDEQ(id string) predicate.Session

IDEQ applies the EQ predicate on the ID field.

func IDEqualFold

func IDEqualFold(id string) predicate.Session

IDEqualFold applies the EqualFold 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 IssuedAt

func IssuedAt(v time.Time) predicate.Session

IssuedAt applies equality check predicate on the "issued_at" field. It's identical to IssuedAtEQ.

func IssuedAtEQ

func IssuedAtEQ(v time.Time) predicate.Session

IssuedAtEQ applies the EQ predicate on the "issued_at" field.

func IssuedAtGT

func IssuedAtGT(v time.Time) predicate.Session

IssuedAtGT applies the GT predicate on the "issued_at" field.

func IssuedAtGTE

func IssuedAtGTE(v time.Time) predicate.Session

IssuedAtGTE applies the GTE predicate on the "issued_at" field.

func IssuedAtIn

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

IssuedAtIn applies the In predicate on the "issued_at" field.

func IssuedAtLT

func IssuedAtLT(v time.Time) predicate.Session

IssuedAtLT applies the LT predicate on the "issued_at" field.

func IssuedAtLTE

func IssuedAtLTE(v time.Time) predicate.Session

IssuedAtLTE applies the LTE predicate on the "issued_at" field.

func IssuedAtNEQ

func IssuedAtNEQ(v time.Time) predicate.Session

IssuedAtNEQ applies the NEQ predicate on the "issued_at" field.

func IssuedAtNotIn

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

IssuedAtNotIn applies the NotIn predicate on the "issued_at" 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 OrganizationID

func OrganizationID(v string) predicate.Session

OrganizationID applies equality check predicate on the "organization_id" field. It's identical to OrganizationIDEQ.

func OrganizationIDContains

func OrganizationIDContains(v string) predicate.Session

OrganizationIDContains applies the Contains predicate on the "organization_id" field.

func OrganizationIDContainsFold

func OrganizationIDContainsFold(v string) predicate.Session

OrganizationIDContainsFold applies the ContainsFold predicate on the "organization_id" field.

func OrganizationIDEQ

func OrganizationIDEQ(v string) predicate.Session

OrganizationIDEQ applies the EQ predicate on the "organization_id" field.

func OrganizationIDEqualFold

func OrganizationIDEqualFold(v string) predicate.Session

OrganizationIDEqualFold applies the EqualFold predicate on the "organization_id" field.

func OrganizationIDGT

func OrganizationIDGT(v string) predicate.Session

OrganizationIDGT applies the GT predicate on the "organization_id" field.

func OrganizationIDGTE

func OrganizationIDGTE(v string) predicate.Session

OrganizationIDGTE applies the GTE predicate on the "organization_id" field.

func OrganizationIDHasPrefix

func OrganizationIDHasPrefix(v string) predicate.Session

OrganizationIDHasPrefix applies the HasPrefix predicate on the "organization_id" field.

func OrganizationIDHasSuffix

func OrganizationIDHasSuffix(v string) predicate.Session

OrganizationIDHasSuffix applies the HasSuffix predicate on the "organization_id" field.

func OrganizationIDIn

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

OrganizationIDIn applies the In predicate on the "organization_id" field.

func OrganizationIDLT

func OrganizationIDLT(v string) predicate.Session

OrganizationIDLT applies the LT predicate on the "organization_id" field.

func OrganizationIDLTE

func OrganizationIDLTE(v string) predicate.Session

OrganizationIDLTE applies the LTE predicate on the "organization_id" field.

func OrganizationIDNEQ

func OrganizationIDNEQ(v string) predicate.Session

OrganizationIDNEQ applies the NEQ predicate on the "organization_id" field.

func OrganizationIDNotIn

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

OrganizationIDNotIn applies the NotIn predicate on the "organization_id" field.

func OwnerID added in v0.2.4

func OwnerID(v string) predicate.Session

OwnerID applies equality check predicate on the "owner_id" field. It's identical to OwnerIDEQ.

func OwnerIDContains added in v0.2.4

func OwnerIDContains(v string) predicate.Session

OwnerIDContains applies the Contains predicate on the "owner_id" field.

func OwnerIDContainsFold added in v0.2.4

func OwnerIDContainsFold(v string) predicate.Session

OwnerIDContainsFold applies the ContainsFold predicate on the "owner_id" field.

func OwnerIDEQ added in v0.2.4

func OwnerIDEQ(v string) predicate.Session

OwnerIDEQ applies the EQ predicate on the "owner_id" field.

func OwnerIDEqualFold added in v0.2.4

func OwnerIDEqualFold(v string) predicate.Session

OwnerIDEqualFold applies the EqualFold predicate on the "owner_id" field.

func OwnerIDGT added in v0.2.4

func OwnerIDGT(v string) predicate.Session

OwnerIDGT applies the GT predicate on the "owner_id" field.

func OwnerIDGTE added in v0.2.4

func OwnerIDGTE(v string) predicate.Session

OwnerIDGTE applies the GTE predicate on the "owner_id" field.

func OwnerIDHasPrefix added in v0.2.4

func OwnerIDHasPrefix(v string) predicate.Session

OwnerIDHasPrefix applies the HasPrefix predicate on the "owner_id" field.

func OwnerIDHasSuffix added in v0.2.4

func OwnerIDHasSuffix(v string) predicate.Session

OwnerIDHasSuffix applies the HasSuffix predicate on the "owner_id" field.

func OwnerIDIn added in v0.2.4

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

OwnerIDIn applies the In predicate on the "owner_id" field.

func OwnerIDLT added in v0.2.4

func OwnerIDLT(v string) predicate.Session

OwnerIDLT applies the LT predicate on the "owner_id" field.

func OwnerIDLTE added in v0.2.4

func OwnerIDLTE(v string) predicate.Session

OwnerIDLTE applies the LTE predicate on the "owner_id" field.

func OwnerIDNEQ added in v0.2.4

func OwnerIDNEQ(v string) predicate.Session

OwnerIDNEQ applies the NEQ predicate on the "owner_id" field.

func OwnerIDNotIn added in v0.2.4

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

OwnerIDNotIn applies the NotIn predicate on the "owner_id" field.

func SessionToken

func SessionToken(v string) predicate.Session

SessionToken applies equality check predicate on the "session_token" field. It's identical to SessionTokenEQ.

func SessionTokenContains

func SessionTokenContains(v string) predicate.Session

SessionTokenContains applies the Contains predicate on the "session_token" field.

func SessionTokenContainsFold

func SessionTokenContainsFold(v string) predicate.Session

SessionTokenContainsFold applies the ContainsFold predicate on the "session_token" field.

func SessionTokenEQ

func SessionTokenEQ(v string) predicate.Session

SessionTokenEQ applies the EQ predicate on the "session_token" field.

func SessionTokenEqualFold

func SessionTokenEqualFold(v string) predicate.Session

SessionTokenEqualFold applies the EqualFold predicate on the "session_token" field.

func SessionTokenGT

func SessionTokenGT(v string) predicate.Session

SessionTokenGT applies the GT predicate on the "session_token" field.

func SessionTokenGTE

func SessionTokenGTE(v string) predicate.Session

SessionTokenGTE applies the GTE predicate on the "session_token" field.

func SessionTokenHasPrefix

func SessionTokenHasPrefix(v string) predicate.Session

SessionTokenHasPrefix applies the HasPrefix predicate on the "session_token" field.

func SessionTokenHasSuffix

func SessionTokenHasSuffix(v string) predicate.Session

SessionTokenHasSuffix applies the HasSuffix predicate on the "session_token" field.

func SessionTokenIn

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

SessionTokenIn applies the In predicate on the "session_token" field.

func SessionTokenLT

func SessionTokenLT(v string) predicate.Session

SessionTokenLT applies the LT predicate on the "session_token" field.

func SessionTokenLTE

func SessionTokenLTE(v string) predicate.Session

SessionTokenLTE applies the LTE predicate on the "session_token" field.

func SessionTokenNEQ

func SessionTokenNEQ(v string) predicate.Session

SessionTokenNEQ applies the NEQ predicate on the "session_token" field.

func SessionTokenNotIn

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

SessionTokenNotIn applies the NotIn predicate on the "session_token" field.

func UpdatedAt

func UpdatedAt(v time.Time) predicate.Session

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

func UpdatedAtEQ

func UpdatedAtEQ(v time.Time) predicate.Session

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

func UpdatedAtGT

func UpdatedAtGT(v time.Time) predicate.Session

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

func UpdatedAtGTE

func UpdatedAtGTE(v time.Time) predicate.Session

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

func UpdatedAtIn

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

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

func UpdatedAtLT

func UpdatedAtLT(v time.Time) predicate.Session

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

func UpdatedAtLTE

func UpdatedAtLTE(v time.Time) predicate.Session

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

func UpdatedAtNEQ

func UpdatedAtNEQ(v time.Time) predicate.Session

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

func UpdatedAtNotIn

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

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

func UpdatedBy

func UpdatedBy(v string) predicate.Session

UpdatedBy applies equality check predicate on the "updated_by" field. It's identical to UpdatedByEQ.

func UpdatedByContains

func UpdatedByContains(v string) predicate.Session

UpdatedByContains applies the Contains predicate on the "updated_by" field.

func UpdatedByContainsFold

func UpdatedByContainsFold(v string) predicate.Session

UpdatedByContainsFold applies the ContainsFold predicate on the "updated_by" field.

func UpdatedByEQ

func UpdatedByEQ(v string) predicate.Session

UpdatedByEQ applies the EQ predicate on the "updated_by" field.

func UpdatedByEqualFold

func UpdatedByEqualFold(v string) predicate.Session

UpdatedByEqualFold applies the EqualFold predicate on the "updated_by" field.

func UpdatedByGT

func UpdatedByGT(v string) predicate.Session

UpdatedByGT applies the GT predicate on the "updated_by" field.

func UpdatedByGTE

func UpdatedByGTE(v string) predicate.Session

UpdatedByGTE applies the GTE predicate on the "updated_by" field.

func UpdatedByHasPrefix

func UpdatedByHasPrefix(v string) predicate.Session

UpdatedByHasPrefix applies the HasPrefix predicate on the "updated_by" field.

func UpdatedByHasSuffix

func UpdatedByHasSuffix(v string) predicate.Session

UpdatedByHasSuffix applies the HasSuffix predicate on the "updated_by" field.

func UpdatedByIn

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

UpdatedByIn applies the In predicate on the "updated_by" field.

func UpdatedByIsNil

func UpdatedByIsNil() predicate.Session

UpdatedByIsNil applies the IsNil predicate on the "updated_by" field.

func UpdatedByLT

func UpdatedByLT(v string) predicate.Session

UpdatedByLT applies the LT predicate on the "updated_by" field.

func UpdatedByLTE

func UpdatedByLTE(v string) predicate.Session

UpdatedByLTE applies the LTE predicate on the "updated_by" field.

func UpdatedByNEQ

func UpdatedByNEQ(v string) predicate.Session

UpdatedByNEQ applies the NEQ predicate on the "updated_by" field.

func UpdatedByNotIn

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

UpdatedByNotIn applies the NotIn predicate on the "updated_by" field.

func UpdatedByNotNil

func UpdatedByNotNil() predicate.Session

UpdatedByNotNil applies the NotNil predicate on the "updated_by" 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 Session queries.

func ByCreatedAt

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

ByCreatedAt orders the results by the created_at field.

func ByCreatedBy

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

ByCreatedBy orders the results by the created_by 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 ByIssuedAt

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

ByIssuedAt orders the results by the issued_at field.

func ByOrganizationID

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

ByOrganizationID orders the results by the organization_id field.

func ByOwnerField

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

ByOwnerField orders the results by owner field.

func ByOwnerID added in v0.2.4

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

ByOwnerID orders the results by the owner_id field.

func BySessionToken

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

BySessionToken orders the results by the session_token field.

func ByUpdatedAt

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

ByUpdatedAt orders the results by the updated_at field.

func ByUpdatedBy

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

ByUpdatedBy orders the results by the updated_by field.

Jump to

Keyboard shortcuts

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