session

package
v0.0.0-...-34fc03e Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2022 License: AGPL-3.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"
	// FieldType holds the string denoting the type field in the database.
	FieldType = "type"
	// FieldDisabled holds the string denoting the disabled field in the database.
	FieldDisabled = "disabled"
	// FieldToken holds the string denoting the token field in the database.
	FieldToken = "token"
	// FieldUserAgent holds the string denoting the user_agent field in the database.
	FieldUserAgent = "user_agent"
	// FieldIps holds the string denoting the ips field in the database.
	FieldIps = "ips"
	// EdgeAccounts holds the string denoting the accounts edge name in mutations.
	EdgeAccounts = "accounts"
	// Table holds the table name of the session in the database.
	Table = "sessions"
	// AccountsTable is the table that holds the accounts relation/edge.
	AccountsTable = "sessions"
	// AccountsInverseTable is the table name for the Actor entity.
	// It exists in this package in order to avoid circular dependency with the "actor" package.
	AccountsInverseTable = "actors"
	// AccountsColumn is the table column denoting the accounts relation/edge.
	AccountsColumn = "session_accounts"
)

Variables

View Source
var (
	Hooks  [3]ent.Hook
	Policy ent.Policy
	// 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
	// DefaultToken holds the default value on creation for the "token" field.
	DefaultToken func() string
	// TokenValidator is a validator for the "token" field. It is called by the builders before save.
	TokenValidator func(string) error
)

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/eriner/burr/internal/ent/runtime"

Columns holds all SQL columns for session fields.

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

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

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

func CreatedByEQ

func CreatedByEQ(v int) predicate.Session

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

func CreatedByGT

func CreatedByGT(v int) predicate.Session

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

func CreatedByGTE

func CreatedByGTE(v int) predicate.Session

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

func CreatedByIn

func CreatedByIn(vs ...int) 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 int) predicate.Session

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

func CreatedByLTE

func CreatedByLTE(v int) predicate.Session

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

func CreatedByNEQ

func CreatedByNEQ(v int) predicate.Session

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

func CreatedByNotIn

func CreatedByNotIn(vs ...int) 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 Disabled

func Disabled(v bool) predicate.Session

Disabled applies equality check predicate on the "disabled" field. It's identical to DisabledEQ.

func DisabledEQ

func DisabledEQ(v bool) predicate.Session

DisabledEQ applies the EQ predicate on the "disabled" field.

func DisabledNEQ

func DisabledNEQ(v bool) predicate.Session

DisabledNEQ applies the NEQ predicate on the "disabled" field.

func HasAccounts

func HasAccounts() predicate.Session

HasAccounts applies the HasEdge predicate on the "accounts" edge.

func HasAccountsWith

func HasAccountsWith(preds ...predicate.Actor) predicate.Session

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

func ID

func ID(id uint64) predicate.Session

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id uint64) predicate.Session

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id uint64) predicate.Session

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id uint64) predicate.Session

IDGTE applies the GTE predicate on the ID field.

func IDIn

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

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id uint64) predicate.Session

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id uint64) predicate.Session

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id uint64) predicate.Session

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

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

IDNotIn applies the NotIn predicate on the ID field.

func Ips

func Ips(v string) predicate.Session

Ips applies equality check predicate on the "ips" field. It's identical to IpsEQ.

func IpsContains

func IpsContains(v string) predicate.Session

IpsContains applies the Contains predicate on the "ips" field.

func IpsContainsFold

func IpsContainsFold(v string) predicate.Session

IpsContainsFold applies the ContainsFold predicate on the "ips" field.

func IpsEQ

func IpsEQ(v string) predicate.Session

IpsEQ applies the EQ predicate on the "ips" field.

func IpsEqualFold

func IpsEqualFold(v string) predicate.Session

IpsEqualFold applies the EqualFold predicate on the "ips" field.

func IpsGT

func IpsGT(v string) predicate.Session

IpsGT applies the GT predicate on the "ips" field.

func IpsGTE

func IpsGTE(v string) predicate.Session

IpsGTE applies the GTE predicate on the "ips" field.

func IpsHasPrefix

func IpsHasPrefix(v string) predicate.Session

IpsHasPrefix applies the HasPrefix predicate on the "ips" field.

func IpsHasSuffix

func IpsHasSuffix(v string) predicate.Session

IpsHasSuffix applies the HasSuffix predicate on the "ips" field.

func IpsIn

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

IpsIn applies the In predicate on the "ips" field.

func IpsLT

func IpsLT(v string) predicate.Session

IpsLT applies the LT predicate on the "ips" field.

func IpsLTE

func IpsLTE(v string) predicate.Session

IpsLTE applies the LTE predicate on the "ips" field.

func IpsNEQ

func IpsNEQ(v string) predicate.Session

IpsNEQ applies the NEQ predicate on the "ips" field.

func IpsNotIn

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

IpsNotIn applies the NotIn predicate on the "ips" 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 TypeEQ

func TypeEQ(v Type) predicate.Session

TypeEQ applies the EQ predicate on the "type" field.

func TypeIn

func TypeIn(vs ...Type) predicate.Session

TypeIn applies the In predicate on the "type" field.

func TypeNEQ

func TypeNEQ(v Type) predicate.Session

TypeNEQ applies the NEQ predicate on the "type" field.

func TypeNotIn

func TypeNotIn(vs ...Type) predicate.Session

TypeNotIn applies the NotIn predicate on the "type" field.

func TypeValidator

func TypeValidator(_type Type) error

TypeValidator is a validator for the "type" field enum values. It is called by the builders before save.

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

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

func UpdatedByEQ

func UpdatedByEQ(v int) predicate.Session

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

func UpdatedByGT

func UpdatedByGT(v int) predicate.Session

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

func UpdatedByGTE

func UpdatedByGTE(v int) predicate.Session

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

func UpdatedByIn

func UpdatedByIn(vs ...int) 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 int) predicate.Session

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

func UpdatedByLTE

func UpdatedByLTE(v int) predicate.Session

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

func UpdatedByNEQ

func UpdatedByNEQ(v int) predicate.Session

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

func UpdatedByNotIn

func UpdatedByNotIn(vs ...int) 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 UserAgent

func UserAgent(v string) predicate.Session

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

func UserAgentContains

func UserAgentContains(v string) predicate.Session

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

func UserAgentContainsFold

func UserAgentContainsFold(v string) predicate.Session

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

func UserAgentEQ

func UserAgentEQ(v string) predicate.Session

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

func UserAgentEqualFold

func UserAgentEqualFold(v string) predicate.Session

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

func UserAgentGT

func UserAgentGT(v string) predicate.Session

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

func UserAgentGTE

func UserAgentGTE(v string) predicate.Session

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

func UserAgentHasPrefix

func UserAgentHasPrefix(v string) predicate.Session

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

func UserAgentHasSuffix

func UserAgentHasSuffix(v string) predicate.Session

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

func UserAgentIn

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

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

func UserAgentIsNil

func UserAgentIsNil() predicate.Session

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

func UserAgentLT

func UserAgentLT(v string) predicate.Session

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

func UserAgentLTE

func UserAgentLTE(v string) predicate.Session

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

func UserAgentNEQ

func UserAgentNEQ(v string) predicate.Session

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

func UserAgentNotIn

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

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

func UserAgentNotNil

func UserAgentNotNil() predicate.Session

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

func ValidColumn

func ValidColumn(column string) bool

ValidColumn reports if the column name is valid (part of the table columns).

Types

type Type

type Type string

Type defines the type for the "type" enum field.

const (
	TypeLocal       Type = "local"
	TypeOauth       Type = "oauth"
	TypeAppPassword Type = "app_password"
)

Type values.

func (Type) String

func (_type Type) String() string

Jump to

Keyboard shortcuts

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