Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreatePostForUser ¶
func CreatePostForUser(c *fiber.Ctx) error
@Summery Create new post @Description Create new post with title and description @Tags Post @Accept json @Produce json @Param body body dto.CreatePost true "query params" @Param Authorization header string true "bearer access token" @Success 200 {object} response.CreatePost @Failure 400 {object} response.BaseError @Failure 401 {object} response.UnauthorizedError @Failure 422 {object} response.ValidationError @Router /api/posts [post]
func GetAppHealthStatus ¶
func GetAppHealthStatus(c *fiber.Ctx) error
func GetUserInfo ¶
func GetUserInfo(c *fiber.Ctx) error
@Summery Get user info @Description Get user all information @Tags Auth @Accept json @Produce json @Param Authorization header string true "bearer access token" @Success 200 {object} response.GetUserInfo @Failure 401 {object} response.UnauthorizedError @Router /api/user/me [get]
func GetUserPosts ¶
func GetUserPosts(c *fiber.Ctx) error
@Summery Get user's posts @Description Get all user's posts @Tags Post @Accept json @Produce json @Param Authorization header string true "bearer access token" @Success 200 {object} response.GetUserPosts @Failure 401 {object} response.UnauthorizedError @Router /api/posts/me [post]
func LoginUser ¶
func LoginUser(c *fiber.Ctx) error
@Summery Login user @Description Login user @Tags Auth @Accept json @Produce json @Param body body dto.UserLogin true "query params" @Success 200 {object} response.LoginUser @Failure 401 {object} response.UnauthorizedError @Failure 400 {object} response.BaseError @Failure 422 {object} response.ValidationError @Router /api/auth/login [post]
func RegisterUser ¶
func RegisterUser(c *fiber.Ctx) error
@Summery Register user @Description Register new user @Tags Auth @Accept json @Produce json @Param body body dto.UserRegister true "query params" @Success 200 {object} response.RegisterUser @Failure 400 {object} response.BaseError @Failure 422 {object} response.ValidationError @Router /api/auth/register [post]
Types ¶
This section is empty.