acm

package
v0.0.0-...-964c2da Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2020 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	TokenNotFoundError = errors.New("Token not found")
	NotPermittedError  = errors.New("Operation not permitted")
)
View Source
var (
	DEFAULTS = []string{"root", "user", "app"}
)
View Source
var Service = new(acm)

Functions

This section is empty.

Types

type ACM

type ACM interface {
	RegisterPermission(name string, defaults map[string]bool, desc map[string]string) error
	CreateToken(defaults []string, layers ...map[string]bool) (string, error)
	UpdateToken(id string, layers ...map[string]bool) error
	GetToken(id string) (*token, error)
	CheckTokenPermission(token string, permission string) (error, bool)
	GetPermissionDescription(name string) (map[string]string, error)
}

Jump to

Keyboard shortcuts

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