acl

package
v4.9.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2018 License: GPL-3.0 Imports: 9 Imported by: 10

Documentation

Index

Constants

This section is empty.

Variables

View Source
var PermissionDenied = errors.New("permission denied")

Functions

func NewACLModule

func NewACLModule(c *etcd.Client, loggedInUser string) admincli.CLIModule

Types

type ACLEngine

type ACLEngine struct {
	// contains filtered or unexported fields
}

func NewACLEngine

func NewACLEngine(c *etcd.Client) *ACLEngine

func (*ACLEngine) CreateUser

func (e *ACLEngine) CreateUser(username, password string) error

func (*ACLEngine) DeleteUser

func (e *ACLEngine) DeleteUser(username string) error

func (*ACLEngine) GetAllUsers

func (e *ACLEngine) GetAllUsers() ([]string, error)

func (*ACLEngine) SetPassword

func (e *ACLEngine) SetPassword(username, password string) error

func (*ACLEngine) Test

func (e *ACLEngine) Test(username string, p Permission) error

type Permission

type Permission string
const PAdmin Permission = "admin"
const PChangePassword Permission = "acl.user.passwd"
const PCreateUser Permission = "acl.user.add"
const PDeleteUser Permission = "acl.user.del"

Jump to

Keyboard shortcuts

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