pkg

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2018 License: Apache-2.0 Imports: 20 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Scheme knows about audit and rbac types
	Scheme = runtime.NewScheme()
	// Decoder knows how to decode audit and rbac objects
	Decoder runtime.Decoder
)
View Source
var Version = "unknown"

Version holds the current version, and is overwritten by build flags

Functions

func Output

func Output(w io.Writer, obj runtime.Object, format string) error

Output writes the specified object to the specified writer in "yaml" or "json" format

Types

type GenerateOptions

type GenerateOptions struct {
	VerbExpansions                          map[string][]string
	ExpandMultipleNamesToUnnamed            bool
	ExpandMultipleNamespacesToClusterScoped bool

	Name        string
	Labels      map[string]string
	Annotations map[string]string
}

GenerateOptions specifies options for generating RBAC roles

func DefaultGenerateOptions

func DefaultGenerateOptions() GenerateOptions

DefaultGenerateOptions returns default generation options

type Generator

type Generator struct {
	Options GenerateOptions
	// contains filtered or unexported fields
}

Generator allows generating a set of covering RBAC roles and bindings

func NewGenerator

func NewGenerator(existing RBACObjects, requests []authorizer.AttributesRecord, options GenerateOptions) *Generator

NewGenerator creates a new Generator

func (*Generator) Generate

func (g *Generator) Generate() *RBACObjects

Generate returns a set of RBAC roles and bindings that cover the specified requests

type RBACObjects

type RBACObjects struct {
	Roles               []*rbac.Role
	RoleBindings        []*rbac.RoleBinding
	ClusterRoles        []*rbac.ClusterRole
	ClusterRoleBindings []*rbac.ClusterRoleBinding
}

RBACObjects holds lists of RBAC API objects

Jump to

Keyboard shortcuts

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