role

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: May 12, 2020 License: MIT Imports: 14 Imported by: 0

Documentation

Overview

Copyright 2019-2020 Axetroy. All rights reserved. MIT license.

Copyright 2019-2020 Axetroy. All rights reserved. MIT license.

Copyright 2019-2020 Axetroy. All rights reserved. MIT license.

Copyright 2019-2020 Axetroy. All rights reserved. MIT license.

Copyright 2019-2020 Axetroy. All rights reserved. MIT license.

Copyright 2019-2020 Axetroy. All rights reserved. MIT license.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Create

func Create(c helper.Context, input CreateParams) (res schema.Response)

func CreateRouter

func CreateRouter(c *gin.Context)

func Delete

func Delete(c helper.Context, roleName string) (res schema.Response)

func DeleteRoleByName

func DeleteRoleByName(name string)

func DeleteRouter

func DeleteRouter(c *gin.Context)

func Get

func Get(roleName string) (res schema.Response)

获取角色信息

func GetAccession

func GetAccession() (res schema.Response)

func GetAccessionRouter

func GetAccessionRouter(c *gin.Context)

func GetList

func GetList(c helper.Context, input Query) (res schema.List)

func GetListRouter

func GetListRouter(c *gin.Context)

func GetRouter

func GetRouter(c *gin.Context)

func Update

func Update(c helper.Context, roleName string, input UpdateParams) (res schema.Response)

func UpdateRouter

func UpdateRouter(c *gin.Context)

func UpdateUserRole

func UpdateUserRole(c helper.Context, userId string, input UpdateUserRoleParams) (res schema.Response)

func UpdateUserRoleRouter

func UpdateUserRoleRouter(c *gin.Context)

Types

type CreateParams

type CreateParams struct {
	Name        string   `json:"name" valid:"required~请输入角色名"`       // 角色名
	Description string   `json:"description" valid:"required~请输入描述"` // 描述
	Accession   []string `json:"accession" valid:"required~请输入权限"`   // 权限列表
	Note        *string  `json:"note"`                               // 备注
}

type Query

type Query struct {
	schema.Query
}

type UpdateParams

type UpdateParams struct {
	Description *string   `json:"description"`
	Accession   *[]string `json:"accession"`
	Note        *string   `json:"note"`
}

type UpdateUserRoleParams

type UpdateUserRoleParams struct {
	Roles []string `json:"role"` // 要更新的用户角色
}

Jump to

Keyboard shortcuts

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