Documentation
¶
Index ¶
- Constants
- Variables
- func And(predicates ...predicate.Message) predicate.Message
- func AuthorTypeEQ(v AuthorType) predicate.Message
- func AuthorTypeIn(vs ...AuthorType) predicate.Message
- func AuthorTypeNEQ(v AuthorType) predicate.Message
- func AuthorTypeNotIn(vs ...AuthorType) predicate.Message
- func AuthorTypeValidator(at AuthorType) error
- func AuthorUserID(v uuid.UUID) predicate.Message
- func AuthorUserIDEQ(v uuid.UUID) predicate.Message
- func AuthorUserIDIn(vs ...uuid.UUID) predicate.Message
- func AuthorUserIDIsNil() predicate.Message
- func AuthorUserIDNEQ(v uuid.UUID) predicate.Message
- func AuthorUserIDNotIn(vs ...uuid.UUID) predicate.Message
- func AuthorUserIDNotNil() predicate.Message
- func ChatID(v uuid.UUID) predicate.Message
- func ChatIDEQ(v uuid.UUID) predicate.Message
- func ChatIDIn(vs ...uuid.UUID) predicate.Message
- func ChatIDNEQ(v uuid.UUID) predicate.Message
- func ChatIDNotIn(vs ...uuid.UUID) predicate.Message
- func Content(v string) predicate.Message
- func ContentContains(v string) predicate.Message
- func ContentContainsFold(v string) predicate.Message
- func ContentEQ(v string) predicate.Message
- func ContentEqualFold(v string) predicate.Message
- func ContentGT(v string) predicate.Message
- func ContentGTE(v string) predicate.Message
- func ContentHasPrefix(v string) predicate.Message
- func ContentHasSuffix(v string) predicate.Message
- func ContentIn(vs ...string) predicate.Message
- func ContentLT(v string) predicate.Message
- func ContentLTE(v string) predicate.Message
- func ContentNEQ(v string) predicate.Message
- func ContentNotIn(vs ...string) predicate.Message
- func CreatedAt(v time.Time) predicate.Message
- func CreatedAtEQ(v time.Time) predicate.Message
- func CreatedAtGT(v time.Time) predicate.Message
- func CreatedAtGTE(v time.Time) predicate.Message
- func CreatedAtIn(vs ...time.Time) predicate.Message
- func CreatedAtLT(v time.Time) predicate.Message
- func CreatedAtLTE(v time.Time) predicate.Message
- func CreatedAtNEQ(v time.Time) predicate.Message
- func CreatedAtNotIn(vs ...time.Time) predicate.Message
- func HasAuthor() predicate.Message
- func HasAuthorWith(preds ...predicate.User) predicate.Message
- func HasChat() predicate.Message
- func HasChatWith(preds ...predicate.Chat) predicate.Message
- func ID(id uuid.UUID) predicate.Message
- func IDEQ(id uuid.UUID) predicate.Message
- func IDGT(id uuid.UUID) predicate.Message
- func IDGTE(id uuid.UUID) predicate.Message
- func IDIn(ids ...uuid.UUID) predicate.Message
- func IDLT(id uuid.UUID) predicate.Message
- func IDLTE(id uuid.UUID) predicate.Message
- func IDNEQ(id uuid.UUID) predicate.Message
- func IDNotIn(ids ...uuid.UUID) predicate.Message
- func Not(p predicate.Message) predicate.Message
- func Or(predicates ...predicate.Message) predicate.Message
- func ValidColumn(column string) bool
- type AuthorType
- type OrderOption
- func ByAuthorField(field string, opts ...sql.OrderTermOption) OrderOption
- func ByAuthorType(opts ...sql.OrderTermOption) OrderOption
- func ByAuthorUserID(opts ...sql.OrderTermOption) OrderOption
- func ByChatField(field string, opts ...sql.OrderTermOption) OrderOption
- func ByChatID(opts ...sql.OrderTermOption) OrderOption
- func ByContent(opts ...sql.OrderTermOption) OrderOption
- func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption
- func ByID(opts ...sql.OrderTermOption) OrderOption
Constants ¶
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" // FieldChatID holds the string denoting the chat_id field in the database. FieldChatID = "chat_id" // FieldAuthorType holds the string denoting the author_type field in the database. FieldAuthorType = "author_type" // FieldAuthorUserID holds the string denoting the author_user_id field in the database. FieldAuthorUserID = "author_user_id" // FieldContent holds the string denoting the content field in the database. FieldContent = "content" // FieldCreatedAt holds the string denoting the created_at field in the database. FieldCreatedAt = "created_at" // EdgeChat holds the string denoting the chat edge name in mutations. EdgeChat = "chat" // EdgeAuthor holds the string denoting the author edge name in mutations. EdgeAuthor = "author" // Table holds the table name of the message in the database. Table = "messages" // ChatTable is the table that holds the chat relation/edge. ChatTable = "messages" // ChatInverseTable is the table name for the Chat entity. // It exists in this package in order to avoid circular dependency with the "chat" package. ChatInverseTable = "chats" // ChatColumn is the table column denoting the chat relation/edge. ChatColumn = "chat_id" // AuthorTable is the table that holds the author relation/edge. AuthorTable = "messages" // AuthorInverseTable is the table name for the User entity. // It exists in this package in order to avoid circular dependency with the "user" package. AuthorInverseTable = "users" // AuthorColumn is the table column denoting the author relation/edge. AuthorColumn = "author_user_id" )
Variables ¶
var ( // ContentValidator is a validator for the "content" field. It is called by the builders before save. ContentValidator 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 )
var Columns = []string{ FieldID, FieldChatID, FieldAuthorType, FieldAuthorUserID, FieldContent, FieldCreatedAt, }
Columns holds all SQL columns for message fields.
Functions ¶
func AuthorTypeEQ ¶
func AuthorTypeEQ(v AuthorType) predicate.Message
AuthorTypeEQ applies the EQ predicate on the "author_type" field.
func AuthorTypeIn ¶
func AuthorTypeIn(vs ...AuthorType) predicate.Message
AuthorTypeIn applies the In predicate on the "author_type" field.
func AuthorTypeNEQ ¶
func AuthorTypeNEQ(v AuthorType) predicate.Message
AuthorTypeNEQ applies the NEQ predicate on the "author_type" field.
func AuthorTypeNotIn ¶
func AuthorTypeNotIn(vs ...AuthorType) predicate.Message
AuthorTypeNotIn applies the NotIn predicate on the "author_type" field.
func AuthorTypeValidator ¶
func AuthorTypeValidator(at AuthorType) error
AuthorTypeValidator is a validator for the "author_type" field enum values. It is called by the builders before save.
func AuthorUserID ¶
AuthorUserID applies equality check predicate on the "author_user_id" field. It's identical to AuthorUserIDEQ.
func AuthorUserIDEQ ¶
AuthorUserIDEQ applies the EQ predicate on the "author_user_id" field.
func AuthorUserIDIn ¶
AuthorUserIDIn applies the In predicate on the "author_user_id" field.
func AuthorUserIDIsNil ¶
AuthorUserIDIsNil applies the IsNil predicate on the "author_user_id" field.
func AuthorUserIDNEQ ¶
AuthorUserIDNEQ applies the NEQ predicate on the "author_user_id" field.
func AuthorUserIDNotIn ¶
AuthorUserIDNotIn applies the NotIn predicate on the "author_user_id" field.
func AuthorUserIDNotNil ¶
AuthorUserIDNotNil applies the NotNil predicate on the "author_user_id" field.
func ChatID ¶
ChatID applies equality check predicate on the "chat_id" field. It's identical to ChatIDEQ.
func ChatIDNotIn ¶
ChatIDNotIn applies the NotIn predicate on the "chat_id" field.
func Content ¶
Content applies equality check predicate on the "content" field. It's identical to ContentEQ.
func ContentContains ¶
ContentContains applies the Contains predicate on the "content" field.
func ContentContainsFold ¶
ContentContainsFold applies the ContainsFold predicate on the "content" field.
func ContentEqualFold ¶
ContentEqualFold applies the EqualFold predicate on the "content" field.
func ContentGTE ¶
ContentGTE applies the GTE predicate on the "content" field.
func ContentHasPrefix ¶
ContentHasPrefix applies the HasPrefix predicate on the "content" field.
func ContentHasSuffix ¶
ContentHasSuffix applies the HasSuffix predicate on the "content" field.
func ContentLTE ¶
ContentLTE applies the LTE predicate on the "content" field.
func ContentNEQ ¶
ContentNEQ applies the NEQ predicate on the "content" field.
func ContentNotIn ¶
ContentNotIn applies the NotIn predicate on the "content" field.
func CreatedAt ¶
CreatedAt applies equality check predicate on the "created_at" field. It's identical to CreatedAtEQ.
func CreatedAtEQ ¶
CreatedAtEQ applies the EQ predicate on the "created_at" field.
func CreatedAtGT ¶
CreatedAtGT applies the GT predicate on the "created_at" field.
func CreatedAtGTE ¶
CreatedAtGTE applies the GTE predicate on the "created_at" field.
func CreatedAtIn ¶
CreatedAtIn applies the In predicate on the "created_at" field.
func CreatedAtLT ¶
CreatedAtLT applies the LT predicate on the "created_at" field.
func CreatedAtLTE ¶
CreatedAtLTE applies the LTE predicate on the "created_at" field.
func CreatedAtNEQ ¶
CreatedAtNEQ applies the NEQ predicate on the "created_at" field.
func CreatedAtNotIn ¶
CreatedAtNotIn applies the NotIn predicate on the "created_at" field.
func HasAuthorWith ¶
HasAuthorWith applies the HasEdge predicate on the "author" edge with a given conditions (other predicates).
func HasChatWith ¶
HasChatWith applies the HasEdge predicate on the "chat" edge with a given conditions (other predicates).
func ValidColumn ¶
ValidColumn reports if the column name is valid (part of the table columns).
Types ¶
type AuthorType ¶
type AuthorType string
AuthorType defines the type for the "author_type" enum field.
const ( AuthorTypeUser AuthorType = "user" AuthorTypeAgent AuthorType = "agent" )
AuthorType values.
func (AuthorType) String ¶
func (at AuthorType) String() string
type OrderOption ¶
OrderOption defines the ordering options for the Message queries.
func ByAuthorField ¶
func ByAuthorField(field string, opts ...sql.OrderTermOption) OrderOption
ByAuthorField orders the results by author field.
func ByAuthorType ¶
func ByAuthorType(opts ...sql.OrderTermOption) OrderOption
ByAuthorType orders the results by the author_type field.
func ByAuthorUserID ¶
func ByAuthorUserID(opts ...sql.OrderTermOption) OrderOption
ByAuthorUserID orders the results by the author_user_id field.
func ByChatField ¶
func ByChatField(field string, opts ...sql.OrderTermOption) OrderOption
ByChatField orders the results by chat field.
func ByChatID ¶
func ByChatID(opts ...sql.OrderTermOption) OrderOption
ByChatID orders the results by the chat_id 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.