api

package
v0.9.6 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2022 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAllJSON

func GetAllJSON(s service.Service) func(*fiber.Ctx) error

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

func GetCommentsJSON(s service.Service) func(*fiber.Ctx) error

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

func GetMessageJSON(s service.Service) func(*fiber.Ctx) error

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

func GetMessagesFromAuthorJSON(s service.Service) func(*fiber.Ctx) error

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

func GetMessagesJSON(s service.Service) func(*fiber.Ctx) error

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

func NewMessage(s service.Service) func(*fiber.Ctx) error

NewMessage godoc @Summary Post a new message @Description Post a new message @Produce json @Param message body model.Message true "Message" @Router /message [post]

func SetupApiRoutes

func SetupApiRoutes(s service.Service, app *fiber.App)

Types

This section is empty.

Jump to

Keyboard shortcuts

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