Code Monkey home page Code Monkey logo

iris-admin-rbac's Introduction

IrisAdminRbac

IrisAdminRbac 项目为一个权鉴模块插件,可以为 IrisAdmin 项目快速集成权鉴管理API.

Build Status LICENSE go doc go report Build Status

下载
  go get -u github.com/snowlyg/iris-admin-rbac@latest
简单使用
  • gin
package main

import (
 "github.com/snowlyg/iris-admin/server/web"
 "github.com/snowlyg/iris-admin/server/web/web_gin"
  rbac "github.com/snowlyg/iris-admin-rbac/gin"
)

func main() {
  wi := web_gin.Init()
  v1 := wi.Group("/api/v1")
 {
  rbac.Party(v1)    // 权鉴模块
 }
 web.Start(wi)
}
  • iris
package main

import (
 "github.com/snowlyg/iris-admin/server/web"
 "github.com/snowlyg/iris-admin/server/web/web_iris"
  rbac "github.com/snowlyg/iris-admin-rbac/iris"
)

func main() {
  wi := web_iris.Init()
  v1 := wi.Group("/api/v1")
 {
  rbac.Party(v1)    // 权鉴模块
 }
 web.Start(wi)
}
接口说明
  • 公共接口
GET /public/captcha  //验证码
POST /public/admin/login  // 登陆
GET /public/logout  // 退出
GET /public/clean  // 清空所有授权,如果是多点登陆方式
  • 操作记录
GET /oplog/getOplogList //列表
  • 管理员
GET /admin/getAll //列表
GET /admin/getAdmin/:id //列表
POST /admin/createAdmin //添加
PUT /admin/updateAdmin/:id //更新
DELETE /admin/deleteAdmin/:id //删除
GET /admin/profile //登陆用户信息
POST /admin/changeAvatar //更新头像
  • 接口权限
GET /api/getList            // 获取Api列表
GET /api/getAll             // 获取所有api
GET /api/getApiById/:id     // 获取单条Api消息
POST /api/createApi         // 创建Api
DELETE /api/deleteApi/:id   // 删除Api
PUT /api/updateApi/:id      // 更新api
DELETE /api/deleteApisByIds // 删除选中api
  • 授权角色
GET /authority/getAuthorityList        // 获取角色列表
GET /authority/getAdminAuthorityList   // 获取员工角色列表
GET /authority/getTenancyAuthorityList // 获取商户角色列表
GET /authority/getGeneralAuthorityList // 获取普通用户角色列表
POST /authority/createAuthority        // 创建角色
PUT /authority/updateAuthority/:id     // 更新角色
POST /authority/copyAuthority/:id      // 复制
DELETE /authority/deleteAuthority/:id  // 删除角色

Code snippets

Code snippets for iris-admin-rbac

1.Ctrl+Shift+P 2.Click Snippets 3.Click go.json and copy blow file content to your go.josn

iris-admin-rbac's People

Contributors

snowlyg avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

iris-admin-rbac's Issues

go新手上手有点不知道应该怎么操作

作者您好,我是刚学go不久,算接口仔的程度吧,然后这个东西拿上手不知道应该怎么使用好,文档很精简,但是我可能要写可看着操作的视频之类的东西,请问哪里可以找到啊

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.