store

package
v1.9.0 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Mock bool

	AllowApiCalls  bool
	ContextVar     Context
	ForeachElement int
	Subjects       Subject
)

Functions

func AllowApiCall added in v1.9.0

func AllowApiCall(allow bool)

func GetForeachElement

func GetForeachElement() int

func GetMock

func GetMock() bool

func GetRegistryAccess

func GetRegistryAccess() bool

func GetRegistryClient added in v1.9.0

func GetRegistryClient() registryclient.Client

func IsAllowApiCall added in v1.9.0

func IsAllowApiCall() bool

func SetContext

func SetContext(context Context)

func SetForEachElement added in v1.9.0

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