message

package
v0.0.0-...-05e3429 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2024 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"
	// 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"
	// FieldConversationID holds the string denoting the conversation_id field in the database.
	FieldConversationID = "conversation_id"
	// FieldSenderID holds the string denoting the sender_id field in the database.
	FieldSenderID = "sender_id"
	// FieldType holds the string denoting the type field in the database.
	FieldType = "type"
	// FieldContent holds the string denoting the content field in the database.
	FieldContent = "content"
	// FieldIsRead holds the string denoting the is_read field in the database.
	FieldIsRead = "is_read"
	// EdgeConversation holds the string denoting the conversation edge name in mutations.
	EdgeConversation = "conversation"
	// EdgeSender holds the string denoting the sender edge name in mutations.
	EdgeSender = "sender"
	// Table holds the table name of the message in the database.
	Table = "messages"
	// ConversationTable is the table that holds the conversation relation/edge.
	ConversationTable = "messages"
	// ConversationInverseTable is the table name for the Conversation entity.
	// It exists in this package in order to avoid circular dependency with the "conversation" package.
	ConversationInverseTable = "conversations"
	// ConversationColumn is the table column denoting the conversation relation/edge.
	ConversationColumn = "conversation_id"
	// SenderTable is the table that holds the sender relation/edge.
	SenderTable = "messages"
	// SenderInverseTable is the table name for the Person entity.
	// It exists in this package in order to avoid circular dependency with the "person" package.
	SenderInverseTable = "persons"
	// SenderColumn is the table column denoting the sender relation/edge.
	SenderColumn = "sender_id"
)
View Source
const DefaultType = TypeText

TypeText is the default value of the Type enum.

Variables

View Source
var (
	// 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
	// ContentValidator is a validator for the "content" field. It is called by the builders before save.
	ContentValidator func(string) error
	// DefaultIsRead holds the default value on creation for the "is_read" field.
	DefaultIsRead bool
	// 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 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 ConversationID

func ConversationID(v uuid.UUID) predicate.Message

ConversationID applies equality check predicate on the "conversation_id" field. It's identical to ConversationIDEQ.

func ConversationIDEQ

func ConversationIDEQ(v uuid.UUID) predicate.Message

ConversationIDEQ applies the EQ predicate on the "conversation_id" field.

func ConversationIDIn

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

ConversationIDIn applies the In predicate on the "conversation_id" field.

func ConversationIDNEQ

func ConversationIDNEQ(v uuid.UUID) predicate.Message

ConversationIDNEQ applies the NEQ predicate on the "conversation_id" field.

func ConversationIDNotIn

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

ConversationIDNotIn applies the NotIn predicate on the "conversation_id" 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 HasConversation

func HasConversation() predicate.Message

HasConversation applies the HasEdge predicate on the "conversation" edge.

func HasConversationWith

func HasConversationWith(preds ...predicate.Conversation) predicate.Message

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

func HasSender

func HasSender() predicate.Message

HasSender applies the HasEdge predicate on the "sender" edge.

func HasSenderWith

func HasSenderWith(preds ...predicate.Person) predicate.Message

HasSenderWith applies the HasEdge predicate on the "sender" 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 IsRead

func IsRead(v bool) predicate.Message

IsRead applies equality check predicate on the "is_read" field. It's identical to IsReadEQ.

func IsReadEQ

func IsReadEQ(v bool) predicate.Message

IsReadEQ applies the EQ predicate on the "is_read" field.

func IsReadNEQ

func IsReadNEQ(v bool) predicate.Message

IsReadNEQ applies the NEQ predicate on the "is_read" field.

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 SenderID

func SenderID(v uuid.UUID) predicate.Message

SenderID applies equality check predicate on the "sender_id" field. It's identical to SenderIDEQ.

func SenderIDEQ

func SenderIDEQ(v uuid.UUID) predicate.Message

SenderIDEQ applies the EQ predicate on the "sender_id" field.

func SenderIDIn

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

SenderIDIn applies the In predicate on the "sender_id" field.

func SenderIDNEQ

func SenderIDNEQ(v uuid.UUID) predicate.Message

SenderIDNEQ applies the NEQ predicate on the "sender_id" field.

func SenderIDNotIn

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

SenderIDNotIn applies the NotIn predicate on the "sender_id" field.

func TypeEQ

func TypeEQ(v Type) predicate.Message

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

func TypeIn

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

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

func TypeNEQ

func TypeNEQ(v Type) predicate.Message

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

func TypeNotIn

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

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.Message

UpdatedAt applies equality check predicate on the "updated_at" field. It's identical to UpdatedAtEQ.

func UpdatedAtEQ

func UpdatedAtEQ(v time.Time) predicate.Message

UpdatedAtEQ applies the EQ predicate on the "updated_at" field.

func UpdatedAtGT

func UpdatedAtGT(v time.Time) predicate.Message

UpdatedAtGT applies the GT predicate on the "updated_at" field.

func UpdatedAtGTE

func UpdatedAtGTE(v time.Time) predicate.Message

UpdatedAtGTE applies the GTE predicate on the "updated_at" field.

func UpdatedAtIn

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

UpdatedAtIn applies the In predicate on the "updated_at" field.

func UpdatedAtLT

func UpdatedAtLT(v time.Time) predicate.Message

UpdatedAtLT applies the LT predicate on the "updated_at" field.

func UpdatedAtLTE

func UpdatedAtLTE(v time.Time) predicate.Message

UpdatedAtLTE applies the LTE predicate on the "updated_at" field.

func UpdatedAtNEQ

func UpdatedAtNEQ(v time.Time) predicate.Message

UpdatedAtNEQ applies the NEQ predicate on the "updated_at" field.

func UpdatedAtNotIn

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

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 Message queries.

func ByContent

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

ByContent orders the results by the content field.

func ByConversationField

func ByConversationField(field string, opts ...sql.OrderTermOption) OrderOption

ByConversationField orders the results by conversation field.

func ByConversationID

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

ByConversationID orders the results by the conversation_id 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 ByIsRead

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

ByIsRead orders the results by the is_read field.

func BySenderField

func BySenderField(field string, opts ...sql.OrderTermOption) OrderOption

BySenderField orders the results by sender field.

func BySenderID

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

BySenderID orders the results by the sender_id field.

func ByType

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

ByType orders the results by the type field.

func ByUpdatedAt

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

ByUpdatedAt orders the results by the updated_at field.

type Type

type Type string

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

const (
	TypeText  Type = "TEXT"
	TypeImage Type = "IMAGE"
	TypeVideo Type = "VIDEO"
	TypeAudio Type = "AUDIO"
	TypeFile  Type = "FILE"
	TypeOther Type = "OTHER"
)

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