user

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2022 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Avatar

func Avatar(c echo.Context) error

@Title get user avatar @Summary get user avatar src as base64 @Description @Tags user @Accept json @Produce json @Success 200 "OK - get avatar src base64" @Failure 404 "Fail - avatar is empty" @Failure 500 "Fail - internal error" @Router /api/user/avatar [get] @Security ApiKeyAuth

func Profile

func Profile(c echo.Context) error

@Title get user profile @Summary get user profile @Description @Tags user @Accept json @Produce json @Success 200 "OK - profile get successfully" @Failure 500 "Fail - internal error" @Router /api/user/profile [get] @Security ApiKeyAuth

func SetProfile

func SetProfile(c echo.Context) error

@Title set user profile @Summary set user profile @Description @Tags user @Accept multipart/form-data @Produce json @Param phone formData string false "phone number" @Param addr formData string false "address" @Param city formData string false "city" @Param country formData string false "country" @Param nid formData string false "national ID" @Param gender formData string false "gender M/F" @Param dob formData string false "date of birth" @Param position formData string false "job position" @Param title formData string false "title" @Param employer formData string false "employer" @Param bio formData string false "biography" @Param avatar formData file false "avatar" @Success 200 "OK - profile set successfully" @Failure 400 "Fail - invalid set fields" @Failure 500 "Fail - internal error" @Router /api/user/setprofile [post] @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