posts

package
v0.0.0-...-41d384d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 22, 2024 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreatePost

func CreatePost(c *fiber.Ctx) error

func DeletePost

func DeletePost(c *fiber.Ctx) error

func GetPost

func GetPost(c *fiber.Ctx) error

func GetPostComments

func GetPostComments(c *fiber.Ctx) error

func GetPosts

func GetPosts(c *fiber.Ctx) error

func UpdatePost

func UpdatePost(c *fiber.Ctx) error

Types

type CommentsResponse

type CommentsResponse struct {
	Message  string                          `json:"message"`
	Comments []models.CommentResponseContent `json:"comments"`
}

type NewPostBody

type NewPostBody struct {
	Content string `json:"content" validate:"required,min=1,max=2000"`
}

type PostsResponse

type PostsResponse struct {
	Message string                       `json:"message"`
	Posts   []models.PostResponseContent `json:"posts"`
}

type UpdatePostBody

type UpdatePostBody struct {
	Content string `json:"content" validate:"omitempty,max=2000"`
	Like    *bool  `json:"like" validate:"omitempty"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL