Documentation ¶
Index ¶
- func CreateComment(c *fiber.Ctx) error
- func CreatePost(c *fiber.Ctx) error
- func CreateUser(c *fiber.Ctx) error
- func DeleteComment(c *fiber.Ctx) error
- func DeletePost(c *fiber.Ctx) error
- func DeleteUser(c *fiber.Ctx) error
- func GetComment(c *fiber.Ctx) error
- func GetCommentByUsername(username string, postNumber int) (*models.Comment, error)
- func GetPost(c *fiber.Ctx) error
- func GetPostByUsername(username string, postNumber int) (*models.Post, error)
- func GetUser(c *fiber.Ctx) error
- func GetUserByUsername(username string) (*models.User, error)
- func GetUserFriends(username string) ([]string, error)
- func GetUserPosts(ctx context.Context, username string) ([]models.Post, error)
- func LikeComment(c *fiber.Ctx) error
- func LikePost(c *fiber.Ctx) error
- func LikeReport(c *fiber.Ctx) error
- func ListAllPosts(c *fiber.Ctx) error
- func ListComments(c *fiber.Ctx) error
- func ListUserPosts(c *fiber.Ctx) error
- func ListUsers(c *fiber.Ctx) error
- func PostReport(c *fiber.Ctx) error
- func UpdateComment(c *fiber.Ctx) error
- func UpdatePost(c *fiber.Ctx) error
- func UpdateUser(c *fiber.Ctx) error
- func UserCommentReport(c *fiber.Ctx) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateComment ¶
func CreateComment(c *fiber.Ctx) error
CreateComment inserts a new comment into the database for a specific post
func CreatePost ¶
func CreatePost(c *fiber.Ctx) error
CreatePost inserts a new post into the database
func CreateUser ¶
func CreateUser(c *fiber.Ctx) error
CreateUser inserts a new user into the database
func DeleteComment ¶
func DeleteComment(c *fiber.Ctx) error
DeleteComment deletes a comment from the database by username and post number
func DeletePost ¶
func DeletePost(c *fiber.Ctx) error
DeletePost deletes a post from the database by username and post number
func DeleteUser ¶
func DeleteUser(c *fiber.Ctx) error
DeleteUser deletes a user from the database by username
func GetComment ¶
func GetComment(c *fiber.Ctx) error
GetComment retrieves a comment from the database for a specific post by username and post number
func GetCommentByUsername ¶
func GetPost ¶
func GetPost(c *fiber.Ctx) error
GetPost retrieves a post from the database by username and post number
func GetPostByUsername ¶
GetPostbyUsername retrieves a post by username and postNumber, first checking Redis cache, then the database
func GetUser ¶
func GetUser(c *fiber.Ctx) error
GetUser retrieves a user from the database by username
func GetUserByUsername ¶
GetUserByUsername retrieves a user by username, first checking Redis cache, then the database
func GetUserFriends ¶
func LikeComment ¶
func LikeComment(c *fiber.Ctx) error
func LikeReport ¶
func LikeReport(c *fiber.Ctx) error
LikeReport retrieves a report on likes given or received by a user
func ListAllPosts ¶
func ListAllPosts(c *fiber.Ctx) error
ListPosts retrieves all posts from the database
func ListComments ¶
func ListComments(c *fiber.Ctx) error
ListComments retrieves all comments for a post by username and post number
func ListUserPosts ¶
func ListUserPosts(c *fiber.Ctx) error
ListUserPosts retrieves all posts of a single user from the database by username
func PostReport ¶
func PostReport(c *fiber.Ctx) error
PostReport retrieves a report of all posts created by a given user
func UpdateComment ¶
func UpdateComment(c *fiber.Ctx) error
UpdateComment updates a comment in the database by username and post number
func UpdatePost ¶
func UpdatePost(c *fiber.Ctx) error
UpdatePost updates a post in the database by username and post number
func UpdateUser ¶
func UpdateUser(c *fiber.Ctx) error
UpdateUser updates a user in the database and Redis cache by username
func UserCommentReport ¶
func UserCommentReport(c *fiber.Ctx) error
UserCommentReport retrieves a report of comments created by user
Types ¶
This section is empty.