loader

package
v0.0.0-...-9b5a78d Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2020 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Loader

type Loader struct {
	SignPolicy        *SignPolicyLoader
	RSP               *RSPLoader
	Namespace         *NamespaceLoader
	ResourceSignature *ResSigLoader
}

func NewLoader

func NewLoader(cfg *config.VerifierConfig, reqNamespace string) *Loader

type NamespaceLoader

type NamespaceLoader struct {
	Client *v1client.CoreV1Client
	Data   []v1.Namespace
	// contains filtered or unexported fields
}

func NewNamespaceLoader

func NewNamespaceLoader() *NamespaceLoader

func (*NamespaceLoader) ClearCache

func (self *NamespaceLoader) ClearCache()

func (*NamespaceLoader) GetData

func (self *NamespaceLoader) GetData(doK8sApiCall bool) ([]v1.Namespace, bool)

func (*NamespaceLoader) Load

func (self *NamespaceLoader) Load(doK8sApiCall bool) bool

type RSPLoader

type RSPLoader struct {
	Client *rspclient.ApisV1alpha1Client
	Data   []rspapi.ResourceSigningProfile
	// contains filtered or unexported fields
}

func NewRSPLoader

func NewRSPLoader(verifierNamespace, profileNamespace, requestNamespace string, commonProfile *rspapi.ResourceSigningProfileSpec) *RSPLoader

func (*RSPLoader) ClearCache

func (self *RSPLoader) ClearCache()

func (*RSPLoader) GetByReferences

func (self *RSPLoader) GetByReferences(refs []*v1.ObjectReference) []rspapi.ResourceSigningProfile

func (*RSPLoader) GetData

func (self *RSPLoader) GetData(doK8sApiCall bool) ([]rspapi.ResourceSigningProfile, bool)

func (*RSPLoader) GetDefaultProfile

func (self *RSPLoader) GetDefaultProfile() (rspapi.ResourceSigningProfile, error)

func (*RSPLoader) Load

func (self *RSPLoader) Load(doK8sApiCall bool) bool

func (*RSPLoader) MergeDefaultProfiles

func (self *RSPLoader) MergeDefaultProfiles(data []rspapi.ResourceSigningProfile) ([]rspapi.ResourceSigningProfile, error)

func (*RSPLoader) UpdateStatus

func (self *RSPLoader) UpdateStatus(rsp *rspapi.ResourceSigningProfile, reqc *common.ReqContext, errMsg string) error

type ResSigLoader

type ResSigLoader struct {
	Client *rsigclient.ApisV1alpha1Client
	Data   *rsigapi.ResourceSignatureList
	// contains filtered or unexported fields
}

func NewResSigLoader

func NewResSigLoader(signatureNamespace, requestNamespace string) *ResSigLoader

func (*ResSigLoader) GetData

func (self *ResSigLoader) GetData(reqc *common.ReqContext, doK8sApiCall bool) *rsigapi.ResourceSignatureList

func (*ResSigLoader) Load

func (self *ResSigLoader) Load(reqc *common.ReqContext, doK8sApiCall bool)

type RuleItem

type RuleItem struct {
	Profile          rspapi.ResourceSigningProfile `json:"profile,omitempty"`
	TargetNamespaces []string                      `json:"targetNamespaces,omitempty"`
}

type RuleTable

type RuleTable struct {
	Items             []RuleItem `json:"items,omitempty"`
	Namespaces        []string   `json:"namespaces,omitempty"`
	VerifierNamespace string     `json:"verifierNamespace,omitempty"`
}

func NewRuleTable

func NewRuleTable(profiles []rspapi.ResourceSigningProfile, namespaces []v1.Namespace, verifierNamespace string) *RuleTable

func (*RuleTable) CheckIfProtected

func (self *RuleTable) CheckIfProtected(reqFields map[string]string) (bool, bool, []rspapi.ResourceSigningProfile)

func (*RuleTable) CheckIfTargetNamespace

func (self *RuleTable) CheckIfTargetNamespace(nsName string) bool

func (*RuleTable) IsEmpty

func (self *RuleTable) IsEmpty() bool

type SignPolicyLoader

type SignPolicyLoader struct {
	Client *spolclient.ApisV1alpha1Client
	Data   *spolapi.SignPolicy
	// contains filtered or unexported fields
}

func NewSignPolicyLoader

func NewSignPolicyLoader(verifierNamespace string) *SignPolicyLoader

func (*SignPolicyLoader) GetData

func (self *SignPolicyLoader) GetData(doK8sApiCall bool) *spolapi.SignPolicy

func (*SignPolicyLoader) Load

func (self *SignPolicyLoader) Load(doK8sApiCall bool)

Jump to

Keyboard shortcuts

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