api

package
v0.0.0-...-65546df Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthAPI

type AuthAPI struct {
	TokenResolver  *token.Resolver
	AuthHandler    handler.AuthHandler
	CaptchaHandler handler.CaptchaHandler
}

func (*AuthAPI) Captcha

func (a *AuthAPI) Captcha(ctx *gin.Context)

Captcha @Summary Captcha @Description send captcha code mail to specified email address @Tags auth @Accept json @Produce json @Param CaptchaOption body types.CaptchaOption true "CaptchaOption" @Success 200 {object} types.Response @Router /auth/captcha [POST]

func (*AuthAPI) Login

func (a *AuthAPI) Login(ctx *gin.Context)

Login @Summary Login @Description login with password, and returns jwt token pair @Tags auth @Accept json @Produce json @Param LoginOptions body types.LoginOptions true "LoginOptions" @Success 200 {object} types.Response{data=types.TokenResult} @Router /auth/login [POST]

func (*AuthAPI) Refresh

func (a *AuthAPI) Refresh(ctx *gin.Context)

Refresh @Summary Refresh @Description ask for refresh access TokenHandler lifetime with refresh TokenHandler @Tags auth @Accept json @Produce json @Param RefreshTokenOptions body types.RefreshTokenOptions true "refresh params" @Success 200 {object} types.Response{data=types.TokenResult} @Router /auth/refresh [POST]

func (*AuthAPI) Register

func (a *AuthAPI) Register(ctx *gin.Context)

Register @Summary Register @Description register a new user with verification code @Tags auth @Accept json @Produce json @Param RegisterOptions body types.RegisterOptions true "register params" @Success 200 {object} types.Response @Router /auth/register [POST]

func (*AuthAPI) ResetPassword

func (a *AuthAPI) ResetPassword(ctx *gin.Context)

ResetPassword @Summary ResetPassword @Description reset user password with verification code @Tags auth @Accept json @Produce json @Param ResetOptions body types.ResetOptions true "ResetOptions" @Success 200 {object} types.Response @Router /auth/reset [POST]

type HealthAPI

type HealthAPI struct {
	HealthHandler handler.HealthHandler
}

func (HealthAPI) Ping

func (h HealthAPI) Ping(ctx *gin.Context)

Ping @Summary Ping @Description ping test web service if is available @Tags system @Accept json @Produce json @Success 200 {object} types.Response{data=string} @Router /health/ping [GET]

type UserAPI

type UserAPI struct {
	UserHandler handler.UserHandler
}

func (UserAPI) Info

func (u UserAPI) Info(ctx *gin.Context)

Info @Summary Info @Description get user information by given uid @Tags user @Accept json @Produce json @Param uid path string true "uid" @Success 200 {object} types.Response{data=types.UserInfo} @Router /user/:uid [GET]

func (UserAPI) List

func (u UserAPI) List(ctx *gin.Context)

List @Summary List @Description list user info by page @Tags user @Accept json @Produce json @Param SearchUserOptions query types.SearchUserOptions true "SearchUserOptions" @Success 200 {object} types.Response{data=types.UserSearchResult} @Router /users [GET]

func (UserAPI) Profile

func (u UserAPI) Profile(ctx *gin.Context)

Profile @Summary Profile @Description return user information for current user @Tags user @Accept json @Produce json @Success 200 {object} types.Response{data=types.UserInfo} @Router /user/profile [GET]

Jump to

Keyboard shortcuts

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