Documentation ¶
Index ¶
- func GetAllJSON(s service.Service) func(*fiber.Ctx) error
- func GetCommentsJSON(s service.Service) func(*fiber.Ctx) error
- func GetMessageJSON(s service.Service) func(*fiber.Ctx) error
- func GetMessagesFromAuthorJSON(s service.Service) func(*fiber.Ctx) error
- func GetMessagesJSON(s service.Service) func(*fiber.Ctx) error
- func NewMessage(s service.Service) func(*fiber.Ctx) error
- func PayloadToValidMessage(s service.Service, payload model.Message) (model.Message, int, error)
- func SetupApiRoutes(s service.Service, app *fiber.App)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetAllJSON ¶
GetAllJSON godoc @Id all @Summary Show all messages (original messages and comments) without any more structure @Description get string by ID @Produce application/json @Success 200 {array} model.Message @Router /all [get]
func GetCommentsJSON ¶
GetCommentsJSON godoc @Summary Show comments to a specific message @Description get string by ID @Produce application/json @Param uuid path string true "UUID of original message corresponding to comments" @Success 200 {array} model.Message @Router /comments/{uuid} [get]
func GetMessageJSON ¶
GetCommentsJSON godoc @Summary Show a specific message @Description get string by ID @Produce application/json @Param uuid path string true "Message UUID" @Success 200 {object} model.Message @Router /message/{uuid} [get]
func GetMessagesFromAuthorJSON ¶
GetMessagesFromAuthorJSON godoc @Summary Show messages of a specific user @Description get string by ID @Produce application/json @Param pubkey path string true "Author ed25519 public key" @Success 200 {array} model.Message @Router /user/{pubkey} [get]
func GetMessagesJSON ¶
GetMessagesJSON godoc @Id messages @Summary Show all original messages (for the front page) @Description get string by ID @Produce application/json @Success 200 {array} model.Message @Router /message [get]
func NewMessage ¶
NewMessage godoc @Summary Post a new message @Description get string by ID @Produce json @Router /new [post]
func PayloadToValidMessage ¶
func SetupApiRoutes ¶
Types ¶
This section is empty.