role

package
v0.0.0-...-17112b8 Latest Latest
Warning

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

Go to latest
Published: May 6, 2019 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetPage

func GetPage(c *RoleController) int

Types

type LoginResult

type LoginResult struct {
	Code int    `json:"code"`
	Msg  string `json:"msg"`
	Data struct {
		Token interface{} `json:"token"`
	} `json:"data"`
}

type Role

type Role struct {
	Id   int    `json:"id"`
	Name string `json:"name"`
	User int    `json:"user_id"`
	Menu int    `json:"menu_id"`
}

type RoleController

type RoleController struct {
	beego.Controller
}

func (*RoleController) AddlRole

func (this *RoleController) AddlRole()

@Summary 添加角色 @Tags 添加角色 @Description 添加角色 @Accept json @Produce json @Failure 400 {string} json "{"code":400, "data":null,"msg":"请求参数错误"}" @Failure 404 {string} json "{ "code": 404, "data":null,"msg":"请求参数错误"}" @Success 200 {string} json "{ "code": 200, "data": { "token": "xxx" }, "msg": "ok" }" @router /role [post]

func (*RoleController) DeleteRole

func (this *RoleController) DeleteRole()

@Summary 删除角色 @Tags 删除角色 @Description 删除角色 @Accept json @Produce json @Failure 400 {string} json "{"code":400, "data":null,"msg":"请求参数错误"}" @Failure 404 {string} json "{ "code": 404, "data":null,"msg":"请求参数错误"}" @Success 200 {string} json "{ "code": 200, "data": { "token": "xxx" }, "msg": "ok" }" @router /role/:id [delete]

func (*RoleController) GetAllRole

func (this *RoleController) GetAllRole()

@Summary 查询所有角色 @Tags 查询所有角色 @Description 查询所有角色 @Accept json @Produce json @Failure 400 {string} json "{"code":400, "data":null,"msg":"请求参数错误"}" @Failure 404 {string} json "{ "code": 404, "data":null,"msg":"请求参数错误"}" @Success 200 {string} json "{ "code": 200, "data": { "token": "xxx" }, "msg": "ok" }" @router /role [get]

func (*RoleController) GetOneRole

func (this *RoleController) GetOneRole()

func (*RoleController) ResponseJson

func (this *RoleController) ResponseJson(httpCode, errCode int, data interface{})

func (*RoleController) URLMapping

func (this *RoleController) URLMapping()

func (*RoleController) UpdateRole

func (this *RoleController) UpdateRole()

@Summary 修改角色信息 @Tags 修改角色信息 @Description 修改角色信息 @Accept json @Produce json @Failure 400 {string} json "{"code":400, "data":null,"msg":"请求参数错误"}" @Failure 404 {string} json "{ "code": 404, "data":null,"msg":"请求参数错误"}" @Success 200 {string} json "{ "code": 200, "data": { "token": "xxx" }, "msg": "ok" }" @router /role [put]

type Roles

type Roles struct {
	Id   int    `json:"id"`
	Name string `json:"name"`
	Menu []int  `json:"menu_id"`
}

Jump to

Keyboard shortcuts

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