store

package
v1.8.4 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2022 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Mock, RegistryAccess bool
	ContextVar           Context
	ForeachElement       int
	Subjects             Subject
)

Functions

func GetForeachElement

func GetForeachElement() int

func GetMock

func GetMock() bool

func GetRegistryAccess

func GetRegistryAccess() bool

func SetContext

func SetContext(context Context)

func SetForeachElement

func SetForeachElement(foreachElement int)

func SetMock

func SetMock(mock bool)

func SetRegistryAccess

func SetRegistryAccess(access bool)

func SetSubjects

func SetSubjects(subjects Subject)

Types

type Context

type Context struct {
	Policies []Policy `json:"policies"`
}

func GetContext

func GetContext() Context

type Policy

type Policy struct {
	Name  string `json:"name"`
	Rules []Rule `json:"rules"`
}

func GetPolicyFromContext

func GetPolicyFromContext(policyName string) *Policy

type Rule

type Rule struct {
	Name          string                   `json:"name"`
	Values        map[string]interface{}   `json:"values"`
	ForeachValues map[string][]interface{} `json:"foreachValues"`
}

func GetPolicyRuleFromContext

func GetPolicyRuleFromContext(policyName string, ruleName string) *Rule

type Subject

type Subject struct {
	Subject rbacv1.Subject `json:"subject,omitempty" yaml:"subject,omitempty"`
}

func GetSubjects

func GetSubjects() Subject

Jump to

Keyboard shortcuts

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