v1

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DemoGet

func DemoGet(c *gin.Context)

DemoGet @Summary demo,测试get @Produce json @Tags demo @Param param1 query string false "some params named param1" @Param param2 query string false "some params named param2" @Success 200 {string} json "" @Router /v1/demo/get [get] @Security ApiKeyAuth

func DemoPost

func DemoPost(c *gin.Context)

DemoPost @Summary demo,测试post @Produce json @Tags demo @Param params body Params false "some params json" @Success 200 {string} json "" @Router /v1/demo/post [post] @Security ApiKeyAuth

func TestLog

func TestLog(c *gin.Context)

TestLog @Summary demo,测试post @Produce json @Tags demo @Success 200 {string} json "" @Router /v1/test/test-log [get] @Security ApiKeyAuth

func UserLogin

func UserLogin(c *gin.Context)

UserLogin @Summary User login @Tags User @Param form body LoginForm true "register form" @Success 200 {object} app.ApiJson "" @Failure 500 {object} app.ErrJson "" @Router /v1/user/login [post]

func UserRegister

func UserRegister(c *gin.Context)

UserRegister @Summary User register @Tags User @Param form body RegisterForm true "register form" @Success 200 {object} app.ApiJson "" @Failure 500 {object} app.ErrJson "" @Router /v1/user/register [post]

Types

type LoginForm

type LoginForm struct {
	UserId   int64
	Password string
}

type Params

type Params struct {
	Param1 string `json:"param1"`
	Param2 string `json:"param2"`
}

type RegisterForm

type RegisterForm struct {
	UserName string  `binding:"alphanum"`
	Email    *string `binding:"email"`
	Phone    *string `binding:"e164"`
	Password string
}

Jump to

Keyboard shortcuts

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