mongo

package
v0.0.0-...-94b0601 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2015 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SeqCol  = "seq"
	RoleCol = "role"
	PermCol = "perm"
	DescCol = "desc"
)

Variables

This section is empty.

Functions

func Init

func Init(conn interface{}) (RBACProvider, error)

Types

type DescRecord

type DescRecord struct {
	Id   int `bson:"_id,omitempty"`
	Desc string
}

func NewDesc

func NewDesc() *DescRecord

type PermRecord

type PermRecord struct {
	Id   int
	Perm struct {
		PermName string
		Resource struct {
			Type string
			Url  string
		}
	} `bson:"_id,omitempty"`
}

func NewPerm

func NewPerm() *PermRecord

type RoleRecord

type RoleRecord struct {
	Id             int
	RoleName       string `bson:"_id,omitempty"`
	RoleType       int
	RoleDesc       string
	GrantedRoles   []string
	GrantedPermIds []int
	IndirectGrants struct {
		Scn     int
		Roles   []string
		PermIds []int
	}
}

func NewRoleRecord

func NewRoleRecord() *RoleRecord

type SeqRecord

type SeqRecord struct {
	Id  int
	Scn int
}

func NewSeq

func NewSeq() *SeqRecord

Jump to

Keyboard shortcuts

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