parser

package
v0.0.0-...-043b14a Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrUidInvalid  = errors.New("uid is invalid")
	ErrGidInvalid  = errors.New("gid is invalid")
	ErrPermInvalid = errors.New("perm is invalid")
	ErrGidNotFound = errors.New("gid not found")
)

Functions

This section is empty.

Types

type Config

type Config struct {
	Users       map[string]User  `yaml:"users"`
	Groups      map[string]Group `yaml:"groups"`
	AllowAllSet set.StrSet       `yaml:"globalAllows"`
}

func New

func New() *Config

func (*Config) Done

func (d *Config) Done() (*auther.Auther, error)

type Group

type Group struct {
	Admin bool            `yaml:"admin"`
	Pmap  map[string]bool `yaml:"perms"`
}

type User

type User struct {
	Admin  bool            `yaml:"admin"`
	Groups set.StrSet      `yaml:"groups"`
	Pmap   map[string]bool `yaml:"perms"`
}

Jump to

Keyboard shortcuts

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