rbac

package
v0.0.0-...-750a8a5 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

@Description TODO @Author jiangyang @Created 2020/11/17 11:26 上午

@Description TODO @Author jiangyang @Created 2020/11/17 6:05 下午

@Description TODO @Author jiangyang @Created 2020/11/17 6:06 下午

@Description TODO @Author jiangyang @Created 2020/11/17 6:08 下午

Index

Constants

View Source
const DefaultPrefix = "/rbac"

Variables

This section is empty.

Functions

func Check

func Check(bus interface{}, url string) error

func Init

func Init(c Config)

func Login

func Login(ctx *ctx.Context)

func Register

func Register(r *gin.Engine, prefixOptions ...string)

func UserInsert

func UserInsert(ctx *ctx.Context)

Types

type Config

type Config struct {
	User     string `json:"user" yaml:"user"`
	Password string `json:"password" yaml:"password"`
	Frontend string `json:"frontend" yaml:"frontend"`
}

type Power

type Power struct {
	gorm.Model
	Title string `json:"title"`
	Url   string `json:"url"`
}

type Role

type Role struct {
	gorm.Model
	Name string `json:"name"`
}

type RolePower

type RolePower struct {
	gorm.Model
	RID     uint `json:"rid"`
	PowerID uint `json:"power_id"`
}

type User

type User struct {
	gorm.Model
	Name string `json:"name"`
}

type UserRole

type UserRole struct {
	gorm.Model
	UID uint `json:"uid"`
	RID uint `json:"rid"`
}

Jump to

Keyboard shortcuts

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