handler

package
v0.0.0-...-a4deb0f Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func UsersAddAddress

func UsersAddAddress() func(*gin.Context)

UsersAddAddress godoc @Summary Users can add address @Description Users can add address @Tags usersFunction @Accept json @Produce json @Param user_id path string true "User ID" @Param name body string true "Name" @Param address body string true "Address" @Param phone_number body string true "PhoneNumber" @Param type body string true "Type" @Param address_default body string true "AddressDefault" @Param lat body float64 true "Lat" @Param long body float64 true "Long" @Param ward_id body string true "WardId" @Param ward_text body string true "WardText" @Param district_id body string true "DistrictId" @Param district_text body string true "DistrictText" @Param province_id body string true "ProvinceId" @Param province_text body string true "ProvinceText" @Param national_id body string true "NationalId" @Param national_text body string true "NationalText" @Success 200 {object} res.Response @Failure 400 {object} res.Response @Failure 403 {object} res.Response @Failure 500 {object} res.Response @Router /v1/api/users/add-address/{user_id} [post]

func UsersChangeAddressDefault

func UsersChangeAddressDefault() func(*gin.Context)

UsersChangeAddressDefault godoc @Summary Users can change address default @Description Users can change address default @Tags usersFunction @Accept json @Produce json @Param user_id path string true "User ID" @Param name body string true "Name" @Param address body string true "Address" @Param phone_number body string true "PhoneNumber" @Param type body string true "Type" @Param address_default body string true "AddressDefault" @Param lat body float64 true "Lat" @Param long body float64 true "Long" @Param ward_id body string true "WardId" @Param ward_text body string true "WardText" @Param district_id body string true "DistrictId" @Param district_text body string true "DistrictText" @Param province_id body string true "ProvinceId" @Param province_text body string true "ProvinceText" @Param national_id body string true "NationalId" @Param national_text body string true "NationalText" @Success 200 {object} res.Response @Failure 400 {object} res.Response @Failure 403 {object} res.Response @Failure 500 {object} res.Response @Router /v1/api/users/change-address-default/{user_id} [patch]

func UsersDelete

func UsersDelete() func(*gin.Context)

UsersDelete godoc @Summary Delete user @Description Delete user @Tags users @Accept json @Produce json @Param user_id path string true "User ID" @Success 200 {object} res.Response @Failure 400 {object} res.Response @Failure 403 {object} res.Response @Failure 500 {object} res.Response @Router /v1/api/users/delete/{user_id} [delete]

func UsersGetAddress

func UsersGetAddress() func(*gin.Context)

UsersGetAddress godoc @Summary Users can get address @Description Users can get address @Tags usersFunction @Accept json @Produce json @Param user_id path string true "User ID" @Success 200 {object} res.Response @Failure 400 {object} res.Response @Failure 403 {object} res.Response @Failure 500 {object} res.Response @Router /v1/api/users/get-address/{user_id} [get]

func UsersSignIn

func UsersSignIn() func(*gin.Context)

UsersSignIn godoc @Summary Users can sign in @Description Users can sign in @Tags users @Accept json @Produce json @Param email body string true "Email" @Param pass_word body string true "PassWord" @Param phone_number body string true "PhoneNumber" @Success 200 {object} res.Response @Failure 400 {object} res.Response @Failure 403 {object} res.Response @Failure 500 {object} res.Response @Router /v1/api/users/sign_in [post]

func UsersSignUp

func UsersSignUp() func(*gin.Context)

UsersSignUp godoc @Summary Users sign up with email and password @Description Users sign up with email and password @Tags users @Accept json @Produce json @Param name body string true "Name" @Param email body string true "Email" @Param pass_word body string true "PassWord" @Param phone_number body string true "PhoneNumber" @Param address body string true "Address" @Param telegram body string true "Telegram" @Param lat body float64 true "Lat" @Param long body float64 true "Long" @Param ward_id body string true "WardId" @Param ward_text body string true "WardText" @Param district_id body string true "DistrictId" @Param district_text body string true "DistrictText" @Param province_id body string true "ProvinceId" @Param province_text body string true "ProvinceText" @Param national_id body string true "NationalId" @Param national_text body string true "NationalText" @Success 200 {object} res.Response @Failure 400 {object} res.Response @Failure 403 {object} res.Response @Failure 500 {object} res.Response @Router /v1/api/users/sign-up [post]

func UsersUpdate

func UsersUpdate() func(*gin.Context)

UsersUpdate godoc @Summary Users can update @Description Users can update @Tags users @Accept json @Produce json @Param user_id path string true "User ID" @Param name body string true "Name" @Param sex body string true "Sex" @Param birth_date body string true "BirthDate" @Param telegram body string true "Telegram" @Success 200 {object} res.Response @Failure 400 {object} res.Response @Failure 403 {object} res.Response @Failure 500 {object} res.Response @Router /v1/api/users/update/{user_id} [patch]

Types

type UsersUpdateResponse

type UsersUpdateResponse struct {
	Name string `json:"name"`
	//Email       string `json:"email"`
	//PhoneNumber string `json:"phone_number"`
	Sex       string `json:"sex"`
	BirthDate string `json:"birth_date"`
	Telegram  string `json:"telegram"`
}

Jump to

Keyboard shortcuts

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