controllers

package
v0.0.0-...-97e751c Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateNewNote

func CreateNewNote(c *gin.Context)

CreateNewNote godoc @Summary Create Note @Description creates a new note @Tags notes @Accept json @Produce json @Param req body models.NoteRequest true "Note Request" @Success 200 {object} models.Response @Failure 400 {object} models.Response @Router /notes [post] @Security ApiKeyAuth

func DeleteNote

func DeleteNote(c *gin.Context)

DeleteNote godoc @Summary Delete a note @Description deletes note by id @Tags notes @Accept json @Produce json @Param id path string true "Note ID" @Success 200 {object} models.Response @Failure 400 {object} models.Response @Router /notes/{id} [delete] @Security ApiKeyAuth

func GetNotes

func GetNotes(c *gin.Context)

GetNotes godoc @Summary Get Notes @Description gets user notes with pagination @Tags notes @Accept json @Produce json @Param page query string false "Switch page by 'page'" @Success 200 {object} models.Response @Failure 400 {object} models.Response @Router /notes [get] @Security ApiKeyAuth

func GetOneNote

func GetOneNote(c *gin.Context)

GetOneNote godoc @Summary Get a note @Description get note by id @Tags notes @Accept json @Produce json @Param id path string true "Note ID" @Success 200 {object} models.Response @Failure 400 {object} models.Response @Router /notes/{id} [get] @Security ApiKeyAuth

func Login

func Login(c *gin.Context)

Login godoc @Summary Login @Description login a user @Tags auth @Accept json @Produce json @Param req body models.LoginRequest true "Login Request" @Success 200 {object} models.Response @Failure 400 {object} models.Response @Router /auth/login [post]

func Ping

func Ping(c *gin.Context)

Ping godoc @Summary Ping @Description check server @Tags ping @Accept json @Produce json @Success 200 {object} models.Response @Router /ping [get]

func Refresh

func Refresh(c *gin.Context)

Refresh godoc @Summary Refresh @Description refreshes a user token @Tags auth @Accept json @Produce json @Param req body models.RefreshRequest true "Refresh Request" @Success 200 {object} models.Response @Failure 400 {object} models.Response @Router /auth/refresh [post]

func Register

func Register(c *gin.Context)

Register godoc @Summary Register @Description registers a user @Tags auth @Accept json @Produce json @Param req body models.RegisterRequest true "Register Request" @Success 200 {object} models.Response @Failure 400 {object} models.Response @Router /auth/register [post]

func UpdateNote

func UpdateNote(c *gin.Context)

UpdateNote godoc @Summary Update a note @Description updates a note by id @Tags notes @Accept json @Produce json @Param id path string true "Note ID" @Param req body models.NoteRequest true "Note Request" @Success 200 {object} models.Response @Failure 400 {object} models.Response @Router /notes/{id} [put] @Security ApiKeyAuth

Types

This section is empty.

Jump to

Keyboard shortcuts

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