Documentation ¶
Index ¶
- func AuthorAvatarScope(db *gorm.DB) *gorm.DB
- func AuthorReactionScope(db *gorm.DB) *gorm.DB
- func ChatOwnerImageScope(db *gorm.DB) *gorm.DB
- func ChatPreloadMessagesScope(db *gorm.DB) *gorm.DB
- func MessageSenderFileScope(db *gorm.DB) *gorm.DB
- func MessageSenderScope(db *gorm.DB) *gorm.DB
- func UserAvatarReactionScope(db *gorm.DB) *gorm.DB
- type ChatManager
- func (obj ChatManager) Create(db *gorm.DB, owner models.User, ctype choices.ChatTypeChoice, ...) models.Chat
- func (obj ChatManager) CreateGroup(db *gorm.DB, owner models.User, usersToAdd []models.User, ...) models.Chat
- func (obj ChatManager) DropData(db *gorm.DB)
- func (obj ChatManager) GetByID(db *gorm.DB, id uuid.UUID) models.Chat
- func (obj ChatManager) GetByUsernames(db *gorm.DB, usernames []string, excludeOpts ...uuid.UUID) []models.User
- func (obj ChatManager) GetDMChat(db *gorm.DB, user models.User, recipientUser models.User) models.Chat
- func (obj ChatManager) GetMessagesCount(db *gorm.DB, chatID uuid.UUID) int64
- func (obj ChatManager) GetSingleUserChat(db *gorm.DB, user models.User, id uuid.UUID) models.Chat
- func (obj ChatManager) GetSingleUserChatFullDetails(db *gorm.DB, user models.User, id uuid.UUID) models.Chat
- func (obj ChatManager) GetUserChats(db *gorm.DB, user models.User) []models.Chat
- func (obj ChatManager) GetUserGroup(db *gorm.DB, user models.User, id uuid.UUID, detailedOpts ...bool) models.Chat
- func (obj ChatManager) UpdateGroup(db *gorm.DB, chat *models.Chat, data schemas.GroupChatInputSchema) (*models.Chat, *utils.ErrorResponse)
- func (obj ChatManager) UserIsMember(chat models.Chat, targetUser models.User) bool
- func (obj ChatManager) UsernamesToAddAndRemoveValidations(db *gorm.DB, chat *models.Chat, usernamesToAdd *[]string, ...) (*models.Chat, *utils.ErrorResponse)
- type CommentManager
- func (obj CommentManager) Create(db *gorm.DB, author models.User, post models.Post, text string) models.Comment
- func (obj CommentManager) DropData(db *gorm.DB)
- func (obj CommentManager) GetByPostID(db *gorm.DB, postID uuid.UUID) []models.Comment
- func (obj CommentManager) GetBySlug(db *gorm.DB, slug string, opts ...bool) (*models.Comment, *int, *utils.ErrorResponse)
- func (obj CommentManager) Update(db *gorm.DB, comment models.Comment, author *models.User, text string) models.Comment
- type FriendManager
- func (obj FriendManager) DropData(db *gorm.DB)
- func (obj FriendManager) GetFriendRequests(db *gorm.DB, user *models.User) []models.User
- func (obj FriendManager) GetFriends(db *gorm.DB, user models.User) []models.User
- func (obj FriendManager) GetRequesteeAndFriendObj(db *gorm.DB, user *models.User, username string, ...) (*models.User, *models.Friend, *utils.ErrorResponse)
- type MessageManager
- func (obj MessageManager) Create(db *gorm.DB, sender models.User, chat models.Chat, text *string, ...) models.Message
- func (obj MessageManager) DropData(db *gorm.DB)
- func (obj MessageManager) GetByID(db *gorm.DB, id uuid.UUID) models.Message
- func (obj MessageManager) GetUserMessage(db *gorm.DB, user models.User, id uuid.UUID) models.Message
- func (obj MessageManager) Update(db *gorm.DB, message models.Message, text *string, fileType *string) models.Message
- type NotificationManager
- func (obj NotificationManager) Create(db *gorm.DB, sender *models.User, ntype choices.NotificationChoice, ...) models.Notification
- func (obj NotificationManager) DropData(db *gorm.DB)
- func (obj NotificationManager) Get(db *gorm.DB, sender *models.User, ntype choices.NotificationChoice, ...) *models.Notification
- func (obj NotificationManager) GetOrCreate(db *gorm.DB, sender *models.User, ntype choices.NotificationChoice, ...) (models.Notification, bool)
- func (obj NotificationManager) GetQueryset(db *gorm.DB, userID uuid.UUID) []models.Notification
- func (obj NotificationManager) IsAmongReceivers(db *gorm.DB, notificationID uuid.UUID, receiverID uuid.UUID) bool
- func (obj NotificationManager) MarkAsRead(db *gorm.DB, user *models.User)
- func (obj NotificationManager) ReadOne(db *gorm.DB, user *models.User, notificationID uuid.UUID) *utils.ErrorResponse
- type PostManager
- func (obj PostManager) All(db *gorm.DB) []models.Post
- func (obj PostManager) Create(db *gorm.DB, author models.User, postData schemas.PostInputSchema) models.Post
- func (obj PostManager) DropData(db *gorm.DB)
- func (obj PostManager) GetBySlug(db *gorm.DB, slug string, opts ...bool) (*models.Post, *int, *utils.ErrorResponse)
- func (obj PostManager) Update(db *gorm.DB, post *models.Post, postData schemas.PostInputSchema) *models.Post
- type ReactionManager
- func (obj ReactionManager) Create(db *gorm.DB, user models.User, focus choices.FocusTypeChoice, ...) models.Reaction
- func (obj ReactionManager) DropData(db *gorm.DB)
- func (obj ReactionManager) GetByID(db *gorm.DB, id *uuid.UUID) (*models.Reaction, *int, *utils.ErrorResponse)
- func (obj ReactionManager) GetReactionsQueryset(db *gorm.DB, fiberCtx *fiber.Ctx, focus choices.FocusTypeChoice, slug string) ([]models.Reaction, *int, *utils.ErrorResponse)
- func (obj ReactionManager) Update(db *gorm.DB, reaction models.Reaction, focus choices.FocusTypeChoice, ...) models.Reaction
- func (obj ReactionManager) UpdateOrCreate(db *gorm.DB, user models.User, focus choices.FocusTypeChoice, slug string, ...) (*models.Reaction, *models.User, *int, *utils.ErrorResponse)
- type ReplyManager
- func (obj ReplyManager) Create(db *gorm.DB, author models.User, comment models.Comment, text string) models.Reply
- func (obj ReplyManager) DropData(db *gorm.DB)
- func (obj ReplyManager) GetBySlug(db *gorm.DB, slug string, opts ...bool) (*models.Reply, *int, *utils.ErrorResponse)
- func (obj ReplyManager) Update(db *gorm.DB, reply models.Reply, author *models.User, text string) models.Reply
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ChatOwnerImageScope ¶
---------------------------------- CHAT MANAGEMENT --------------------------------
Types ¶
type ChatManager ¶
type ChatManager struct { }
func (ChatManager) CreateGroup ¶
func (ChatManager) DropData ¶
func (obj ChatManager) DropData(db *gorm.DB)
func (ChatManager) GetByUsernames ¶
func (ChatManager) GetMessagesCount ¶
func (ChatManager) GetSingleUserChat ¶
func (ChatManager) GetSingleUserChatFullDetails ¶
func (ChatManager) GetUserChats ¶
func (ChatManager) GetUserGroup ¶
func (ChatManager) UpdateGroup ¶
func (obj ChatManager) UpdateGroup(db *gorm.DB, chat *models.Chat, data schemas.GroupChatInputSchema) (*models.Chat, *utils.ErrorResponse)
func (ChatManager) UserIsMember ¶
func (ChatManager) UsernamesToAddAndRemoveValidations ¶
type CommentManager ¶
type CommentManager struct { }
---------------------------------- COMMENT MANAGEMENT --------------------------------
func (CommentManager) DropData ¶
func (obj CommentManager) DropData(db *gorm.DB)
func (CommentManager) GetByPostID ¶
type FriendManager ¶
type FriendManager struct { }
---------------------------------- FRIEND MANAGEMENT --------------------------------
func (FriendManager) DropData ¶
func (obj FriendManager) DropData(db *gorm.DB)
func (FriendManager) GetFriendRequests ¶
func (FriendManager) GetFriends ¶
func (FriendManager) GetRequesteeAndFriendObj ¶
func (obj FriendManager) GetRequesteeAndFriendObj(db *gorm.DB, user *models.User, username string, statusOpts ...choices.FriendStatusChoice) (*models.User, *models.Friend, *utils.ErrorResponse)
type MessageManager ¶
type MessageManager struct { }
func (MessageManager) DropData ¶
func (obj MessageManager) DropData(db *gorm.DB)
func (MessageManager) GetUserMessage ¶
type NotificationManager ¶
type NotificationManager struct { }
---------------------------------- NOTIFICATION MANAGEMENT --------------------------------
func (NotificationManager) DropData ¶
func (obj NotificationManager) DropData(db *gorm.DB)
func (NotificationManager) Get ¶
func (obj NotificationManager) Get(db *gorm.DB, sender *models.User, ntype choices.NotificationChoice, post *models.Post, comment *models.Comment, reply *models.Reply) *models.Notification
func (NotificationManager) GetOrCreate ¶
func (NotificationManager) GetQueryset ¶
func (obj NotificationManager) GetQueryset(db *gorm.DB, userID uuid.UUID) []models.Notification
func (NotificationManager) IsAmongReceivers ¶
func (NotificationManager) MarkAsRead ¶
func (obj NotificationManager) MarkAsRead(db *gorm.DB, user *models.User)
type PostManager ¶
type PostManager struct { }
---------------------------------- POST MANAGEMENT --------------------------------
func (PostManager) Create ¶
func (obj PostManager) Create(db *gorm.DB, author models.User, postData schemas.PostInputSchema) models.Post
func (PostManager) DropData ¶
func (obj PostManager) DropData(db *gorm.DB)
type ReactionManager ¶
type ReactionManager struct { }
func (ReactionManager) DropData ¶
func (obj ReactionManager) DropData(db *gorm.DB)
func (ReactionManager) GetByID ¶
func (obj ReactionManager) GetByID(db *gorm.DB, id *uuid.UUID) (*models.Reaction, *int, *utils.ErrorResponse)
func (ReactionManager) GetReactionsQueryset ¶
func (obj ReactionManager) GetReactionsQueryset(db *gorm.DB, fiberCtx *fiber.Ctx, focus choices.FocusTypeChoice, slug string) ([]models.Reaction, *int, *utils.ErrorResponse)
func (ReactionManager) UpdateOrCreate ¶
func (obj ReactionManager) UpdateOrCreate(db *gorm.DB, user models.User, focus choices.FocusTypeChoice, slug string, rtype choices.ReactionChoice) (*models.Reaction, *models.User, *int, *utils.ErrorResponse)
type ReplyManager ¶
type ReplyManager struct { }
---------------------------------- REPLY MANAGEMENT --------------------------------
func (ReplyManager) DropData ¶
func (obj ReplyManager) DropData(db *gorm.DB)
Click to show internal directories.
Click to hide internal directories.