Help us shape the future of Go! Take the 2026 Go Developer Survey

rbac

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Permission

type Permission struct {
	Resource string   // e.g., "stack:*", "container:web-*"
	Actions  []string // e.g., ["read", "write", "execute"]
}

type RBACPlugin

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

func New

func New() *RBACPlugin

func (*RBACPlugin) Authenticate

func (p *RBACPlugin) Authenticate(ctx context.Context, req *plugin.AuthRequest) (*plugin.Identity, error)

func (*RBACPlugin) Authorize

func (p *RBACPlugin) Authorize(ctx context.Context, identity *plugin.Identity, action *plugin.Action) error

func (*RBACPlugin) Capabilities

func (p *RBACPlugin) Capabilities() []plugin.Capability

func (*RBACPlugin) Evaluate

Policy interface implementation

func (*RBACPlugin) Init

func (p *RBACPlugin) Init(ctx context.Context, config map[string]interface{}) error

func (*RBACPlugin) Name

func (p *RBACPlugin) Name() string

func (*RBACPlugin) Shutdown

func (p *RBACPlugin) Shutdown(ctx context.Context) error

func (*RBACPlugin) Version

func (p *RBACPlugin) Version() string

type Role

type Role struct {
	Name        string
	Permissions []Permission
}

type User

type User struct {
	ID    string
	Name  string
	Roles []string
}

Jump to

Keyboard shortcuts

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