types

package
v0.20.1 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	InOperator           operator = "IN"
	NotInOperator        operator = "NOT_IN"
	EqualsOperator       operator = "EQUAL"
	NotEqualOperator     operator = "NOT_EQUAL"
	ExistsOperator       operator = "EXISTS"
	DoesNotExistOperator operator = "DOES_NOT_EXIST"
	AnyOperator          operator = "ANY"
)
View Source
const (
	AllPermissionType        permissionType = "all"
	NameSpacedPermissionType permissionType = "namespaced"
	ClusterPermissionType    permissionType = "clusterScoped"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type APIGroupFilter added in v0.9.0

type APIGroupFilter struct {
	Params FilterParams
}

func (*APIGroupFilter) Filter added in v0.9.0

func (f *APIGroupFilter) Filter(rule *rbac.PolicyRule) *rbac.PolicyRule

type CSVPermissions added in v0.9.0

type CSVPermissions struct {
	ClusterPermissions []Permission `json:"clusterPermissions"`
	Permissions        []Permission `json:"permissions"`
}

func (*CSVPermissions) FilterRules added in v0.9.0

func (cp *CSVPermissions) FilterRules(ruleFilter RuleFilter) []Rule

Returns the list of rules matching the filtering conditions

type Filter added in v0.9.0

type Filter interface {
	Filter(*rbac.PolicyRule) *rbac.PolicyRule
}

type FilterParams added in v0.9.0

type FilterParams struct {
	Args         []string
	OperatorName operator
}

type IndexImageExtractor

type IndexImageExtractor interface {
	ExtractBundlesFromImage(indexImage string, extractTo string) error
	CacheKey(indexImage, addonName string) string
	CacheHit(key string) bool
	ExtractionPath() string
	ManifestsPath(addonName string) string
	CacheLocation() string
	WriteToCache(value string) error
}

type MetaBundle

type MetaBundle struct {
	AddonMeta *v1alpha1.AddonMetadataSpec
	Bundles   []op.Bundle
}

func NewMetaBundle

func NewMetaBundle(addonMeta *v1alpha1.AddonMetadataSpec, bundles []op.Bundle) *MetaBundle

type NonResourceURLsFilter added in v0.9.0

type NonResourceURLsFilter struct {
	Params FilterParams
}

func (*NonResourceURLsFilter) Filter added in v0.9.0

type Permission added in v0.9.0

type Permission struct {
	ServiceAccountName string
	Rules              []Rule
}

type ResourceNamesFilter added in v0.9.0

type ResourceNamesFilter struct {
	Params FilterParams
}

func (*ResourceNamesFilter) Filter added in v0.9.0

type ResourcesFilter added in v0.9.0

type ResourcesFilter struct {
	Params FilterParams
}

func (*ResourcesFilter) Filter added in v0.9.0

func (f *ResourcesFilter) Filter(rule *rbac.PolicyRule) *rbac.PolicyRule

type Rule added in v0.9.0

type Rule struct {
	rbac.PolicyRule
	// contains filtered or unexported fields
}

type RuleFilter added in v0.9.0

type RuleFilter struct {
	PermissionType permissionType
	Filters        []Filter
}

func (*RuleFilter) GetRelevantPermissions added in v0.9.0

func (r *RuleFilter) GetRelevantPermissions(cp *CSVPermissions) []Permission

func (*RuleFilter) Run added in v0.9.0

func (r *RuleFilter) Run(rule *rbac.PolicyRule) *rbac.PolicyRule

type VerbsFilter added in v0.9.0

type VerbsFilter struct {
	Params FilterParams
}

func (*VerbsFilter) Filter added in v0.9.0

func (f *VerbsFilter) Filter(rule *rbac.PolicyRule) *rbac.PolicyRule

Jump to

Keyboard shortcuts

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