session

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2025 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"
	// FieldCreatedAt holds the string denoting the created_at field in the database.
	FieldCreatedAt = "created_at"
	// FieldAgentID holds the string denoting the agent_id field in the database.
	FieldAgentID = "agent_id"
	// FieldUsername holds the string denoting the username field in the database.
	FieldUsername = "username"
	// FieldHostname holds the string denoting the hostname field in the database.
	FieldHostname = "hostname"
	// FieldDomain holds the string denoting the domain field in the database.
	FieldDomain = "domain"
	// FieldIsPriv holds the string denoting the is_priv field in the database.
	FieldIsPriv = "is_priv"
	// FieldIps holds the string denoting the ips field in the database.
	FieldIps = "ips"
	// FieldOsMeta holds the string denoting the os_meta field in the database.
	FieldOsMeta = "os_meta"
	// FieldProcName holds the string denoting the proc_name field in the database.
	FieldProcName = "proc_name"
	// FieldExtra holds the string denoting the extra field in the database.
	FieldExtra = "extra"
	// Table holds the table name of the session in the database.
	Table = "sessions"
)

Variables

View Source
var (
	// DefaultCreatedAt holds the default value on creation for the "created_at" field.
	DefaultCreatedAt func() time.Time
	// AgentIDValidator is a validator for the "agent_id" field. It is called by the builders before save.
	AgentIDValidator func(string) error
	// UsernameValidator is a validator for the "username" field. It is called by the builders before save.
	UsernameValidator func(string) error
	// HostnameValidator is a validator for the "hostname" field. It is called by the builders before save.
	HostnameValidator func(string) error
	// DefaultDomain holds the default value on creation for the "domain" field.
	DefaultDomain string
	// DefaultIsPriv holds the default value on creation for the "is_priv" field.
	DefaultIsPriv bool
	// DefaultOsMeta holds the default value on creation for the "os_meta" field.
	DefaultOsMeta string
	// DefaultProcName holds the default value on creation for the "proc_name" field.
	DefaultProcName string
	// DefaultExtra holds the default value on creation for the "extra" field.
	DefaultExtra string
	// DefaultID holds the default value on creation for the "id" field.
	DefaultID func() string
)

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 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 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 Domain

func Domain(v string) predicate.Session

Domain applies equality check predicate on the "domain" field. It's identical to DomainEQ.

func DomainContains

func DomainContains(v string) predicate.Session

DomainContains applies the Contains predicate on the "domain" field.

func DomainContainsFold

func DomainContainsFold(v string) predicate.Session

DomainContainsFold applies the ContainsFold predicate on the "domain" field.

func DomainEQ

func DomainEQ(v string) predicate.Session

DomainEQ applies the EQ predicate on the "domain" field.

func DomainEqualFold

func DomainEqualFold(v string) predicate.Session

DomainEqualFold applies the EqualFold predicate on the "domain" field.

func DomainGT

func DomainGT(v string) predicate.Session

DomainGT applies the GT predicate on the "domain" field.

func DomainGTE

func DomainGTE(v string) predicate.Session

DomainGTE applies the GTE predicate on the "domain" field.

func DomainHasPrefix

func DomainHasPrefix(v string) predicate.Session

DomainHasPrefix applies the HasPrefix predicate on the "domain" field.

func DomainHasSuffix

func DomainHasSuffix(v string) predicate.Session

DomainHasSuffix applies the HasSuffix predicate on the "domain" field.

func DomainIn

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

DomainIn applies the In predicate on the "domain" field.

func DomainLT

func DomainLT(v string) predicate.Session

DomainLT applies the LT predicate on the "domain" field.

func DomainLTE

func DomainLTE(v string) predicate.Session

DomainLTE applies the LTE predicate on the "domain" field.

func DomainNEQ

func DomainNEQ(v string) predicate.Session

DomainNEQ applies the NEQ predicate on the "domain" field.

func DomainNotIn

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

DomainNotIn applies the NotIn predicate on the "domain" field.

func Extra

func Extra(v string) predicate.Session

Extra applies equality check predicate on the "extra" field. It's identical to ExtraEQ.

func ExtraContains

func ExtraContains(v string) predicate.Session

ExtraContains applies the Contains predicate on the "extra" field.

func ExtraContainsFold

func ExtraContainsFold(v string) predicate.Session

ExtraContainsFold applies the ContainsFold predicate on the "extra" field.

func ExtraEQ

func ExtraEQ(v string) predicate.Session

ExtraEQ applies the EQ predicate on the "extra" field.

func ExtraEqualFold

func ExtraEqualFold(v string) predicate.Session

ExtraEqualFold applies the EqualFold predicate on the "extra" field.

func ExtraGT

func ExtraGT(v string) predicate.Session

ExtraGT applies the GT predicate on the "extra" field.

func ExtraGTE

func ExtraGTE(v string) predicate.Session

ExtraGTE applies the GTE predicate on the "extra" field.

func ExtraHasPrefix

func ExtraHasPrefix(v string) predicate.Session

ExtraHasPrefix applies the HasPrefix predicate on the "extra" field.

func ExtraHasSuffix

func ExtraHasSuffix(v string) predicate.Session

ExtraHasSuffix applies the HasSuffix predicate on the "extra" field.

func ExtraIn

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

ExtraIn applies the In predicate on the "extra" field.

func ExtraLT

func ExtraLT(v string) predicate.Session

ExtraLT applies the LT predicate on the "extra" field.

func ExtraLTE

func ExtraLTE(v string) predicate.Session

ExtraLTE applies the LTE predicate on the "extra" field.

func ExtraNEQ

func ExtraNEQ(v string) predicate.Session

ExtraNEQ applies the NEQ predicate on the "extra" field.

func ExtraNotIn

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

ExtraNotIn applies the NotIn predicate on the "extra" field.

func Hostname

func Hostname(v string) predicate.Session

Hostname applies equality check predicate on the "hostname" field. It's identical to HostnameEQ.

func HostnameContains

func HostnameContains(v string) predicate.Session

HostnameContains applies the Contains predicate on the "hostname" field.

func HostnameContainsFold

func HostnameContainsFold(v string) predicate.Session

HostnameContainsFold applies the ContainsFold predicate on the "hostname" field.

func HostnameEQ

func HostnameEQ(v string) predicate.Session

HostnameEQ applies the EQ predicate on the "hostname" field.

func HostnameEqualFold

func HostnameEqualFold(v string) predicate.Session

HostnameEqualFold applies the EqualFold predicate on the "hostname" field.

func HostnameGT

func HostnameGT(v string) predicate.Session

HostnameGT applies the GT predicate on the "hostname" field.

func HostnameGTE

func HostnameGTE(v string) predicate.Session

HostnameGTE applies the GTE predicate on the "hostname" field.

func HostnameHasPrefix

func HostnameHasPrefix(v string) predicate.Session

HostnameHasPrefix applies the HasPrefix predicate on the "hostname" field.

func HostnameHasSuffix

func HostnameHasSuffix(v string) predicate.Session

HostnameHasSuffix applies the HasSuffix predicate on the "hostname" field.

func HostnameIn

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

HostnameIn applies the In predicate on the "hostname" field.

func HostnameLT

func HostnameLT(v string) predicate.Session

HostnameLT applies the LT predicate on the "hostname" field.

func HostnameLTE

func HostnameLTE(v string) predicate.Session

HostnameLTE applies the LTE predicate on the "hostname" field.

func HostnameNEQ

func HostnameNEQ(v string) predicate.Session

HostnameNEQ applies the NEQ predicate on the "hostname" field.

func HostnameNotIn

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

HostnameNotIn applies the NotIn predicate on the "hostname" field.

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 IsPriv

func IsPriv(v bool) predicate.Session

IsPriv applies equality check predicate on the "is_priv" field. It's identical to IsPrivEQ.

func IsPrivEQ

func IsPrivEQ(v bool) predicate.Session

IsPrivEQ applies the EQ predicate on the "is_priv" field.

func IsPrivNEQ

func IsPrivNEQ(v bool) predicate.Session

IsPrivNEQ applies the NEQ predicate on the "is_priv" 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 OsMeta

func OsMeta(v string) predicate.Session

OsMeta applies equality check predicate on the "os_meta" field. It's identical to OsMetaEQ.

func OsMetaContains

func OsMetaContains(v string) predicate.Session

OsMetaContains applies the Contains predicate on the "os_meta" field.

func OsMetaContainsFold

func OsMetaContainsFold(v string) predicate.Session

OsMetaContainsFold applies the ContainsFold predicate on the "os_meta" field.

func OsMetaEQ

func OsMetaEQ(v string) predicate.Session

OsMetaEQ applies the EQ predicate on the "os_meta" field.

func OsMetaEqualFold

func OsMetaEqualFold(v string) predicate.Session

OsMetaEqualFold applies the EqualFold predicate on the "os_meta" field.

func OsMetaGT

func OsMetaGT(v string) predicate.Session

OsMetaGT applies the GT predicate on the "os_meta" field.

func OsMetaGTE

func OsMetaGTE(v string) predicate.Session

OsMetaGTE applies the GTE predicate on the "os_meta" field.

func OsMetaHasPrefix

func OsMetaHasPrefix(v string) predicate.Session

OsMetaHasPrefix applies the HasPrefix predicate on the "os_meta" field.

func OsMetaHasSuffix

func OsMetaHasSuffix(v string) predicate.Session

OsMetaHasSuffix applies the HasSuffix predicate on the "os_meta" field.

func OsMetaIn

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

OsMetaIn applies the In predicate on the "os_meta" field.

func OsMetaLT

func OsMetaLT(v string) predicate.Session

OsMetaLT applies the LT predicate on the "os_meta" field.

func OsMetaLTE

func OsMetaLTE(v string) predicate.Session

OsMetaLTE applies the LTE predicate on the "os_meta" field.

func OsMetaNEQ

func OsMetaNEQ(v string) predicate.Session

OsMetaNEQ applies the NEQ predicate on the "os_meta" field.

func OsMetaNotIn

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

OsMetaNotIn applies the NotIn predicate on the "os_meta" field.

func ProcName

func ProcName(v string) predicate.Session

ProcName applies equality check predicate on the "proc_name" field. It's identical to ProcNameEQ.

func ProcNameContains

func ProcNameContains(v string) predicate.Session

ProcNameContains applies the Contains predicate on the "proc_name" field.

func ProcNameContainsFold

func ProcNameContainsFold(v string) predicate.Session

ProcNameContainsFold applies the ContainsFold predicate on the "proc_name" field.

func ProcNameEQ

func ProcNameEQ(v string) predicate.Session

ProcNameEQ applies the EQ predicate on the "proc_name" field.

func ProcNameEqualFold

func ProcNameEqualFold(v string) predicate.Session

ProcNameEqualFold applies the EqualFold predicate on the "proc_name" field.

func ProcNameGT

func ProcNameGT(v string) predicate.Session

ProcNameGT applies the GT predicate on the "proc_name" field.

func ProcNameGTE

func ProcNameGTE(v string) predicate.Session

ProcNameGTE applies the GTE predicate on the "proc_name" field.

func ProcNameHasPrefix

func ProcNameHasPrefix(v string) predicate.Session

ProcNameHasPrefix applies the HasPrefix predicate on the "proc_name" field.

func ProcNameHasSuffix

func ProcNameHasSuffix(v string) predicate.Session

ProcNameHasSuffix applies the HasSuffix predicate on the "proc_name" field.

func ProcNameIn

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

ProcNameIn applies the In predicate on the "proc_name" field.

func ProcNameLT

func ProcNameLT(v string) predicate.Session

ProcNameLT applies the LT predicate on the "proc_name" field.

func ProcNameLTE

func ProcNameLTE(v string) predicate.Session

ProcNameLTE applies the LTE predicate on the "proc_name" field.

func ProcNameNEQ

func ProcNameNEQ(v string) predicate.Session

ProcNameNEQ applies the NEQ predicate on the "proc_name" field.

func ProcNameNotIn

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

ProcNameNotIn applies the NotIn predicate on the "proc_name" field.

func Username

func Username(v string) predicate.Session

Username applies equality check predicate on the "username" field. It's identical to UsernameEQ.

func UsernameContains

func UsernameContains(v string) predicate.Session

UsernameContains applies the Contains predicate on the "username" field.

func UsernameContainsFold

func UsernameContainsFold(v string) predicate.Session

UsernameContainsFold applies the ContainsFold predicate on the "username" field.

func UsernameEQ

func UsernameEQ(v string) predicate.Session

UsernameEQ applies the EQ predicate on the "username" field.

func UsernameEqualFold

func UsernameEqualFold(v string) predicate.Session

UsernameEqualFold applies the EqualFold predicate on the "username" field.

func UsernameGT

func UsernameGT(v string) predicate.Session

UsernameGT applies the GT predicate on the "username" field.

func UsernameGTE

func UsernameGTE(v string) predicate.Session

UsernameGTE applies the GTE predicate on the "username" field.

func UsernameHasPrefix

func UsernameHasPrefix(v string) predicate.Session

UsernameHasPrefix applies the HasPrefix predicate on the "username" field.

func UsernameHasSuffix

func UsernameHasSuffix(v string) predicate.Session

UsernameHasSuffix applies the HasSuffix predicate on the "username" field.

func UsernameIn

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

UsernameIn applies the In predicate on the "username" field.

func UsernameLT

func UsernameLT(v string) predicate.Session

UsernameLT applies the LT predicate on the "username" field.

func UsernameLTE

func UsernameLTE(v string) predicate.Session

UsernameLTE applies the LTE predicate on the "username" field.

func UsernameNEQ

func UsernameNEQ(v string) predicate.Session

UsernameNEQ applies the NEQ predicate on the "username" field.

func UsernameNotIn

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

UsernameNotIn applies the NotIn predicate on the "username" 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 ByCreatedAt

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

ByCreatedAt orders the results by the created_at field.

func ByDomain

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

ByDomain orders the results by the domain field.

func ByExtra

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

ByExtra orders the results by the extra field.

func ByHostname

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

ByHostname orders the results by the hostname field.

func ByID

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

ByID orders the results by the id field.

func ByIsPriv

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

ByIsPriv orders the results by the is_priv field.

func ByOsMeta

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

ByOsMeta orders the results by the os_meta field.

func ByProcName

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

ByProcName orders the results by the proc_name field.

func ByUsername

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

ByUsername orders the results by the username field.

Jump to

Keyboard shortcuts

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