message

package
v1.10.0 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Label holds the string label denoting the message type in the database.
	Label = "message"
	// FieldID holds the string denoting the id field in the database.
	FieldID = "id"
	// FieldSender holds the string denoting the sender field in the database.
	FieldSender = "sender"
	// FieldRecipient holds the string denoting the recipient field in the database.
	FieldRecipient = "recipient"
	// FieldContent holds the string denoting the content field in the database.
	FieldContent = "content"
	// FieldMessageType holds the string denoting the message_type field in the database.
	FieldMessageType = "message_type"
	// FieldTeam holds the string denoting the team field in the database.
	FieldTeam = "team"
	// FieldChannel holds the string denoting the channel field in the database.
	FieldChannel = "channel"
	// FieldRuntime holds the string denoting the runtime field in the database.
	FieldRuntime = "runtime"
	// FieldReplyToID holds the string denoting the reply_to_id field in the database.
	FieldReplyToID = "reply_to_id"
	// FieldCreatedAt holds the string denoting the created_at field in the database.
	FieldCreatedAt = "created_at"
	// EdgeAttachments holds the string denoting the attachments edge name in mutations.
	EdgeAttachments = "attachments"
	// EdgeReactions holds the string denoting the reactions edge name in mutations.
	EdgeReactions = "reactions"
	// Table holds the table name of the message in the database.
	Table = "messages"
	// AttachmentsTable is the table that holds the attachments relation/edge.
	AttachmentsTable = "attachments"
	// AttachmentsInverseTable is the table name for the Attachment entity.
	// It exists in this package in order to avoid circular dependency with the "attachment" package.
	AttachmentsInverseTable = "attachments"
	// AttachmentsColumn is the table column denoting the attachments relation/edge.
	AttachmentsColumn = "message_attachments"
	// ReactionsTable is the table that holds the reactions relation/edge.
	ReactionsTable = "reactions"
	// ReactionsInverseTable is the table name for the Reaction entity.
	// It exists in this package in order to avoid circular dependency with the "reaction" package.
	ReactionsInverseTable = "reactions"
	// ReactionsColumn is the table column denoting the reactions relation/edge.
	ReactionsColumn = "message_reactions"
)
View Source
const DefaultMessageType = MessageTypeText

MessageTypeText is the default value of the MessageType enum.

Variables

View Source
var (
	// SenderValidator is a validator for the "sender" field. It is called by the builders before save.
	SenderValidator func(string) error
	// RecipientValidator is a validator for the "recipient" field. It is called by the builders before save.
	RecipientValidator func(string) error
	// TeamValidator is a validator for the "team" field. It is called by the builders before save.
	TeamValidator func(string) error
	// RuntimeValidator is a validator for the "runtime" field. It is called by the builders before save.
	RuntimeValidator func(string) error
	// DefaultCreatedAt holds the default value on creation for the "created_at" field.
	DefaultCreatedAt func() time.Time
	// DefaultID holds the default value on creation for the "id" field.
	DefaultID func() uuid.UUID
)

Columns holds all SQL columns for message fields.

Functions

func And

func And(predicates ...predicate.Message) predicate.Message

And groups predicates with the AND operator between them.

func ChannelEQ

func ChannelEQ(v Channel) predicate.Message

ChannelEQ applies the EQ predicate on the "channel" field.

func ChannelIn

func ChannelIn(vs ...Channel) predicate.Message

ChannelIn applies the In predicate on the "channel" field.

func ChannelNEQ

func ChannelNEQ(v Channel) predicate.Message

ChannelNEQ applies the NEQ predicate on the "channel" field.

func ChannelNotIn

func ChannelNotIn(vs ...Channel) predicate.Message

ChannelNotIn applies the NotIn predicate on the "channel" field.

func ChannelValidator

func ChannelValidator(c Channel) error

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

func Content

func Content(v string) predicate.Message

Content applies equality check predicate on the "content" field. It's identical to ContentEQ.

func ContentContains

func ContentContains(v string) predicate.Message

ContentContains applies the Contains predicate on the "content" field.

func ContentContainsFold

func ContentContainsFold(v string) predicate.Message

ContentContainsFold applies the ContainsFold predicate on the "content" field.

func ContentEQ

func ContentEQ(v string) predicate.Message

ContentEQ applies the EQ predicate on the "content" field.

func ContentEqualFold

func ContentEqualFold(v string) predicate.Message

ContentEqualFold applies the EqualFold predicate on the "content" field.

func ContentGT

func ContentGT(v string) predicate.Message

ContentGT applies the GT predicate on the "content" field.

func ContentGTE

func ContentGTE(v string) predicate.Message

ContentGTE applies the GTE predicate on the "content" field.

func ContentHasPrefix

func ContentHasPrefix(v string) predicate.Message

ContentHasPrefix applies the HasPrefix predicate on the "content" field.

func ContentHasSuffix

func ContentHasSuffix(v string) predicate.Message

ContentHasSuffix applies the HasSuffix predicate on the "content" field.

func ContentIn

func ContentIn(vs ...string) predicate.Message

ContentIn applies the In predicate on the "content" field.

func ContentLT

func ContentLT(v string) predicate.Message

ContentLT applies the LT predicate on the "content" field.

func ContentLTE

func ContentLTE(v string) predicate.Message

ContentLTE applies the LTE predicate on the "content" field.

func ContentNEQ

func ContentNEQ(v string) predicate.Message

ContentNEQ applies the NEQ predicate on the "content" field.

func ContentNotIn

func ContentNotIn(vs ...string) predicate.Message

ContentNotIn applies the NotIn predicate on the "content" field.

func CreatedAt

func CreatedAt(v time.Time) predicate.Message

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

func CreatedAtEQ

func CreatedAtEQ(v time.Time) predicate.Message

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

func CreatedAtGT

func CreatedAtGT(v time.Time) predicate.Message

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

func CreatedAtGTE

func CreatedAtGTE(v time.Time) predicate.Message

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

func CreatedAtIn

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

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

func CreatedAtLT

func CreatedAtLT(v time.Time) predicate.Message

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

func CreatedAtLTE

func CreatedAtLTE(v time.Time) predicate.Message

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

func CreatedAtNEQ

func CreatedAtNEQ(v time.Time) predicate.Message

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

func CreatedAtNotIn

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

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

func HasAttachments

func HasAttachments() predicate.Message

HasAttachments applies the HasEdge predicate on the "attachments" edge.

func HasAttachmentsWith

func HasAttachmentsWith(preds ...predicate.Attachment) predicate.Message

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

func HasReactions

func HasReactions() predicate.Message

HasReactions applies the HasEdge predicate on the "reactions" edge.

func HasReactionsWith

func HasReactionsWith(preds ...predicate.Reaction) predicate.Message

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

func ID

func ID(id uuid.UUID) predicate.Message

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id uuid.UUID) predicate.Message

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id uuid.UUID) predicate.Message

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id uuid.UUID) predicate.Message

IDGTE applies the GTE predicate on the ID field.

func IDIn

func IDIn(ids ...uuid.UUID) predicate.Message

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id uuid.UUID) predicate.Message

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id uuid.UUID) predicate.Message

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id uuid.UUID) predicate.Message

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

func IDNotIn(ids ...uuid.UUID) predicate.Message

IDNotIn applies the NotIn predicate on the ID field.

func MessageTypeEQ

func MessageTypeEQ(v MessageType) predicate.Message

MessageTypeEQ applies the EQ predicate on the "message_type" field.

func MessageTypeIn

func MessageTypeIn(vs ...MessageType) predicate.Message

MessageTypeIn applies the In predicate on the "message_type" field.

func MessageTypeNEQ

func MessageTypeNEQ(v MessageType) predicate.Message

MessageTypeNEQ applies the NEQ predicate on the "message_type" field.

func MessageTypeNotIn

func MessageTypeNotIn(vs ...MessageType) predicate.Message

MessageTypeNotIn applies the NotIn predicate on the "message_type" field.

func MessageTypeValidator

func MessageTypeValidator(mt MessageType) error

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

func Not

Not applies the not operator on the given predicate.

func Or

func Or(predicates ...predicate.Message) predicate.Message

Or groups predicates with the OR operator between them.

func Recipient

func Recipient(v string) predicate.Message

Recipient applies equality check predicate on the "recipient" field. It's identical to RecipientEQ.

func RecipientContains

func RecipientContains(v string) predicate.Message

RecipientContains applies the Contains predicate on the "recipient" field.

func RecipientContainsFold

func RecipientContainsFold(v string) predicate.Message

RecipientContainsFold applies the ContainsFold predicate on the "recipient" field.

func RecipientEQ

func RecipientEQ(v string) predicate.Message

RecipientEQ applies the EQ predicate on the "recipient" field.

func RecipientEqualFold

func RecipientEqualFold(v string) predicate.Message

RecipientEqualFold applies the EqualFold predicate on the "recipient" field.

func RecipientGT

func RecipientGT(v string) predicate.Message

RecipientGT applies the GT predicate on the "recipient" field.

func RecipientGTE

func RecipientGTE(v string) predicate.Message

RecipientGTE applies the GTE predicate on the "recipient" field.

func RecipientHasPrefix

func RecipientHasPrefix(v string) predicate.Message

RecipientHasPrefix applies the HasPrefix predicate on the "recipient" field.

func RecipientHasSuffix

func RecipientHasSuffix(v string) predicate.Message

RecipientHasSuffix applies the HasSuffix predicate on the "recipient" field.

func RecipientIn

func RecipientIn(vs ...string) predicate.Message

RecipientIn applies the In predicate on the "recipient" field.

func RecipientLT

func RecipientLT(v string) predicate.Message

RecipientLT applies the LT predicate on the "recipient" field.

func RecipientLTE

func RecipientLTE(v string) predicate.Message

RecipientLTE applies the LTE predicate on the "recipient" field.

func RecipientNEQ

func RecipientNEQ(v string) predicate.Message

RecipientNEQ applies the NEQ predicate on the "recipient" field.

func RecipientNotIn

func RecipientNotIn(vs ...string) predicate.Message

RecipientNotIn applies the NotIn predicate on the "recipient" field.

func ReplyToID

func ReplyToID(v uuid.UUID) predicate.Message

ReplyToID applies equality check predicate on the "reply_to_id" field. It's identical to ReplyToIDEQ.

func ReplyToIDEQ

func ReplyToIDEQ(v uuid.UUID) predicate.Message

ReplyToIDEQ applies the EQ predicate on the "reply_to_id" field.

func ReplyToIDGT

func ReplyToIDGT(v uuid.UUID) predicate.Message

ReplyToIDGT applies the GT predicate on the "reply_to_id" field.

func ReplyToIDGTE

func ReplyToIDGTE(v uuid.UUID) predicate.Message

ReplyToIDGTE applies the GTE predicate on the "reply_to_id" field.

func ReplyToIDIn

func ReplyToIDIn(vs ...uuid.UUID) predicate.Message

ReplyToIDIn applies the In predicate on the "reply_to_id" field.

func ReplyToIDIsNil

func ReplyToIDIsNil() predicate.Message

ReplyToIDIsNil applies the IsNil predicate on the "reply_to_id" field.

func ReplyToIDLT

func ReplyToIDLT(v uuid.UUID) predicate.Message

ReplyToIDLT applies the LT predicate on the "reply_to_id" field.

func ReplyToIDLTE

func ReplyToIDLTE(v uuid.UUID) predicate.Message

ReplyToIDLTE applies the LTE predicate on the "reply_to_id" field.

func ReplyToIDNEQ

func ReplyToIDNEQ(v uuid.UUID) predicate.Message

ReplyToIDNEQ applies the NEQ predicate on the "reply_to_id" field.

func ReplyToIDNotIn

func ReplyToIDNotIn(vs ...uuid.UUID) predicate.Message

ReplyToIDNotIn applies the NotIn predicate on the "reply_to_id" field.

func ReplyToIDNotNil

func ReplyToIDNotNil() predicate.Message

ReplyToIDNotNil applies the NotNil predicate on the "reply_to_id" field.

func Runtime

func Runtime(v string) predicate.Message

Runtime applies equality check predicate on the "runtime" field. It's identical to RuntimeEQ.

func RuntimeContains

func RuntimeContains(v string) predicate.Message

RuntimeContains applies the Contains predicate on the "runtime" field.

func RuntimeContainsFold

func RuntimeContainsFold(v string) predicate.Message

RuntimeContainsFold applies the ContainsFold predicate on the "runtime" field.

func RuntimeEQ

func RuntimeEQ(v string) predicate.Message

RuntimeEQ applies the EQ predicate on the "runtime" field.

func RuntimeEqualFold

func RuntimeEqualFold(v string) predicate.Message

RuntimeEqualFold applies the EqualFold predicate on the "runtime" field.

func RuntimeGT

func RuntimeGT(v string) predicate.Message

RuntimeGT applies the GT predicate on the "runtime" field.

func RuntimeGTE

func RuntimeGTE(v string) predicate.Message

RuntimeGTE applies the GTE predicate on the "runtime" field.

func RuntimeHasPrefix

func RuntimeHasPrefix(v string) predicate.Message

RuntimeHasPrefix applies the HasPrefix predicate on the "runtime" field.

func RuntimeHasSuffix

func RuntimeHasSuffix(v string) predicate.Message

RuntimeHasSuffix applies the HasSuffix predicate on the "runtime" field.

func RuntimeIn

func RuntimeIn(vs ...string) predicate.Message

RuntimeIn applies the In predicate on the "runtime" field.

func RuntimeIsNil

func RuntimeIsNil() predicate.Message

RuntimeIsNil applies the IsNil predicate on the "runtime" field.

func RuntimeLT

func RuntimeLT(v string) predicate.Message

RuntimeLT applies the LT predicate on the "runtime" field.

func RuntimeLTE

func RuntimeLTE(v string) predicate.Message

RuntimeLTE applies the LTE predicate on the "runtime" field.

func RuntimeNEQ

func RuntimeNEQ(v string) predicate.Message

RuntimeNEQ applies the NEQ predicate on the "runtime" field.

func RuntimeNotIn

func RuntimeNotIn(vs ...string) predicate.Message

RuntimeNotIn applies the NotIn predicate on the "runtime" field.

func RuntimeNotNil

func RuntimeNotNil() predicate.Message

RuntimeNotNil applies the NotNil predicate on the "runtime" field.

func Sender

func Sender(v string) predicate.Message

Sender applies equality check predicate on the "sender" field. It's identical to SenderEQ.

func SenderContains

func SenderContains(v string) predicate.Message

SenderContains applies the Contains predicate on the "sender" field.

func SenderContainsFold

func SenderContainsFold(v string) predicate.Message

SenderContainsFold applies the ContainsFold predicate on the "sender" field.

func SenderEQ

func SenderEQ(v string) predicate.Message

SenderEQ applies the EQ predicate on the "sender" field.

func SenderEqualFold

func SenderEqualFold(v string) predicate.Message

SenderEqualFold applies the EqualFold predicate on the "sender" field.

func SenderGT

func SenderGT(v string) predicate.Message

SenderGT applies the GT predicate on the "sender" field.

func SenderGTE

func SenderGTE(v string) predicate.Message

SenderGTE applies the GTE predicate on the "sender" field.

func SenderHasPrefix

func SenderHasPrefix(v string) predicate.Message

SenderHasPrefix applies the HasPrefix predicate on the "sender" field.

func SenderHasSuffix

func SenderHasSuffix(v string) predicate.Message

SenderHasSuffix applies the HasSuffix predicate on the "sender" field.

func SenderIn

func SenderIn(vs ...string) predicate.Message

SenderIn applies the In predicate on the "sender" field.

func SenderLT

func SenderLT(v string) predicate.Message

SenderLT applies the LT predicate on the "sender" field.

func SenderLTE

func SenderLTE(v string) predicate.Message

SenderLTE applies the LTE predicate on the "sender" field.

func SenderNEQ

func SenderNEQ(v string) predicate.Message

SenderNEQ applies the NEQ predicate on the "sender" field.

func SenderNotIn

func SenderNotIn(vs ...string) predicate.Message

SenderNotIn applies the NotIn predicate on the "sender" field.

func Team

func Team(v string) predicate.Message

Team applies equality check predicate on the "team" field. It's identical to TeamEQ.

func TeamContains

func TeamContains(v string) predicate.Message

TeamContains applies the Contains predicate on the "team" field.

func TeamContainsFold

func TeamContainsFold(v string) predicate.Message

TeamContainsFold applies the ContainsFold predicate on the "team" field.

func TeamEQ

func TeamEQ(v string) predicate.Message

TeamEQ applies the EQ predicate on the "team" field.

func TeamEqualFold

func TeamEqualFold(v string) predicate.Message

TeamEqualFold applies the EqualFold predicate on the "team" field.

func TeamGT

func TeamGT(v string) predicate.Message

TeamGT applies the GT predicate on the "team" field.

func TeamGTE

func TeamGTE(v string) predicate.Message

TeamGTE applies the GTE predicate on the "team" field.

func TeamHasPrefix

func TeamHasPrefix(v string) predicate.Message

TeamHasPrefix applies the HasPrefix predicate on the "team" field.

func TeamHasSuffix

func TeamHasSuffix(v string) predicate.Message

TeamHasSuffix applies the HasSuffix predicate on the "team" field.

func TeamIn

func TeamIn(vs ...string) predicate.Message

TeamIn applies the In predicate on the "team" field.

func TeamLT

func TeamLT(v string) predicate.Message

TeamLT applies the LT predicate on the "team" field.

func TeamLTE

func TeamLTE(v string) predicate.Message

TeamLTE applies the LTE predicate on the "team" field.

func TeamNEQ

func TeamNEQ(v string) predicate.Message

TeamNEQ applies the NEQ predicate on the "team" field.

func TeamNotIn

func TeamNotIn(vs ...string) predicate.Message

TeamNotIn applies the NotIn predicate on the "team" field.

func ValidColumn

func ValidColumn(column string) bool

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

Types

type Channel

type Channel string

Channel defines the type for the "channel" enum field.

const (
	ChannelTelegram Channel = "telegram"
	ChannelMatrix   Channel = "matrix"
	ChannelGui      Channel = "gui"
	ChannelCli      Channel = "cli"
	ChannelWatcher  Channel = "watcher"
	ChannelAdapter  Channel = "adapter"
)

Channel values.

func (Channel) String

func (c Channel) String() string

type MessageType

type MessageType string

MessageType defines the type for the "message_type" enum field.

const (
	MessageTypeText         MessageType = "text"
	MessageTypeSystem       MessageType = "system"
	MessageTypeNotification MessageType = "notification"
)

MessageType values.

func (MessageType) String

func (mt MessageType) String() string

type OrderOption

type OrderOption func(*sql.Selector)

OrderOption defines the ordering options for the Message queries.

func ByAttachments

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

ByAttachments orders the results by attachments terms.

func ByAttachmentsCount

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

ByAttachmentsCount orders the results by attachments count.

func ByChannel

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

ByChannel orders the results by the channel field.

func ByContent

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

ByContent orders the results by the content 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 ByMessageType

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

ByMessageType orders the results by the message_type field.

func ByReactions

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

ByReactions orders the results by reactions terms.

func ByReactionsCount

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

ByReactionsCount orders the results by reactions count.

func ByRecipient

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

ByRecipient orders the results by the recipient field.

func ByReplyToID

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

ByReplyToID orders the results by the reply_to_id field.

func ByRuntime

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

ByRuntime orders the results by the runtime field.

func BySender

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

BySender orders the results by the sender field.

func ByTeam

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

ByTeam orders the results by the team field.

Jump to

Keyboard shortcuts

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