session

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2026 License: MIT 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"
	// FieldKey holds the string denoting the key field in the database.
	FieldKey = "key"
	// FieldAgentID holds the string denoting the agent_id field in the database.
	FieldAgentID = "agent_id"
	// FieldChannelType holds the string denoting the channel_type field in the database.
	FieldChannelType = "channel_type"
	// FieldChannelID holds the string denoting the channel_id field in the database.
	FieldChannelID = "channel_id"
	// FieldModel holds the string denoting the model field in the database.
	FieldModel = "model"
	// FieldMetadata holds the string denoting the metadata field in the database.
	FieldMetadata = "metadata"
	// 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"
	// EdgeMessages holds the string denoting the messages edge name in mutations.
	EdgeMessages = "messages"
	// Table holds the table name of the session in the database.
	Table = "sessions"
	// MessagesTable is the table that holds the messages relation/edge.
	MessagesTable = "messages"
	// MessagesInverseTable is the table name for the Message entity.
	// It exists in this package in order to avoid circular dependency with the "message" package.
	MessagesInverseTable = "messages"
	// MessagesColumn is the table column denoting the messages relation/edge.
	MessagesColumn = "session_messages"
)

Variables

View Source
var (
	// KeyValidator is a validator for the "key" field. It is called by the builders before save.
	KeyValidator func(string) error
	// 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
)

Columns holds all SQL columns for session fields.

Functions

func AgentID

func AgentID(v string) predicate.Session

AgentID applies equality check predicate on the "agent_id" field. It's identical to AgentIDEQ.

func AgentIDContains

func AgentIDContains(v string) predicate.Session

AgentIDContains applies the Contains predicate on the "agent_id" field.

func AgentIDContainsFold

func AgentIDContainsFold(v string) predicate.Session

AgentIDContainsFold applies the ContainsFold predicate on the "agent_id" field.

func AgentIDEQ

func AgentIDEQ(v string) predicate.Session

AgentIDEQ applies the EQ predicate on the "agent_id" field.

func AgentIDEqualFold

func AgentIDEqualFold(v string) predicate.Session

AgentIDEqualFold applies the EqualFold predicate on the "agent_id" field.

func AgentIDGT

func AgentIDGT(v string) predicate.Session

AgentIDGT applies the GT predicate on the "agent_id" field.

func AgentIDGTE

func AgentIDGTE(v string) predicate.Session

AgentIDGTE applies the GTE predicate on the "agent_id" field.

func AgentIDHasPrefix

func AgentIDHasPrefix(v string) predicate.Session

AgentIDHasPrefix applies the HasPrefix predicate on the "agent_id" field.

func AgentIDHasSuffix

func AgentIDHasSuffix(v string) predicate.Session

AgentIDHasSuffix applies the HasSuffix predicate on the "agent_id" field.

func AgentIDIn

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

AgentIDIn applies the In predicate on the "agent_id" field.

func AgentIDIsNil

func AgentIDIsNil() predicate.Session

AgentIDIsNil applies the IsNil predicate on the "agent_id" field.

func AgentIDLT

func AgentIDLT(v string) predicate.Session

AgentIDLT applies the LT predicate on the "agent_id" field.

func AgentIDLTE

func AgentIDLTE(v string) predicate.Session

AgentIDLTE applies the LTE predicate on the "agent_id" field.

func AgentIDNEQ

func AgentIDNEQ(v string) predicate.Session

AgentIDNEQ applies the NEQ predicate on the "agent_id" field.

func AgentIDNotIn

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

AgentIDNotIn applies the NotIn predicate on the "agent_id" field.

func AgentIDNotNil

func AgentIDNotNil() predicate.Session

AgentIDNotNil applies the NotNil predicate on the "agent_id" field.

func And

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

And groups predicates with the AND operator between them.

func ChannelID

func ChannelID(v string) predicate.Session

ChannelID applies equality check predicate on the "channel_id" field. It's identical to ChannelIDEQ.

func ChannelIDContains

func ChannelIDContains(v string) predicate.Session

ChannelIDContains applies the Contains predicate on the "channel_id" field.

func ChannelIDContainsFold

func ChannelIDContainsFold(v string) predicate.Session

ChannelIDContainsFold applies the ContainsFold predicate on the "channel_id" field.

func ChannelIDEQ

func ChannelIDEQ(v string) predicate.Session

ChannelIDEQ applies the EQ predicate on the "channel_id" field.

func ChannelIDEqualFold

func ChannelIDEqualFold(v string) predicate.Session

ChannelIDEqualFold applies the EqualFold predicate on the "channel_id" field.

func ChannelIDGT

func ChannelIDGT(v string) predicate.Session

ChannelIDGT applies the GT predicate on the "channel_id" field.

func ChannelIDGTE

func ChannelIDGTE(v string) predicate.Session

ChannelIDGTE applies the GTE predicate on the "channel_id" field.

func ChannelIDHasPrefix

func ChannelIDHasPrefix(v string) predicate.Session

ChannelIDHasPrefix applies the HasPrefix predicate on the "channel_id" field.

func ChannelIDHasSuffix

func ChannelIDHasSuffix(v string) predicate.Session

ChannelIDHasSuffix applies the HasSuffix predicate on the "channel_id" field.

func ChannelIDIn

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

ChannelIDIn applies the In predicate on the "channel_id" field.

func ChannelIDIsNil

func ChannelIDIsNil() predicate.Session

ChannelIDIsNil applies the IsNil predicate on the "channel_id" field.

func ChannelIDLT

func ChannelIDLT(v string) predicate.Session

ChannelIDLT applies the LT predicate on the "channel_id" field.

func ChannelIDLTE

func ChannelIDLTE(v string) predicate.Session

ChannelIDLTE applies the LTE predicate on the "channel_id" field.

func ChannelIDNEQ

func ChannelIDNEQ(v string) predicate.Session

ChannelIDNEQ applies the NEQ predicate on the "channel_id" field.

func ChannelIDNotIn

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

ChannelIDNotIn applies the NotIn predicate on the "channel_id" field.

func ChannelIDNotNil

func ChannelIDNotNil() predicate.Session

ChannelIDNotNil applies the NotNil predicate on the "channel_id" field.

func ChannelType

func ChannelType(v string) predicate.Session

ChannelType applies equality check predicate on the "channel_type" field. It's identical to ChannelTypeEQ.

func ChannelTypeContains

func ChannelTypeContains(v string) predicate.Session

ChannelTypeContains applies the Contains predicate on the "channel_type" field.

func ChannelTypeContainsFold

func ChannelTypeContainsFold(v string) predicate.Session

ChannelTypeContainsFold applies the ContainsFold predicate on the "channel_type" field.

func ChannelTypeEQ

func ChannelTypeEQ(v string) predicate.Session

ChannelTypeEQ applies the EQ predicate on the "channel_type" field.

func ChannelTypeEqualFold

func ChannelTypeEqualFold(v string) predicate.Session

ChannelTypeEqualFold applies the EqualFold predicate on the "channel_type" field.

func ChannelTypeGT

func ChannelTypeGT(v string) predicate.Session

ChannelTypeGT applies the GT predicate on the "channel_type" field.

func ChannelTypeGTE

func ChannelTypeGTE(v string) predicate.Session

ChannelTypeGTE applies the GTE predicate on the "channel_type" field.

func ChannelTypeHasPrefix

func ChannelTypeHasPrefix(v string) predicate.Session

ChannelTypeHasPrefix applies the HasPrefix predicate on the "channel_type" field.

func ChannelTypeHasSuffix

func ChannelTypeHasSuffix(v string) predicate.Session

ChannelTypeHasSuffix applies the HasSuffix predicate on the "channel_type" field.

func ChannelTypeIn

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

ChannelTypeIn applies the In predicate on the "channel_type" field.

func ChannelTypeIsNil

func ChannelTypeIsNil() predicate.Session

ChannelTypeIsNil applies the IsNil predicate on the "channel_type" field.

func ChannelTypeLT

func ChannelTypeLT(v string) predicate.Session

ChannelTypeLT applies the LT predicate on the "channel_type" field.

func ChannelTypeLTE

func ChannelTypeLTE(v string) predicate.Session

ChannelTypeLTE applies the LTE predicate on the "channel_type" field.

func ChannelTypeNEQ

func ChannelTypeNEQ(v string) predicate.Session

ChannelTypeNEQ applies the NEQ predicate on the "channel_type" field.

func ChannelTypeNotIn

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

ChannelTypeNotIn applies the NotIn predicate on the "channel_type" field.

func ChannelTypeNotNil

func ChannelTypeNotNil() predicate.Session

ChannelTypeNotNil applies the NotNil predicate on the "channel_type" field.

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 HasMessages

func HasMessages() predicate.Session

HasMessages applies the HasEdge predicate on the "messages" edge.

func HasMessagesWith

func HasMessagesWith(preds ...predicate.Message) predicate.Session

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

func ID

func ID(id int) predicate.Session

ID filters vertices based on their ID field.

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 Key

func Key(v string) predicate.Session

Key applies equality check predicate on the "key" field. It's identical to KeyEQ.

func KeyContains

func KeyContains(v string) predicate.Session

KeyContains applies the Contains predicate on the "key" field.

func KeyContainsFold

func KeyContainsFold(v string) predicate.Session

KeyContainsFold applies the ContainsFold predicate on the "key" field.

func KeyEQ

func KeyEQ(v string) predicate.Session

KeyEQ applies the EQ predicate on the "key" field.

func KeyEqualFold

func KeyEqualFold(v string) predicate.Session

KeyEqualFold applies the EqualFold predicate on the "key" field.

func KeyGT

func KeyGT(v string) predicate.Session

KeyGT applies the GT predicate on the "key" field.

func KeyGTE

func KeyGTE(v string) predicate.Session

KeyGTE applies the GTE predicate on the "key" field.

func KeyHasPrefix

func KeyHasPrefix(v string) predicate.Session

KeyHasPrefix applies the HasPrefix predicate on the "key" field.

func KeyHasSuffix

func KeyHasSuffix(v string) predicate.Session

KeyHasSuffix applies the HasSuffix predicate on the "key" field.

func KeyIn

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

KeyIn applies the In predicate on the "key" field.

func KeyLT

func KeyLT(v string) predicate.Session

KeyLT applies the LT predicate on the "key" field.

func KeyLTE

func KeyLTE(v string) predicate.Session

KeyLTE applies the LTE predicate on the "key" field.

func KeyNEQ

func KeyNEQ(v string) predicate.Session

KeyNEQ applies the NEQ predicate on the "key" field.

func KeyNotIn

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

KeyNotIn applies the NotIn predicate on the "key" field.

func MetadataIsNil

func MetadataIsNil() predicate.Session

MetadataIsNil applies the IsNil predicate on the "metadata" field.

func MetadataNotNil

func MetadataNotNil() predicate.Session

MetadataNotNil applies the NotNil predicate on the "metadata" field.

func Model

func Model(v string) predicate.Session

Model applies equality check predicate on the "model" field. It's identical to ModelEQ.

func ModelContains

func ModelContains(v string) predicate.Session

ModelContains applies the Contains predicate on the "model" field.

func ModelContainsFold

func ModelContainsFold(v string) predicate.Session

ModelContainsFold applies the ContainsFold predicate on the "model" field.

func ModelEQ

func ModelEQ(v string) predicate.Session

ModelEQ applies the EQ predicate on the "model" field.

func ModelEqualFold

func ModelEqualFold(v string) predicate.Session

ModelEqualFold applies the EqualFold predicate on the "model" field.

func ModelGT

func ModelGT(v string) predicate.Session

ModelGT applies the GT predicate on the "model" field.

func ModelGTE

func ModelGTE(v string) predicate.Session

ModelGTE applies the GTE predicate on the "model" field.

func ModelHasPrefix

func ModelHasPrefix(v string) predicate.Session

ModelHasPrefix applies the HasPrefix predicate on the "model" field.

func ModelHasSuffix

func ModelHasSuffix(v string) predicate.Session

ModelHasSuffix applies the HasSuffix predicate on the "model" field.

func ModelIn

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

ModelIn applies the In predicate on the "model" field.

func ModelIsNil

func ModelIsNil() predicate.Session

ModelIsNil applies the IsNil predicate on the "model" field.

func ModelLT

func ModelLT(v string) predicate.Session

ModelLT applies the LT predicate on the "model" field.

func ModelLTE

func ModelLTE(v string) predicate.Session

ModelLTE applies the LTE predicate on the "model" field.

func ModelNEQ

func ModelNEQ(v string) predicate.Session

ModelNEQ applies the NEQ predicate on the "model" field.

func ModelNotIn

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

ModelNotIn applies the NotIn predicate on the "model" field.

func ModelNotNil

func ModelNotNil() predicate.Session

ModelNotNil applies the NotNil predicate on the "model" 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 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 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 ByAgentID

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

ByAgentID orders the results by the agent_id field.

func ByChannelID

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

ByChannelID orders the results by the channel_id field.

func ByChannelType

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

ByChannelType orders the results by the channel_type field.

func ByCreatedAt

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

ByCreatedAt orders the results by the created_at field.

func ByID

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

ByID orders the results by the id field.

func ByKey

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

ByKey orders the results by the key field.

func ByMessages

func ByMessages(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption

ByMessages orders the results by messages terms.

func ByMessagesCount

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

ByMessagesCount orders the results by messages count.

func ByModel

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

ByModel orders the results by the model field.

func ByUpdatedAt

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

ByUpdatedAt orders the results by the updated_at field.

Jump to

Keyboard shortcuts

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