event

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Label holds the string label denoting the event type in the database.
	Label = "event"
	// FieldID holds the string denoting the id field in the database.
	FieldID = "id"
	// FieldTenantID holds the string denoting the tenant_id field in the database.
	FieldTenantID = "tenant_id"
	// FieldAgentID holds the string denoting the agent_id field in the database.
	FieldAgentID = "agent_id"
	// FieldChannelID holds the string denoting the channel_id field in the database.
	FieldChannelID = "channel_id"
	// FieldType holds the string denoting the type field in the database.
	FieldType = "type"
	// FieldRole holds the string denoting the role field in the database.
	FieldRole = "role"
	// FieldTimestamp holds the string denoting the timestamp field in the database.
	FieldTimestamp = "timestamp"
	// FieldPayload holds the string denoting the payload field in the database.
	FieldPayload = "payload"
	// FieldStatus holds the string denoting the status field in the database.
	FieldStatus = "status"
	// FieldSourceAgentID holds the string denoting the source_agent_id field in the database.
	FieldSourceAgentID = "source_agent_id"
	// Table holds the table name of the event in the database.
	Table = "events"
)
View Source
const DefaultStatus = StatusNew

StatusNew is the default value of the Status enum.

Variables

View Source
var (
	// DefaultTenantID holds the default value on creation for the "tenant_id" field.
	DefaultTenantID string
	// DefaultTimestamp holds the default value on creation for the "timestamp" field.
	DefaultTimestamp func() time.Time
	// DefaultSourceAgentID holds the default value on creation for the "source_agent_id" field.
	DefaultSourceAgentID string
)

Columns holds all SQL columns for event fields.

Functions

func AgentID

func AgentID(v string) predicate.Event

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

func AgentIDContains

func AgentIDContains(v string) predicate.Event

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

func AgentIDContainsFold

func AgentIDContainsFold(v string) predicate.Event

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

func AgentIDEQ

func AgentIDEQ(v string) predicate.Event

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

func AgentIDEqualFold

func AgentIDEqualFold(v string) predicate.Event

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

func AgentIDGT

func AgentIDGT(v string) predicate.Event

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

func AgentIDGTE

func AgentIDGTE(v string) predicate.Event

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

func AgentIDHasPrefix

func AgentIDHasPrefix(v string) predicate.Event

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

func AgentIDHasSuffix

func AgentIDHasSuffix(v string) predicate.Event

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

func AgentIDIn

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

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

func AgentIDLT

func AgentIDLT(v string) predicate.Event

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

func AgentIDLTE

func AgentIDLTE(v string) predicate.Event

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

func AgentIDNEQ

func AgentIDNEQ(v string) predicate.Event

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

func AgentIDNotIn

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

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

func And

func And(predicates ...predicate.Event) predicate.Event

And groups predicates with the AND operator between them.

func ChannelID

func ChannelID(v string) predicate.Event

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

func ChannelIDContains

func ChannelIDContains(v string) predicate.Event

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

func ChannelIDContainsFold

func ChannelIDContainsFold(v string) predicate.Event

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

func ChannelIDEQ

func ChannelIDEQ(v string) predicate.Event

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

func ChannelIDEqualFold

func ChannelIDEqualFold(v string) predicate.Event

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

func ChannelIDGT

func ChannelIDGT(v string) predicate.Event

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

func ChannelIDGTE

func ChannelIDGTE(v string) predicate.Event

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

func ChannelIDHasPrefix

func ChannelIDHasPrefix(v string) predicate.Event

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

func ChannelIDHasSuffix

func ChannelIDHasSuffix(v string) predicate.Event

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

func ChannelIDIn

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

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

func ChannelIDLT

func ChannelIDLT(v string) predicate.Event

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

func ChannelIDLTE

func ChannelIDLTE(v string) predicate.Event

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

func ChannelIDNEQ

func ChannelIDNEQ(v string) predicate.Event

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

func ChannelIDNotIn

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

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

func ID

func ID(id string) predicate.Event

ID filters vertices based on their ID field.

func IDContainsFold

func IDContainsFold(id string) predicate.Event

IDContainsFold applies the ContainsFold predicate on the ID field.

func IDEQ

func IDEQ(id string) predicate.Event

IDEQ applies the EQ predicate on the ID field.

func IDEqualFold

func IDEqualFold(id string) predicate.Event

IDEqualFold applies the EqualFold predicate on the ID field.

func IDGT

func IDGT(id string) predicate.Event

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id string) predicate.Event

IDGTE applies the GTE predicate on the ID field.

func IDIn

func IDIn(ids ...string) predicate.Event

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id string) predicate.Event

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id string) predicate.Event

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id string) predicate.Event

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

func IDNotIn(ids ...string) predicate.Event

IDNotIn applies the NotIn predicate on the ID field.

func Not

Not applies the not operator on the given predicate.

func Or

func Or(predicates ...predicate.Event) predicate.Event

Or groups predicates with the OR operator between them.

func RoleEQ

func RoleEQ(v Role) predicate.Event

RoleEQ applies the EQ predicate on the "role" field.

func RoleIn

func RoleIn(vs ...Role) predicate.Event

RoleIn applies the In predicate on the "role" field.

func RoleNEQ

func RoleNEQ(v Role) predicate.Event

RoleNEQ applies the NEQ predicate on the "role" field.

func RoleNotIn

func RoleNotIn(vs ...Role) predicate.Event

RoleNotIn applies the NotIn predicate on the "role" field.

func RoleValidator

func RoleValidator(r Role) error

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

func SourceAgentID

func SourceAgentID(v string) predicate.Event

SourceAgentID applies equality check predicate on the "source_agent_id" field. It's identical to SourceAgentIDEQ.

func SourceAgentIDContains

func SourceAgentIDContains(v string) predicate.Event

SourceAgentIDContains applies the Contains predicate on the "source_agent_id" field.

func SourceAgentIDContainsFold

func SourceAgentIDContainsFold(v string) predicate.Event

SourceAgentIDContainsFold applies the ContainsFold predicate on the "source_agent_id" field.

func SourceAgentIDEQ

func SourceAgentIDEQ(v string) predicate.Event

SourceAgentIDEQ applies the EQ predicate on the "source_agent_id" field.

func SourceAgentIDEqualFold

func SourceAgentIDEqualFold(v string) predicate.Event

SourceAgentIDEqualFold applies the EqualFold predicate on the "source_agent_id" field.

func SourceAgentIDGT

func SourceAgentIDGT(v string) predicate.Event

SourceAgentIDGT applies the GT predicate on the "source_agent_id" field.

func SourceAgentIDGTE

func SourceAgentIDGTE(v string) predicate.Event

SourceAgentIDGTE applies the GTE predicate on the "source_agent_id" field.

func SourceAgentIDHasPrefix

func SourceAgentIDHasPrefix(v string) predicate.Event

SourceAgentIDHasPrefix applies the HasPrefix predicate on the "source_agent_id" field.

func SourceAgentIDHasSuffix

func SourceAgentIDHasSuffix(v string) predicate.Event

SourceAgentIDHasSuffix applies the HasSuffix predicate on the "source_agent_id" field.

func SourceAgentIDIn

func SourceAgentIDIn(vs ...string) predicate.Event

SourceAgentIDIn applies the In predicate on the "source_agent_id" field.

func SourceAgentIDIsNil

func SourceAgentIDIsNil() predicate.Event

SourceAgentIDIsNil applies the IsNil predicate on the "source_agent_id" field.

func SourceAgentIDLT

func SourceAgentIDLT(v string) predicate.Event

SourceAgentIDLT applies the LT predicate on the "source_agent_id" field.

func SourceAgentIDLTE

func SourceAgentIDLTE(v string) predicate.Event

SourceAgentIDLTE applies the LTE predicate on the "source_agent_id" field.

func SourceAgentIDNEQ

func SourceAgentIDNEQ(v string) predicate.Event

SourceAgentIDNEQ applies the NEQ predicate on the "source_agent_id" field.

func SourceAgentIDNotIn

func SourceAgentIDNotIn(vs ...string) predicate.Event

SourceAgentIDNotIn applies the NotIn predicate on the "source_agent_id" field.

func SourceAgentIDNotNil

func SourceAgentIDNotNil() predicate.Event

SourceAgentIDNotNil applies the NotNil predicate on the "source_agent_id" field.

func StatusEQ

func StatusEQ(v Status) predicate.Event

StatusEQ applies the EQ predicate on the "status" field.

func StatusIn

func StatusIn(vs ...Status) predicate.Event

StatusIn applies the In predicate on the "status" field.

func StatusNEQ

func StatusNEQ(v Status) predicate.Event

StatusNEQ applies the NEQ predicate on the "status" field.

func StatusNotIn

func StatusNotIn(vs ...Status) predicate.Event

StatusNotIn applies the NotIn predicate on the "status" field.

func StatusValidator

func StatusValidator(s Status) error

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

func TenantID

func TenantID(v string) predicate.Event

TenantID applies equality check predicate on the "tenant_id" field. It's identical to TenantIDEQ.

func TenantIDContains

func TenantIDContains(v string) predicate.Event

TenantIDContains applies the Contains predicate on the "tenant_id" field.

func TenantIDContainsFold

func TenantIDContainsFold(v string) predicate.Event

TenantIDContainsFold applies the ContainsFold predicate on the "tenant_id" field.

func TenantIDEQ

func TenantIDEQ(v string) predicate.Event

TenantIDEQ applies the EQ predicate on the "tenant_id" field.

func TenantIDEqualFold

func TenantIDEqualFold(v string) predicate.Event

TenantIDEqualFold applies the EqualFold predicate on the "tenant_id" field.

func TenantIDGT

func TenantIDGT(v string) predicate.Event

TenantIDGT applies the GT predicate on the "tenant_id" field.

func TenantIDGTE

func TenantIDGTE(v string) predicate.Event

TenantIDGTE applies the GTE predicate on the "tenant_id" field.

func TenantIDHasPrefix

func TenantIDHasPrefix(v string) predicate.Event

TenantIDHasPrefix applies the HasPrefix predicate on the "tenant_id" field.

func TenantIDHasSuffix

func TenantIDHasSuffix(v string) predicate.Event

TenantIDHasSuffix applies the HasSuffix predicate on the "tenant_id" field.

func TenantIDIn

func TenantIDIn(vs ...string) predicate.Event

TenantIDIn applies the In predicate on the "tenant_id" field.

func TenantIDLT

func TenantIDLT(v string) predicate.Event

TenantIDLT applies the LT predicate on the "tenant_id" field.

func TenantIDLTE

func TenantIDLTE(v string) predicate.Event

TenantIDLTE applies the LTE predicate on the "tenant_id" field.

func TenantIDNEQ

func TenantIDNEQ(v string) predicate.Event

TenantIDNEQ applies the NEQ predicate on the "tenant_id" field.

func TenantIDNotIn

func TenantIDNotIn(vs ...string) predicate.Event

TenantIDNotIn applies the NotIn predicate on the "tenant_id" field.

func Timestamp

func Timestamp(v time.Time) predicate.Event

Timestamp applies equality check predicate on the "timestamp" field. It's identical to TimestampEQ.

func TimestampEQ

func TimestampEQ(v time.Time) predicate.Event

TimestampEQ applies the EQ predicate on the "timestamp" field.

func TimestampGT

func TimestampGT(v time.Time) predicate.Event

TimestampGT applies the GT predicate on the "timestamp" field.

func TimestampGTE

func TimestampGTE(v time.Time) predicate.Event

TimestampGTE applies the GTE predicate on the "timestamp" field.

func TimestampIn

func TimestampIn(vs ...time.Time) predicate.Event

TimestampIn applies the In predicate on the "timestamp" field.

func TimestampLT

func TimestampLT(v time.Time) predicate.Event

TimestampLT applies the LT predicate on the "timestamp" field.

func TimestampLTE

func TimestampLTE(v time.Time) predicate.Event

TimestampLTE applies the LTE predicate on the "timestamp" field.

func TimestampNEQ

func TimestampNEQ(v time.Time) predicate.Event

TimestampNEQ applies the NEQ predicate on the "timestamp" field.

func TimestampNotIn

func TimestampNotIn(vs ...time.Time) predicate.Event

TimestampNotIn applies the NotIn predicate on the "timestamp" field.

func TypeEQ

func TypeEQ(v Type) predicate.Event

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

func TypeIn

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

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

func TypeNEQ

func TypeNEQ(v Type) predicate.Event

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

func TypeNotIn

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

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 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 Event 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 ByID

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

ByID orders the results by the id field.

func ByRole

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

ByRole orders the results by the role field.

func BySourceAgentID

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

BySourceAgentID orders the results by the source_agent_id field.

func ByStatus

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

ByStatus orders the results by the status field.

func ByTenantID

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

ByTenantID orders the results by the tenant_id field.

func ByTimestamp

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

ByTimestamp orders the results by the timestamp field.

func ByType

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

ByType orders the results by the type field.

type Role

type Role string

Role defines the type for the "role" enum field.

const (
	RoleHuman  Role = "human"
	RoleAgent  Role = "agent"
	RoleSystem Role = "system"
)

Role values.

func (Role) String

func (r Role) String() string

type Status

type Status string

Status defines the type for the "status" enum field.

const (
	StatusNew       Status = "new"
	StatusDelivered Status = "delivered"
	StatusFailed    Status = "failed"
)

Status values.

func (Status) String

func (s Status) String() string

type Type

type Type string

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

const (
	TypeHumanMessage Type = "human_message"
	TypeAgentMessage Type = "agent_message"
	TypeInterrupt    Type = "interrupt"
	TypeSystem       Type = "system"
)

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