v1

package
v0.0.0-...-51970bc Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteUserProfile

func DeleteUserProfile(c *gin.Context)

DeleteUserProfile godoc @Summary Delete the profile picture a user @Description Delete the profile picture file for the currently authenticated user @ID delete-profile @Tags user-account @Security ApiKeyAuth @param Authorization header string true "Authorization" @Schemes serviceV1.DeleteUserProfileResponse services.ErrorResponse @Produce application/json @Param id path string true "user id" @Success 200 {object} serviceV1.DeleteUserProfileResponse @Failure 400 {object} services.ErrorResponse @Failure 401 {object} services.ErrorResponse @Failure 404 {object} services.ErrorResponse @Failure 500 {object} services.ErrorResponse @Router /profile/:id [delete]

func GetUserProfile

func GetUserProfile(c *gin.Context)

GetUserProfile godoc @Summary Get the profile picture a user @Description Get the profile picture file for the currently authenticated user @ID get-profile @Tags user-account @Security ApiKeyAuth @param Authorization header string true "Authorization" @Schemes serviceV1.GetUserProfileResponse services.ErrorResponse @Produce application/json @Param id path string true "user id" @Success 200 {object} serviceV1.GetUserProfileResponse @Failure 400 {object} services.ErrorResponse @Failure 401 {object} services.ErrorResponse @Failure 404 {object} services.ErrorResponse @Failure 500 {object} services.ErrorResponse @Router /profile/:id [get]

func LoginUser

func LoginUser(c *gin.Context)

LoginUser godoc @Summary Logs a user in @Schemes serviceV1.LoginRequest serviceV1.LoginResponse services.ErrorResponse @Description Logs a user in using the provided credentials @ID login-user @Tags authentication @Accept application/json @Produces application/json @Param data body v1.LoginRequest true "content" @Success 200 {object} v1.LoginResponse @Failure 400 {object} services.ErrorResponse @Failure 401 {object} services.ErrorResponse @Failure 500 {object} services.ErrorResponse @Router /login [post]

func MapRoutes

func MapRoutes(router *gin.RouterGroup, store *persist.MemoryStore)

func RefreshUserToken

func RefreshUserToken(c *gin.Context)

RefreshUserToken godoc @Summary Refresh token @Schemes serviceV1.RefreshRequest serviceV1.RefreshResponse services.ErrorResponse @Description Refreshes a user token identified by the given id @ID refresh-token @Security ApiKeyAuth @Tags authentication @Accept application/json @Produce application/json @param Authorization header string true "Authorization" @Success 200 {object} v1.RefreshResponse @Failure 400 {object} services.ErrorResponse @Failure 401 {object} services.ErrorResponse @Failure 500 {object} services.ErrorResponse @Router /refresh [post]

func RegisterUser

func RegisterUser(c *gin.Context)

RegisterUser godoc @Summary Register user @Description Register a user. The response contains a token used for authentication @ID register-user @Tags authentication @Schemes serviceV1.RegisterRequest serviceV1.RegisterResponse @Accept application/json @Produce application/json @Param data body v1.RegisterRequest true "content" @Success 200 {object} v1.RegisterResponse @Failure 400 {object} services.ErrorResponse @Failure 401 {object} services.ErrorResponse @Failure 500 {object} services.ErrorResponse @Router /register [post]

func UploadUserProfile

func UploadUserProfile(c *gin.Context)

UploadUserProfile godoc @Summary Upload user profile picture @Description Upload a user profile picture in a form for the currently logged-in user @ID upload-profile @Tags user-account @Security ApiKeyAuth @param Authorization header string true "Authorization" @Schemes v1.SaveUserProfileResponse services.ErrorResponse @Accept multipart/form-data @Produce application/json @Param id path string true "user id" @Param image formData file true "picture form data" @Success 200 {object} v1.SaveUserProfileResponse @Failure 400 {object} services.ErrorResponse @Failure 404 {object} services.ErrorResponse @Failure 401 {object} services.ErrorResponse @Failure 500 {object} services.ErrorResponse @Router /profile/:id [post]

Types

This section is empty.

Jump to

Keyboard shortcuts

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