Grbac
Golang library implements RBAC (role-based access control)
Install / Use
/learn @vadim-su/GrbacREADME
GRBAC

GRBAC is a fast Golang library which provides a role-based access control.
The project is written with a focus on performance, minimalism, and a small number of abstractions.
Install
Run this command
go get -v github.com/deterok/grbac
or
go get -v gopkg.in/deterok/grbac.v1
Usage
// Create User role
roleU := NewRole("User")
// Add the permissions to the User role
roleU.Permit("CreateMsg")
roleU.Permit("ReadMsg")
// Create Admin role
roleA := NewRole("Admin")
// Add the permissions to the Admin role
roleA.Permit("EditMsg")
roleA.Permit("DelMsg")
// Set the parent
roleA.SetParent(roleU)
// Check the permissions
if roleA.IsAllowed("CreateMsg", "ReadMsg", "EditMsg", "DelMsg") {
fmt.Println("All permissions are allowed for the Admin role!")
}
More examples in godoc
Contributing
Pull requests and stars are welcome. For bugs and feature requests, please create an issue.
License
Copyright (C) 2016, Vadim Suharnikov. Released under the MIT license.
Related Skills
node-connect
344.1kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
xurl
344.1kA CLI tool for making authenticated requests to the X (Twitter) API. Use this skill when you need to post tweets, reply, quote, search, read posts, manage followers, send DMs, upload media, or interact with any X API v2 endpoint.
frontend-design
96.8kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
344.1kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
