package
0.0.0-20250403143952-b55b17c58748
Repository: https://github.com/rveen/golib.git
Documentation: pkg.go.dev

# README

Simple access control library

See the API documentation.

Configuration file format

There are two sections. The rules section has the format

who resource operation allow/deny

The groups section creates groups of people, or groups of groups:

group subgroup subgroup ...

Where subgroup can be a user.

# A comment
[rules]
* * * -
* /static *
purchasing /dept/purchasing *

[groups]
purchasing john alice bob

All rules are checked, in the same order as written.

Paths (resources) refer to one or several consecutive path elements, not parts of them. For example:

* /static *

allows all people to access the URLs "/static" and "/static/*", but not "/static2". There is no support for wildcards or partial path elements.

In absence of rules, the default is to allow anything to all.

# Functions

New creates a new Acl object, either from a configuration file, or empty if an empty string is given as argument.

# Structs

ACL contains rules and groups for implementing an access control list.
No description provided by the author