chat

package
v0.0.0-...-6a61234 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Label holds the string label denoting the chat type in the database.
	Label = "chat"
	// 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"
	// FieldName holds the string denoting the name field in the database.
	FieldName = "name"
	// FieldCtype holds the string denoting the ctype field in the database.
	FieldCtype = "ctype"
	// FieldDescription holds the string denoting the description field in the database.
	FieldDescription = "description"
	// FieldOwnerID holds the string denoting the owner_id field in the database.
	FieldOwnerID = "owner_id"
	// FieldImageID holds the string denoting the image_id field in the database.
	FieldImageID = "image_id"
	// EdgeOwner holds the string denoting the owner edge name in mutations.
	EdgeOwner = "owner"
	// EdgeImage holds the string denoting the image edge name in mutations.
	EdgeImage = "image"
	// EdgeUsers holds the string denoting the users edge name in mutations.
	EdgeUsers = "users"
	// EdgeMessages holds the string denoting the messages edge name in mutations.
	EdgeMessages = "messages"
	// Table holds the table name of the chat in the database.
	Table = "chats"
	// OwnerTable is the table that holds the owner relation/edge.
	OwnerTable = "chats"
	// OwnerInverseTable is the table name for the User entity.
	// It exists in this package in order to avoid circular dependency with the "user" package.
	OwnerInverseTable = "users"
	// OwnerColumn is the table column denoting the owner relation/edge.
	OwnerColumn = "owner_id"
	// ImageTable is the table that holds the image relation/edge.
	ImageTable = "chats"
	// ImageInverseTable is the table name for the File entity.
	// It exists in this package in order to avoid circular dependency with the "file" package.
	ImageInverseTable = "files"
	// ImageColumn is the table column denoting the image relation/edge.
	ImageColumn = "image_id"
	// UsersTable is the table that holds the users relation/edge. The primary key declared below.
	UsersTable = "user_member_chats"
	// UsersInverseTable is the table name for the User entity.
	// It exists in this package in order to avoid circular dependency with the "user" package.
	UsersInverseTable = "users"
	// 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 = "chat_id"
)

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
	// DefaultID holds the default value on creation for the "id" field.
	DefaultID func() uuid.UUID
)

Columns holds all SQL columns for chat fields.

View Source
var (
	// UsersPrimaryKey and UsersColumn2 are the table columns denoting the
	// primary key for the users relation (M2M).
	UsersPrimaryKey = []string{"user_id", "chat_id"}
)

Functions

func And

func And(predicates ...predicate.Chat) predicate.Chat

And groups predicates with the AND operator between them.

func CreatedAt

func CreatedAt(v time.Time) predicate.Chat

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

func CreatedAtEQ

func CreatedAtEQ(v time.Time) predicate.Chat

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

func CreatedAtGT

func CreatedAtGT(v time.Time) predicate.Chat

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

func CreatedAtGTE

func CreatedAtGTE(v time.Time) predicate.Chat

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

func CreatedAtIn

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

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

func CreatedAtLT

func CreatedAtLT(v time.Time) predicate.Chat

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

func CreatedAtLTE

func CreatedAtLTE(v time.Time) predicate.Chat

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

func CreatedAtNEQ

func CreatedAtNEQ(v time.Time) predicate.Chat

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

func CreatedAtNotIn

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

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

func CtypeEQ

func CtypeEQ(v Ctype) predicate.Chat

CtypeEQ applies the EQ predicate on the "ctype" field.

func CtypeIn

func CtypeIn(vs ...Ctype) predicate.Chat

CtypeIn applies the In predicate on the "ctype" field.

func CtypeNEQ

func CtypeNEQ(v Ctype) predicate.Chat

CtypeNEQ applies the NEQ predicate on the "ctype" field.

func CtypeNotIn

func CtypeNotIn(vs ...Ctype) predicate.Chat

CtypeNotIn applies the NotIn predicate on the "ctype" field.

func CtypeValidator

func CtypeValidator(c Ctype) error

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

func Description

func Description(v string) predicate.Chat

Description applies equality check predicate on the "description" field. It's identical to DescriptionEQ.

func DescriptionContains

func DescriptionContains(v string) predicate.Chat

DescriptionContains applies the Contains predicate on the "description" field.

func DescriptionContainsFold

func DescriptionContainsFold(v string) predicate.Chat

DescriptionContainsFold applies the ContainsFold predicate on the "description" field.

func DescriptionEQ

func DescriptionEQ(v string) predicate.Chat

DescriptionEQ applies the EQ predicate on the "description" field.

func DescriptionEqualFold

func DescriptionEqualFold(v string) predicate.Chat

DescriptionEqualFold applies the EqualFold predicate on the "description" field.

func DescriptionGT

func DescriptionGT(v string) predicate.Chat

DescriptionGT applies the GT predicate on the "description" field.

func DescriptionGTE

func DescriptionGTE(v string) predicate.Chat

DescriptionGTE applies the GTE predicate on the "description" field.

func DescriptionHasPrefix

func DescriptionHasPrefix(v string) predicate.Chat

DescriptionHasPrefix applies the HasPrefix predicate on the "description" field.

func DescriptionHasSuffix

func DescriptionHasSuffix(v string) predicate.Chat

DescriptionHasSuffix applies the HasSuffix predicate on the "description" field.

func DescriptionIn

func DescriptionIn(vs ...string) predicate.Chat

DescriptionIn applies the In predicate on the "description" field.

func DescriptionIsNil

func DescriptionIsNil() predicate.Chat

DescriptionIsNil applies the IsNil predicate on the "description" field.

func DescriptionLT

func DescriptionLT(v string) predicate.Chat

DescriptionLT applies the LT predicate on the "description" field.

func DescriptionLTE

func DescriptionLTE(v string) predicate.Chat

DescriptionLTE applies the LTE predicate on the "description" field.

func DescriptionNEQ

func DescriptionNEQ(v string) predicate.Chat

DescriptionNEQ applies the NEQ predicate on the "description" field.

func DescriptionNotIn

func DescriptionNotIn(vs ...string) predicate.Chat

DescriptionNotIn applies the NotIn predicate on the "description" field.

func DescriptionNotNil

func DescriptionNotNil() predicate.Chat

DescriptionNotNil applies the NotNil predicate on the "description" field.

func HasImage

func HasImage() predicate.Chat

HasImage applies the HasEdge predicate on the "image" edge.

func HasImageWith

func HasImageWith(preds ...predicate.File) predicate.Chat

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

func HasMessages

func HasMessages() predicate.Chat

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

func HasMessagesWith

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

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

func HasOwner

func HasOwner() predicate.Chat

HasOwner applies the HasEdge predicate on the "owner" edge.

func HasOwnerWith

func HasOwnerWith(preds ...predicate.User) predicate.Chat

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

func HasUsers

func HasUsers() predicate.Chat

HasUsers applies the HasEdge predicate on the "users" edge.

func HasUsersWith

func HasUsersWith(preds ...predicate.User) predicate.Chat

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

func ID

func ID(id uuid.UUID) predicate.Chat

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id uuid.UUID) predicate.Chat

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id uuid.UUID) predicate.Chat

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id uuid.UUID) predicate.Chat

IDGTE applies the GTE predicate on the ID field.

func IDIn

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

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id uuid.UUID) predicate.Chat

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id uuid.UUID) predicate.Chat

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id uuid.UUID) predicate.Chat

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

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

IDNotIn applies the NotIn predicate on the ID field.

func ImageID

func ImageID(v uuid.UUID) predicate.Chat

ImageID applies equality check predicate on the "image_id" field. It's identical to ImageIDEQ.

func ImageIDEQ

func ImageIDEQ(v uuid.UUID) predicate.Chat

ImageIDEQ applies the EQ predicate on the "image_id" field.

func ImageIDIn

func ImageIDIn(vs ...uuid.UUID) predicate.Chat

ImageIDIn applies the In predicate on the "image_id" field.

func ImageIDIsNil

func ImageIDIsNil() predicate.Chat

ImageIDIsNil applies the IsNil predicate on the "image_id" field.

func ImageIDNEQ

func ImageIDNEQ(v uuid.UUID) predicate.Chat

ImageIDNEQ applies the NEQ predicate on the "image_id" field.

func ImageIDNotIn

func ImageIDNotIn(vs ...uuid.UUID) predicate.Chat

ImageIDNotIn applies the NotIn predicate on the "image_id" field.

func ImageIDNotNil

func ImageIDNotNil() predicate.Chat

ImageIDNotNil applies the NotNil predicate on the "image_id" field.

func Name

func Name(v string) predicate.Chat

Name applies equality check predicate on the "name" field. It's identical to NameEQ.

func NameContains

func NameContains(v string) predicate.Chat

NameContains applies the Contains predicate on the "name" field.

func NameContainsFold

func NameContainsFold(v string) predicate.Chat

NameContainsFold applies the ContainsFold predicate on the "name" field.

func NameEQ

func NameEQ(v string) predicate.Chat

NameEQ applies the EQ predicate on the "name" field.

func NameEqualFold

func NameEqualFold(v string) predicate.Chat

NameEqualFold applies the EqualFold predicate on the "name" field.

func NameGT

func NameGT(v string) predicate.Chat

NameGT applies the GT predicate on the "name" field.

func NameGTE

func NameGTE(v string) predicate.Chat

NameGTE applies the GTE predicate on the "name" field.

func NameHasPrefix

func NameHasPrefix(v string) predicate.Chat

NameHasPrefix applies the HasPrefix predicate on the "name" field.

func NameHasSuffix

func NameHasSuffix(v string) predicate.Chat

NameHasSuffix applies the HasSuffix predicate on the "name" field.

func NameIn

func NameIn(vs ...string) predicate.Chat

NameIn applies the In predicate on the "name" field.

func NameIsNil

func NameIsNil() predicate.Chat

NameIsNil applies the IsNil predicate on the "name" field.

func NameLT

func NameLT(v string) predicate.Chat

NameLT applies the LT predicate on the "name" field.

func NameLTE

func NameLTE(v string) predicate.Chat

NameLTE applies the LTE predicate on the "name" field.

func NameNEQ

func NameNEQ(v string) predicate.Chat

NameNEQ applies the NEQ predicate on the "name" field.

func NameNotIn

func NameNotIn(vs ...string) predicate.Chat

NameNotIn applies the NotIn predicate on the "name" field.

func NameNotNil

func NameNotNil() predicate.Chat

NameNotNil applies the NotNil predicate on the "name" field.

func Not

Not applies the not operator on the given predicate.

func Or

func Or(predicates ...predicate.Chat) predicate.Chat

Or groups predicates with the OR operator between them.

func OwnerID

func OwnerID(v uuid.UUID) predicate.Chat

OwnerID applies equality check predicate on the "owner_id" field. It's identical to OwnerIDEQ.

func OwnerIDEQ

func OwnerIDEQ(v uuid.UUID) predicate.Chat

OwnerIDEQ applies the EQ predicate on the "owner_id" field.

func OwnerIDIn

func OwnerIDIn(vs ...uuid.UUID) predicate.Chat

OwnerIDIn applies the In predicate on the "owner_id" field.

func OwnerIDNEQ

func OwnerIDNEQ(v uuid.UUID) predicate.Chat

OwnerIDNEQ applies the NEQ predicate on the "owner_id" field.

func OwnerIDNotIn

func OwnerIDNotIn(vs ...uuid.UUID) predicate.Chat

OwnerIDNotIn applies the NotIn predicate on the "owner_id" field.

func UpdatedAt

func UpdatedAt(v time.Time) predicate.Chat

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

func UpdatedAtEQ

func UpdatedAtEQ(v time.Time) predicate.Chat

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

func UpdatedAtGT

func UpdatedAtGT(v time.Time) predicate.Chat

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

func UpdatedAtGTE

func UpdatedAtGTE(v time.Time) predicate.Chat

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

func UpdatedAtIn

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

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

func UpdatedAtLT

func UpdatedAtLT(v time.Time) predicate.Chat

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

func UpdatedAtLTE

func UpdatedAtLTE(v time.Time) predicate.Chat

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

func UpdatedAtNEQ

func UpdatedAtNEQ(v time.Time) predicate.Chat

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

func UpdatedAtNotIn

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

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 Ctype

type Ctype string

Ctype defines the type for the "ctype" enum field.

const (
	CtypeDM    Ctype = "DM"
	CtypeGROUP Ctype = "GROUP"
)

Ctype values.

func (Ctype) String

func (c Ctype) String() string

type OrderOption

type OrderOption func(*sql.Selector)

OrderOption defines the ordering options for the Chat queries.

func ByCreatedAt

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

ByCreatedAt orders the results by the created_at field.

func ByCtype

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

ByCtype orders the results by the ctype field.

func ByDescription

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

ByDescription orders the results by the description field.

func ByID

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

ByID orders the results by the id field.

func ByImageField

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

ByImageField orders the results by image field.

func ByImageID

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

ByImageID orders the results by the image_id 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 ByName

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

ByName orders the results by the name field.

func ByOwnerField

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

ByOwnerField orders the results by owner field.

func ByOwnerID

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

ByOwnerID orders the results by the owner_id field.

func ByUpdatedAt

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

ByUpdatedAt orders the results by the updated_at field.

func ByUsers

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

ByUsers orders the results by users terms.

func ByUsersCount

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

ByUsersCount orders the results by users count.

Jump to

Keyboard shortcuts

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