controller

package
v0.0.18 Latest Latest
Warning

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

Go to latest
Published: May 22, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Resources = &controller.Controllers{
	Controllers: []controller.Controller{

		securityController,

		openapi.Resources,

		mapi.Resources,

		api.Resources,
	},
}

Functions

func AddController added in v0.0.3

func AddController(c controller.Controller)

func AddControllers added in v0.0.3

func AddControllers(cs ...controller.Controller)

func InitRouter

func InitRouter(engine *gin.Engine)

Types

type RegisterForm

type RegisterForm struct {
	Mode       string `json:"mode" form:"mode"`
	Username   string `json:"username" form:"username"`
	Password   string `json:"password" form:"password"`
	Password2  string `json:"password2,omitempty" form:"password2"`
	InviteCode string `json:"invite_code" form:"invite_code"`
}

type SecurityController

type SecurityController struct {
	controller.ResourceController
	MobileValidator   *SmsCode.SmsCodeValidator  `inject:"smsCodeValidator"`
	UserService       *service.UserService       `inject:"userService"`
	InviteCodeService *service.InviteCodeService `inject:"inviteCodeService"`
}

func (*SecurityController) ChangeRegister

func (o *SecurityController) ChangeRegister(c *gin.Context)

*

  • PUT /register

func (*SecurityController) InitRouter

func (o *SecurityController) InitRouter(g *gin.RouterGroup) *gin.RouterGroup

func (*SecurityController) Register

func (u *SecurityController) Register(c *gin.Context)

@Summary 注册新用户 (由用户主动发起) @Router /register [POST]

Directories

Path Synopsis
api

Jump to

Keyboard shortcuts

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