Documentation ¶
Index ¶
- func CreateNote(c *fiber.Ctx) error
- func CreateUser(c *fiber.Ctx) error
- func DeleteNote(c *fiber.Ctx) error
- func DeleteUser(c *fiber.Ctx) error
- func GetNote(c *fiber.Ctx) error
- func GetNotes(c *fiber.Ctx) error
- func SignIn(c *fiber.Ctx) error
- func SignOut(c *fiber.Ctx) error
- func UpdateEmail(c *fiber.Ctx) error
- func UpdateNote(c *fiber.Ctx) error
- func UpdatePassword(c *fiber.Ctx) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateNote ¶
func CreateNote(c *fiber.Ctx) error
CreateNote creates a new note @Summary Create a new note @Description Create a new note with the given title and content @Tags Notes @Accept json @Produce json @Param request body createNoteRequest true "Note Information" @Success 200 {object} map[string]interface{} @Failure 400 {object} map[string]interface{} @Router /note [post]
func CreateUser ¶
func CreateUser(c *fiber.Ctx) error
CreateUser creates a new user @Summary Create a new user @Description Create a new user with the given username, email, and password @Tags Users @Accept json @Produce json @Param request body createUserRequest true "User Information" @Success 200 {object} map[string]interface{} @Failure 400 {object} map[string]interface{} @Router /signup [post]
func DeleteNote ¶
func DeleteNote(c *fiber.Ctx) error
DeleteNote deletes a note of the user @Summary Delete a note @Description Delete a note of the user with the given id @Tags Notes @Accept json @Produce json @Param id query string true "Note ID" @Param request body deleteNoteRequest true "Note Information" @Success 200 {object} map[string]interface{} @Failure 400 {object} map[string]interface{} @Router /note/:id [delete]
func DeleteUser ¶
func DeleteUser(c *fiber.Ctx) error
DeleteUser deletes a user @Summary Delete a user @Description Delete the currently logged-in user @Tags Users @Accept json @Produce json @Security ApiKeyAuth @Success 200 {object} map[string]interface{} @Failure 400 {object} map[string]interface{} @Router /user [delete]
func GetNote ¶
func GetNote(c *fiber.Ctx) error
GetNote returns a note of the user @Summary Get a note @Description Get a note of the user with the given id @Tags Notes @Accept json @Produce json @Param id query string true "Note ID" @Param session_id header string true "Session ID" @Success 200 {object} map[string]interface{} @Failure 400 {object} map[string]interface{} @Router /note/:id [get]
func GetNotes ¶
func GetNotes(c *fiber.Ctx) error
GetNotes returns all notes of the user @Summary Get all notes @Description Get all notes of the user @Tags Notes @Accept json @Produce json @Param session_id header string true "Session ID" @Success 200 {object} map[string]interface{} @Failure 400 {object} map[string]interface{} @Router /notes [get]
func SignIn ¶
func SignIn(c *fiber.Ctx) error
SignIn signs in a user @Summary Sign in a user @Description Sign in a user with the given username/email and password @Tags Users @Accept json @Produce json @Param request body signInRequest true "User Login Information" @Success 200 {object} map[string]interface{} @Failure 400 {object} map[string]interface{} @Router /login [post]
func SignOut ¶
func SignOut(c *fiber.Ctx) error
SignOut signs out a user @Summary Sign out a user @Description Sign out the currently logged-in user @Tags Users @Accept json @Produce json @Param request body signOutRequest true "User Logout Information" @Success 200 {object} map[string]interface{} @Failure 400 {object} map[string]interface{} @Router /logout [post]
func UpdateEmail ¶
func UpdateEmail(c *fiber.Ctx) error
UpdateEmail updates the email of a user @Summary Update the email of a user @Description Update the email of the currently logged-in user @Tags Users @Accept json @Produce json @Param request body updateEmailRequest true "User Email Information" @Security ApiKeyAuth @Success 200 {object} map[string]interface{} @Failure 400 {object} map[string]interface{} @Router /user/email [put]
func UpdateNote ¶
func UpdateNote(c *fiber.Ctx) error
UpdateNote updates a note of the user @Summary Update a note @Description Update a note of the user with the given id @Tags Notes @Accept json @Produce json @Param id query string true "Note ID" @Param request body updateNoteRequest true "Note Information" @Success 200 {object} map[string]interface{} @Failure 400 {object} map[string]interface{} @Router /note/:id [put]
func UpdatePassword ¶
func UpdatePassword(c *fiber.Ctx) error
UpdatePassword updates the password of a user @Summary Update the password of a user @Description Update the password of the currently logged-in user @Tags Users @Accept json @Produce json @Param request body updatePasswordRequest true "User Password Information" @Security ApiKeyAuth @Success 200 {object} map[string]interface{} @Failure 400 {object} map[string]interface{} @Router /user/password [put]
Types ¶
This section is empty.