Documentation ¶
Index ¶
- func GetFeed(c *fiber.Ctx) error
- func GetNotifications(c *fiber.Ctx) error
- func GetUnreadNotifications(c *fiber.Ctx) error
- func UpdateNotification(c *fiber.Ctx) error
- func UpdateUser(c *fiber.Ctx) error
- func User(c *fiber.Ctx) error
- type Notification
- type NotificationUser
- type PostsResponse
- type UpdateNotificationBody
- type UpdateUserBody
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetNotifications ¶
func GetNotifications(c *fiber.Ctx) error
func GetUnreadNotifications ¶
func GetUnreadNotifications(c *fiber.Ctx) error
func UpdateNotification ¶
func UpdateNotification(c *fiber.Ctx) error
func UpdateUser ¶
func UpdateUser(c *fiber.Ctx) error
Types ¶
type Notification ¶
type Notification struct { ID primitive.ObjectID `json:"id"` CreatedAt primitive.Timestamp `json:"created_at"` TargetUser NotificationUser `json:"target_user"` SourceUser NotificationUser `json:"source_user"` Type string `json:"type"` TypeContent string `json:"type_content"` Read bool `json:"read"` }
type NotificationUser ¶
type PostsResponse ¶
type PostsResponse struct { Message string `json:"message"` Posts []models.PostResponseContent `json:"posts"` }
type UpdateNotificationBody ¶
type UpdateNotificationBody struct {
Read *bool `json:"read" validate:"required"`
}
type UpdateUserBody ¶
type UpdateUserBody struct { Email string `json:"email" validate:"omitempty,email"` DisplayName string `json:"display_name" validate:"omitempty,min=1,max=25"` Username string `json:"username" validate:"omitempty,min=3,max=25,username_valid"` Password string `json:"password" validate:"omitempty,min=8,max=50"` About string `json:"about" validate:"omitempty,max=200"` }
Click to show internal directories.
Click to hide internal directories.