rbacarango

package module
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: May 30, 2022 License: MIT Imports: 5 Imported by: 0

README

RBAC ArangoDB Backend

The venerable library github.com/mikespook/gorbac provides a polished small interface for RBAC (role based access control), though leaves persistence of the RBAC structure as an exercise for the user. This library provides persistence for ArangoDB.

Usage

Create required collections with rbacarango.CreateSchema once in your schema migration tool. The method is replayable.

func CreateSchema(ctx context.Context, arangoDB driver.Database) error

Then rbacarango.LoadRBAC or rbacarango.SaveRBAC with the RBAC structure from gorbac package.

func LoadRBAC(ctx context.Context, db driver.Database) (*gorbac.RBAC, error)
func SaveRBAC(ctx context.Context, db driver.Database, rbac *gorbac.RBAC) error

License

SPDX short identifier: MIT

Documentation

Overview

rbacarango loads and stores RBAC structure from gorbac package from/to ArangoDB.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateSchema

func CreateSchema(ctx context.Context, db driver.Database) error

CreateSchema creates graph collections for edges and vertices.

func LoadRBAC

func LoadRBAC(ctx context.Context, db driver.Database) (*gorbac.RBAC, error)

LoadRBAC loads whole RBAC structure.

func SaveRBAC

func SaveRBAC(ctx context.Context, db driver.Database, rbac *gorbac.RBAC) error

SaveRBAC stores whole RBAC structure.

Types

This section is empty.

Jump to

Keyboard shortcuts

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