authz

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package authz contains code to check if user has given permissions

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TestResourcePermissions

func TestResourcePermissions(ctx context.Context, cfg *rest.Config, namespaces []string, permissions []ResourcePermissions) (map[string]NamespacedPermissionsReport, error)

Types

type NamespacedPermission

type NamespacedPermission struct {
	Verb      string
	Group     string
	Version   string
	Resource  string
	Namespace string
	Name      string
}

func (NamespacedPermission) String

func (p NamespacedPermission) String() string

type NamespacedPermissionsReport

type NamespacedPermissionsReport struct {
	Satisfied []NamespacedPermission
	Failed    []NamespacedPermission
	InError   map[NamespacedPermission]error
}

func (*NamespacedPermissionsReport) AllSatisfied

func (r *NamespacedPermissionsReport) AllSatisfied() bool

type ResourcePermissions

type ResourcePermissions struct {
	Verbs    []string
	Group    string
	Version  string
	Resource string
	Name     string
}

Jump to

Keyboard shortcuts

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