Documentation ¶
Index ¶
- Variables
- func UsernameGenerator(db *ent.Client, firstName string, lastName string, userName *string) string
- type ChatManager
- func (obj ChatManager) Create(client *ent.Client, owner *ent.User, ctype chat.Ctype, ...) *ent.Chat
- func (obj ChatManager) CreateGroup(client *ent.Client, owner *ent.User, usersToAdd []*ent.User, ...) *ent.Chat
- func (obj ChatManager) DropData(client *ent.Client)
- func (obj ChatManager) GetByID(client *ent.Client, id uuid.UUID) *ent.Chat
- func (obj ChatManager) GetDMChat(client *ent.Client, userObj *ent.User, recipientUser *ent.User) *ent.Chat
- func (obj ChatManager) GetMessagesCount(client *ent.Client, chatID uuid.UUID) int
- func (obj ChatManager) GetSingleUserChat(client *ent.Client, userObj *ent.User, id uuid.UUID) *ent.Chat
- func (obj ChatManager) GetSingleUserChatFullDetails(client *ent.Client, userObj *ent.User, id uuid.UUID) *ent.Chat
- func (obj ChatManager) GetUserChats(client *ent.Client, userObj *ent.User) []*ent.Chat
- func (obj ChatManager) GetUserGroup(client *ent.Client, userObj *ent.User, id uuid.UUID, detailedOpts ...bool) *ent.Chat
- func (obj ChatManager) UpdateGroup(client *ent.Client, chatObj *ent.Chat, data schemas.GroupChatInputSchema) (*ent.Chat, *utils.ErrorResponse)
- func (obj ChatManager) UserIsMember(chat *ent.Chat, targetUser *ent.User) bool
- func (obj ChatManager) UsernamesToAddAndRemoveValidations(client *ent.Client, chatObj *ent.Chat, chatUpdateQuery *ent.ChatUpdateOne, ...) (*ent.ChatUpdateOne, *utils.ErrorResponse)
- type CityManager
- func (obj CityManager) All(client *ent.Client, name string) []*ent.City
- func (obj CityManager) Create(client *ent.Client, name string, country *ent.Country, region *ent.Region) *ent.City
- func (obj CityManager) DropData(client *ent.Client)
- func (obj CityManager) GetByID(client *ent.Client, cityID uuid.UUID) *ent.City
- type CommentManager
- func (obj CommentManager) Create(client *ent.Client, author *ent.User, postID uuid.UUID, text string) *ent.Comment
- func (obj CommentManager) DropData(client *ent.Client)
- func (obj CommentManager) GetByPostID(client *ent.Client, postID uuid.UUID) []*ent.Comment
- func (obj CommentManager) GetBySlug(client *ent.Client, slug string, opts ...bool) (*ent.Comment, *int, *utils.ErrorResponse)
- func (obj CommentManager) Update(comment *ent.Comment, author *ent.User, text string) *ent.Comment
- type CountryManager
- type FileManager
- func (obj FileManager) Create(client *ent.Client, fileType string) *ent.File
- func (obj FileManager) GetByID(client *ent.Client, id uuid.UUID) *ent.File
- func (obj FileManager) Update(client *ent.Client, file *ent.File, resourceType string) *ent.File
- func (obj FileManager) UpdateOrCreate(client *ent.Client, fileObj *ent.File, resourceType string) *ent.File
- type FriendManager
- func (obj FriendManager) Create(client *ent.Client, requester *ent.User, requestee *ent.User, ...) *ent.Friend
- func (obj FriendManager) DropData(client *ent.Client)
- func (obj FriendManager) GetFriendRequests(client *ent.Client, userObj *ent.User) []*ent.User
- func (obj FriendManager) GetFriends(client *ent.Client, userObj *ent.User) []*ent.User
- func (obj FriendManager) GetRequesteeAndFriendObj(client *ent.Client, userObj *ent.User, username string, statusOpts ...string) (*ent.User, *ent.Friend, *utils.ErrorResponse)
- type MessageManager
- func (obj MessageManager) Create(client *ent.Client, sender *ent.User, chat *ent.Chat, text *string, ...) *ent.Message
- func (obj MessageManager) DropData(client *ent.Client)
- func (obj MessageManager) GetByID(client *ent.Client, id uuid.UUID) *ent.Message
- func (obj MessageManager) GetUserMessage(client *ent.Client, userObj *ent.User, id uuid.UUID) *ent.Message
- func (obj MessageManager) Update(client *ent.Client, message *ent.Message, text *string, fileType *string) *ent.Message
- type NotificationManager
- func (obj NotificationManager) Create(client *ent.Client, sender *ent.User, ntype notification.Ntype, ...) *ent.Notification
- func (obj NotificationManager) DropData(client *ent.Client)
- func (obj NotificationManager) Get(client *ent.Client, sender *ent.User, ntype notification.Ntype, post *ent.Post, ...) *ent.Notification
- func (obj NotificationManager) GetOrCreate(client *ent.Client, sender *ent.User, ntype notification.Ntype, ...) (*ent.Notification, bool)
- func (obj NotificationManager) GetQueryset(client *ent.Client, userID uuid.UUID) []*ent.Notification
- func (obj NotificationManager) IsAmongReceivers(client *ent.Client, notificationID uuid.UUID, receiverID uuid.UUID) bool
- func (obj NotificationManager) MarkAsRead(client *ent.Client, userID uuid.UUID)
- func (obj NotificationManager) ReadOne(client *ent.Client, userID uuid.UUID, notificationID uuid.UUID) *utils.ErrorResponse
- type OtpManager
- type PostManager
- func (obj PostManager) All(client *ent.Client) []*ent.Post
- func (obj PostManager) Create(client *ent.Client, author *ent.User, postData schemas.PostInputSchema) *ent.Post
- func (obj PostManager) DropData(client *ent.Client)
- func (obj PostManager) GetBySlug(client *ent.Client, slug string, opts ...bool) (*ent.Post, *int, *utils.ErrorResponse)
- func (obj PostManager) Update(client *ent.Client, post *ent.Post, postData schemas.PostInputSchema) *ent.Post
- type ReactionManager
- func (obj ReactionManager) Create(client *ent.Client, userID uuid.UUID, focus string, focusID uuid.UUID, ...) *ent.Reaction
- func (obj ReactionManager) DropData(client *ent.Client)
- func (obj ReactionManager) GetByID(client *ent.Client, id uuid.UUID) (*ent.Reaction, *int, *utils.ErrorResponse)
- func (obj ReactionManager) GetReactionsQueryset(client *ent.Client, fiberCtx *fiber.Ctx, focus string, slug string) ([]*ent.Reaction, *int, *utils.ErrorResponse)
- func (obj ReactionManager) Update(reaction *ent.Reaction, focus string, id uuid.UUID, rtype reaction.Rtype) *ent.Reaction
- func (obj ReactionManager) UpdateOrCreate(client *ent.Client, user *ent.User, focus string, slug string, ...) (*ent.Reaction, *ent.User, *int, *utils.ErrorResponse)
- type RegionManager
- type ReplyManager
- func (obj ReplyManager) Create(client *ent.Client, author *ent.User, commentID uuid.UUID, text string) *ent.Reply
- func (obj ReplyManager) DropData(client *ent.Client)
- func (obj ReplyManager) GetBySlug(client *ent.Client, slug string, opts ...bool) (*ent.Reply, *int, *utils.ErrorResponse)
- func (obj ReplyManager) Update(reply *ent.Reply, author *ent.User, text string) *ent.Reply
- type SiteDetailManager
- type UserManager
- func (obj UserManager) Create(client *ent.Client, userData schemas.RegisterUser, isStaff bool, ...) *ent.User
- func (obj UserManager) DropData(client *ent.Client)
- func (obj UserManager) GetByEmail(client *ent.Client, email string) *ent.User
- func (obj UserManager) GetById(client *ent.Client, id uuid.UUID) *ent.User
- func (obj UserManager) GetByRefreshToken(client *ent.Client, token string) *ent.User
- func (obj UserManager) GetByUsername(client *ent.Client, username string) *ent.User
- func (obj UserManager) GetByUsernames(client *ent.Client, usernames []string, excludeOpts ...uuid.UUID) []*ent.User
- func (obj UserManager) GetOrCreate(client *ent.Client, userData schemas.RegisterUser, isEmailVerified bool, ...) *ent.User
- func (obj UserManager) UpdateTokens(user *ent.User, access string, refresh string) *ent.User
- type UserProfileManager
- func (obj UserProfileManager) GetByUsername(client *ent.Client, username string) (*ent.User, *utils.ErrorResponse)
- func (obj UserProfileManager) GetUsers(client *ent.Client, userObj *ent.User) []*ent.User
- func (obj UserProfileManager) Update(client *ent.Client, profile *ent.User, profileData schemas.ProfileUpdateSchema) *ent.User
Constants ¶
This section is empty.
Variables ¶
var Ctx = context.Background()
Functions ¶
Types ¶
type ChatManager ¶
type ChatManager struct { }
---------------------------------- CHAT MANAGEMENT --------------------------------
func (ChatManager) CreateGroup ¶
func (ChatManager) DropData ¶
func (obj ChatManager) DropData(client *ent.Client)
func (ChatManager) GetMessagesCount ¶
func (ChatManager) GetSingleUserChat ¶
func (ChatManager) GetSingleUserChatFullDetails ¶
func (ChatManager) GetUserChats ¶
func (ChatManager) GetUserGroup ¶
func (ChatManager) UpdateGroup ¶
func (obj ChatManager) UpdateGroup(client *ent.Client, chatObj *ent.Chat, data schemas.GroupChatInputSchema) (*ent.Chat, *utils.ErrorResponse)
func (ChatManager) UserIsMember ¶
func (ChatManager) UsernamesToAddAndRemoveValidations ¶
func (obj ChatManager) UsernamesToAddAndRemoveValidations(client *ent.Client, chatObj *ent.Chat, chatUpdateQuery *ent.ChatUpdateOne, usernamesToAdd *[]string, usernamesToRemove *[]string) (*ent.ChatUpdateOne, *utils.ErrorResponse)
type CityManager ¶
type CityManager struct { }
---------------------------------- CITY MANAGEMENT --------------------------------
func (CityManager) DropData ¶
func (obj CityManager) DropData(client *ent.Client)
type CommentManager ¶
type CommentManager struct { }
---------------------------------- COMMENT MANAGEMENT --------------------------------
func (CommentManager) DropData ¶
func (obj CommentManager) DropData(client *ent.Client)
func (CommentManager) GetByPostID ¶
type CountryManager ¶
type CountryManager struct { }
---------------------------------- COUNTRY MANAGEMENT --------------------------------
type FileManager ¶
type FileManager struct { }
func (FileManager) UpdateOrCreate ¶
type FriendManager ¶
type FriendManager struct { }
---------------------------------- FRIEND MANAGEMENT --------------------------------
func (FriendManager) DropData ¶
func (obj FriendManager) DropData(client *ent.Client)
func (FriendManager) GetFriendRequests ¶
func (FriendManager) GetFriends ¶
func (FriendManager) GetRequesteeAndFriendObj ¶
type MessageManager ¶
type MessageManager struct { }
---------------------------------- MESSAGE MANAGEMENT --------------------------------
func (MessageManager) DropData ¶
func (obj MessageManager) DropData(client *ent.Client)
func (MessageManager) GetUserMessage ¶
type NotificationManager ¶
type NotificationManager struct { }
---------------------------------- NOTIFICATION MANAGEMENT --------------------------------
func (NotificationManager) DropData ¶
func (obj NotificationManager) DropData(client *ent.Client)
func (NotificationManager) Get ¶
func (obj NotificationManager) Get(client *ent.Client, sender *ent.User, ntype notification.Ntype, post *ent.Post, comment *ent.Comment, reply *ent.Reply) *ent.Notification
func (NotificationManager) GetOrCreate ¶
func (NotificationManager) GetQueryset ¶
func (obj NotificationManager) GetQueryset(client *ent.Client, userID uuid.UUID) []*ent.Notification
func (NotificationManager) IsAmongReceivers ¶
func (NotificationManager) MarkAsRead ¶
func (obj NotificationManager) MarkAsRead(client *ent.Client, userID uuid.UUID)
type OtpManager ¶
type OtpManager struct { }
---------------------------------- OTP MANAGEMENT --------------------------------
func (OtpManager) CheckExpiration ¶
func (obj OtpManager) CheckExpiration(otpObj *ent.Otp) bool
func (OtpManager) GetByUserID ¶
func (OtpManager) GetOrCreate ¶
type PostManager ¶
type PostManager struct { }
---------------------------------- POST MANAGEMENT --------------------------------
func (PostManager) Create ¶
func (obj PostManager) Create(client *ent.Client, author *ent.User, postData schemas.PostInputSchema) *ent.Post
func (PostManager) DropData ¶
func (obj PostManager) DropData(client *ent.Client)
type ReactionManager ¶
type ReactionManager struct { }
---------------------------------- REACTIONS MANAGEMENT --------------------------------
func (ReactionManager) DropData ¶
func (obj ReactionManager) DropData(client *ent.Client)
func (ReactionManager) GetByID ¶
func (obj ReactionManager) GetByID(client *ent.Client, id uuid.UUID) (*ent.Reaction, *int, *utils.ErrorResponse)
func (ReactionManager) GetReactionsQueryset ¶
func (obj ReactionManager) GetReactionsQueryset(client *ent.Client, fiberCtx *fiber.Ctx, focus string, slug string) ([]*ent.Reaction, *int, *utils.ErrorResponse)
type RegionManager ¶
type RegionManager struct { }
---------------------------------- REGION MANAGEMENT --------------------------------
type ReplyManager ¶
type ReplyManager struct { }
---------------------------------- REPLY MANAGEMENT --------------------------------
func (ReplyManager) DropData ¶
func (obj ReplyManager) DropData(client *ent.Client)
type SiteDetailManager ¶
type SiteDetailManager struct { }
func (SiteDetailManager) Create ¶
func (obj SiteDetailManager) Create(client *ent.Client) *ent.SiteDetail
func (SiteDetailManager) Get ¶
func (obj SiteDetailManager) Get(client *ent.Client) *ent.SiteDetail
func (SiteDetailManager) GetOrCreate ¶
func (obj SiteDetailManager) GetOrCreate(client *ent.Client) *ent.SiteDetail
type UserManager ¶
type UserManager struct { }
---------------------------------- OTP MANAGEMENT --------------------------------
func (UserManager) Create ¶
func (obj UserManager) Create(client *ent.Client, userData schemas.RegisterUser, isStaff bool, isEmailVerified bool) *ent.User
func (UserManager) DropData ¶
func (obj UserManager) DropData(client *ent.Client)
func (UserManager) GetByEmail ¶
func (UserManager) GetByRefreshToken ¶
func (UserManager) GetByUsername ¶
func (UserManager) GetByUsernames ¶
func (UserManager) GetOrCreate ¶
func (obj UserManager) GetOrCreate(client *ent.Client, userData schemas.RegisterUser, isEmailVerified bool, isStaff bool) *ent.User
func (UserManager) UpdateTokens ¶
type UserProfileManager ¶
type UserProfileManager struct { }
---------------------------------- USER PROFILE MANAGEMENT --------------------------------
func (UserProfileManager) GetByUsername ¶
func (obj UserProfileManager) GetByUsername(client *ent.Client, username string) (*ent.User, *utils.ErrorResponse)