controller

package
v0.0.0-...-48145d3 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2020 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddAuth

func AddAuth(c *gin.Context)

@Summary 新增用户 @Description content 新增用户,不包括全权限 @Tags Admin @Param token query string false "token" @Param data body model.Auth true "data" @Success 200 {object} model.Auth model.Auth{} @Router /api/v1/admin/auth/add [post]

func DelAuth

func DelAuth(c *gin.Context)

@Summary 删除Auth @Description 删除Auth @Tags Admin @Param token query string false "token" @Param id path string true "更新的目标auth id" @Success 200 {string} string success! @Router /api/v1/admin/auth/del/{id} [delete]

func GetAllAuth

func GetAllAuth(c *gin.Context)

@Summary 获取所有auth @Description 获取所有auth @Tags Admin @Param token query string false "token" @Success 200 {string} string "success" @Router /api/v1/admin/auth/all [get]

func Login

func Login(c *gin.Context)

@Summary 通用接口 @Description 登陆、swagger、注销、404等 @Tags Common @Param token query string false "token" @Param data body model.Auth true "data" @Success 200 {string} string "success" @Router /login [post]

func PutAuth

func PutAuth(c *gin.Context)

@Summary 更新Auth @Description content 修改用户名或密码 @Tags Admin @Param token query string false "token" @Param id path string true "更新的目标auth id" @Param data body model.Auth true "data" @Success 200 {object} model.Auth model.Auth{} @Router /api/v1/admin/auth/update/{id} [put]

func RegisterAdmin

func RegisterAdmin(router *gin.Engine)

func RegisterAuthController

func RegisterAuthController(router *gin.Engine)

func RegisterCommon

func RegisterCommon(router *gin.Engine)

func RegisterTestController

func RegisterTestController(router *gin.Engine)

Types

type User

type User struct {
	UserName  string
	FirstName string
	LastName  string
}

User demo

Jump to

Keyboard shortcuts

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