Documentation ¶
Index ¶
- Variables
- func ChatDelete(id uint64) error
- func ChatList(eager bool) ([]*models.Chat, error)
- func ChatListByUserID(userID uint64) ([]*models.Chat, error)
- func ChatMessages(id uint64) ([]*models.Message, error)
- func ChatParticipants(id uint64) ([]*models.User, error)
- func ChatPatch(chat *models.Chat) error
- func ChatRead(id uint64, eager bool) (models.Chat, error)
- func ChatUpsert(chat *models.Chat) error
- func CommentDelete(id uint64) error
- func CommentList() ([]models.ReadCommentDTO, error)
- func CommentListByPostID(postID uint64) ([]models.ReadCommentDTO, error)
- func CommentListByUserID(userID uint64) ([]models.ReadCommentDTO, error)
- func CommentPatch(c *models.Comment) error
- func CommentRead(id uint64) (models.ReadCommentDTO, error)
- func CommentUpsert(c *models.Comment) error
- func Connect() *gorm.DB
- func Disconnect()
- func FullCommentList() ([]*models.Comment, error)
- func FullCommentListByPostID(postID uint64) ([]*models.Comment, error)
- func FullCommentListByUserID(userID uint64) ([]*models.Comment, error)
- func FullCommentRead(id uint64) (models.Comment, error)
- func FullMessageList() ([]*models.Message, error)
- func FullMessageListByChatID(chatID uint64) ([]*models.Message, error)
- func FullMessageListByChatIDAndUserID(chatID uint64, userID uint64) ([]*models.Message, error)
- func FullMessageListByUserID(userID uint64) ([]*models.Message, error)
- func FullMessageRead(id uint64) (models.Message, error)
- func FullPostList() ([]*models.Post, error)
- func FullPostListByUserID(userID uint64) ([]*models.Post, error)
- func FullPostRead(id uint64) (models.Post, error)
- func FullUserFindByEmail(email string) ([]models.User, error)
- func FullUserList() ([]*models.User, error)
- func FullUserRead(id uint64) (models.User, error)
- func MessageDelete(id uint64) error
- func MessageList() ([]models.ReadMessageDTO, error)
- func MessageListByChatID(chatID uint64) ([]models.ReadMessageDTO, error)
- func MessageListByChatIDAndUserID(chatID uint64, userID uint64) ([]models.ReadMessageDTO, error)
- func MessageListByUserID(userID uint64) ([]models.ReadMessageDTO, error)
- func MessagePatch(m *models.Message) error
- func MessageRead(id uint64) (models.ReadMessageDTO, error)
- func MessageUpsert(m *models.Message) error
- func PostComments(id uint64) ([]*models.Comment, error)
- func PostDelete(id uint64) error
- func PostList() ([]models.ReadPostDTO, error)
- func PostListByUserID(userID uint64) ([]models.ReadPostDTO, error)
- func PostPatch(post *models.Post) error
- func PostRead(id uint64) (models.ReadPostDTO, error)
- func PostUpsert(post *models.Post) error
- func RedisConnect() *redis.Client
- func RedisDisconnect()
- func RedisGet(key string) (string, error)
- func RedisPing() (string, error)
- func RedisSet(key string, value interface{}) error
- func Reset()
- func Seed()
- func UserDelete(id uint64) error
- func UserFindByEmail(email string) ([]models.ReadUserDTO, error)
- func UserList() ([]models.ReadUserDTO, error)
- func UserPatch(u *models.User) error
- func UserRead(id uint64) (models.ReadUserDTO, error)
- func UserUpsert(u *models.User) error
Constants ¶
This section is empty.
Variables ¶
var DBClient *gorm.DB
Functions ¶
func ChatListByUserID ¶
Gets the data of the chats with the provided user id
func ChatMessages ¶
Get the messages of the chat with the provided id
func ChatParticipants ¶
Get the participants of the chat with the provided id
func ChatUpsert ¶
Updater or creates a chat if the id provided within the chat is found or not, respectively
func CommentList ¶
func CommentList() ([]models.ReadCommentDTO, error)
Gets the data of all the comments
func CommentListByPostID ¶
func CommentListByPostID(postID uint64) ([]models.ReadCommentDTO, error)
Gets the data of the comments with the provided post id
func CommentListByUserID ¶
func CommentListByUserID(userID uint64) ([]models.ReadCommentDTO, error)
Gets the data of the comments with the provided user id
func CommentPatch ¶
Patch update the comment with the provided id
func CommentRead ¶
func CommentRead(id uint64) (models.ReadCommentDTO, error)
Gets the data of the comment with the provided id
func CommentUpsert ¶
Updates or creates a comment if the id provided within the comment is found or not, respectively
func Disconnect ¶
func Disconnect()
func FullCommentList ¶
func FullCommentListByPostID ¶
func FullCommentListByUserID ¶
func FullMessageList ¶
func FullMessageListByChatID ¶
func FullMessageListByUserID ¶
func FullPostList ¶
func FullUserList ¶
func MessageList ¶
func MessageList() ([]models.ReadMessageDTO, error)
Gets the data of all the messages
func MessageListByChatID ¶
func MessageListByChatID(chatID uint64) ([]models.ReadMessageDTO, error)
Gets the data of the messages with the provided chat id
func MessageListByChatIDAndUserID ¶
func MessageListByChatIDAndUserID(chatID uint64, userID uint64) ([]models.ReadMessageDTO, error)
Gets the data of the messages with the provided chat id and user id
func MessageListByUserID ¶
func MessageListByUserID(userID uint64) ([]models.ReadMessageDTO, error)
Gets the data of the messages with the provided user id
func MessagePatch ¶
Patch update the message with the provided id
func MessageRead ¶
func MessageRead(id uint64) (models.ReadMessageDTO, error)
Gets the data of the message with the provided id
func MessageUpsert ¶
Updater or creates a message if the id provided within the message is found or not, respectively
func PostComments ¶
Gets the comments of the post with the provided id
func PostListByUserID ¶
func PostListByUserID(userID uint64) ([]models.ReadPostDTO, error)
Gets the data of the posts with the provided user id
func PostRead ¶
func PostRead(id uint64) (models.ReadPostDTO, error)
Gets the data of the post with the provided id
func PostUpsert ¶
Updater or creates a post if the id provided within the post is found or not, respectively
func UserFindByEmail ¶
func UserFindByEmail(email string) ([]models.ReadUserDTO, error)
Gets the data of the user with the provided email
func UserRead ¶
func UserRead(id uint64) (models.ReadUserDTO, error)
Gets the data of the user with the provided id
func UserUpsert ¶
Updates or creates a user if the id provided within the user is found or not, respectively
Types ¶
This section is empty.