Documentation ¶
Index ¶
- Constants
- Variables
- func DigestAttributesDesignator(attributes map[string]string) (string, string, map[string]string)
- func DigestPortalDesignator(designator *PortalDesignator) (string, string, map[string]string)
- type DesignatorType
- type EnforcementsRule
- type ExecutionPolicy
- type PortalBase
- type PortalDesignator
- func (designator *PortalDesignator) DigestAttributesDesignator() (string, string, string, string, map[string]string)
- func (designator *PortalDesignator) DigestPortalDesignator() (string, string, string, string, map[string]string)
- func (designator *PortalDesignator) GetCluster() string
- func (designator *PortalDesignator) GetKind() string
- func (designator *PortalDesignator) GetLabels() map[string]string
- func (designator *PortalDesignator) GetName() string
- func (designator *PortalDesignator) GetNamespace() string
- type PostureExceptionPolicy
- type PostureExceptionPolicyActions
- type PosturePolicy
Constants ¶
View Source
const ( CostumerGuidQuery = "costumerGUID" ClusterNameQuery = "cluster" DatacenterNameQuery = "datacenter" NamespaceQuery = "namespace" ProjectQuery = "project" WlidQuery = "wlid" SidQuery = "sid" )
View Source
const ( AttributeCluster = "cluster" AttributeNamespace = "namespace" AttributeKind = "kind" AttributeName = "name" )
attributes
Variables ¶
View Source
var IgnoreLabels = []string{AttributeCluster, AttributeNamespace}
Functions ¶
func DigestPortalDesignator ¶
func DigestPortalDesignator(designator *PortalDesignator) (string, string, map[string]string)
DigestPortalDesignator DEPRECATED. use designator.DigestPortalDesignator() - get cluster namespace and labels from designator
Types ¶
type DesignatorType ¶
type DesignatorType string
const ( DesignatorAttributes DesignatorType = "Attributes" DesignatorAttribute DesignatorType = "Attribute" // Deprecated /* WorkloadID format. k8s format: wlid://cluster-<cluster>/namespace-<namespace>/<kind>-<name> native format: wlid://datacenter-<datacenter>/project-<project>/native-<name> */ DesignatorWlid DesignatorType = "Wlid" /* Wild card - subset of wlid. e.g. 1. Include cluster: wlid://cluster-<cluster>/ 2. Include cluster and namespace (filter out all other namespaces): wlid://cluster-<cluster>/namespace-<namespace>/ */ DesignatorWildWlid DesignatorType = "WildWlid" DesignatorWlidContainer DesignatorType = "WlidContainer" DesignatorWlidProcess DesignatorType = "WlidProcess" DesignatorSid DesignatorType = "Sid" // secret id )
Supported designators
type EnforcementsRule ¶ added in v1.0.36
type ExecutionPolicy ¶
type ExecutionPolicy struct { PortalBase `json:",inline"` Designators []PortalDesignator `json:"designators"` PolicyType string `json:"policyType"` CreationTime string `json:"creation_time"` ExecutionEnforcementsRule []EnforcementsRule `json:"enforcementRules"` }
type PortalBase ¶
type PortalBase struct { GUID string `json:"guid"` Name string `json:"name"` Attributes map[string]interface{} `json:"attributes,omitempty"` // could be string }
PortalBase holds basic items data from portal BE
func MockPortalBase ¶
func MockPortalBase(customerGUID, name string, attributes map[string]interface{}) *PortalBase
type PortalDesignator ¶
type PortalDesignator struct { DesignatorType DesignatorType `json:"designatorType"` WLID string `json:"wlid"` WildWLID string `json:"wildwlid"` SID string `json:"sid"` Attributes map[string]string `json:"attributes"` }
PortalDesignator represented single designation options
func (*PortalDesignator) DigestAttributesDesignator ¶ added in v1.0.36
func (*PortalDesignator) DigestPortalDesignator ¶ added in v1.0.36
func (designator *PortalDesignator) DigestPortalDesignator() (string, string, string, string, map[string]string)
DigestPortalDesignator - get cluster namespace and labels from designator
func (*PortalDesignator) GetCluster ¶ added in v1.0.36
func (designator *PortalDesignator) GetCluster() string
func (*PortalDesignator) GetKind ¶ added in v1.0.36
func (designator *PortalDesignator) GetKind() string
func (*PortalDesignator) GetLabels ¶ added in v1.0.36
func (designator *PortalDesignator) GetLabels() map[string]string
func (*PortalDesignator) GetName ¶ added in v1.0.36
func (designator *PortalDesignator) GetName() string
func (*PortalDesignator) GetNamespace ¶ added in v1.0.36
func (designator *PortalDesignator) GetNamespace() string
type PostureExceptionPolicy ¶ added in v1.0.36
type PostureExceptionPolicy struct { PortalBase `json:",inline"` PolicyType string `json:"policyType"` CreationTime string `json:"creationTime"` Actions []PostureExceptionPolicyActions `json:"actions"` Resources []PortalDesignator `json:"resources"` PosturePolicies []PosturePolicy `json:"posturePolicies"` }
func (*PostureExceptionPolicy) IsAlertOnly ¶ added in v1.0.36
func (exceptionPolicy *PostureExceptionPolicy) IsAlertOnly() bool
func (*PostureExceptionPolicy) IsDisable ¶ added in v1.0.36
func (exceptionPolicy *PostureExceptionPolicy) IsDisable() bool
type PostureExceptionPolicyActions ¶ added in v1.0.36
type PostureExceptionPolicyActions string
const AlertOnly PostureExceptionPolicyActions = "alertOnly"
const Disable PostureExceptionPolicyActions = "disable"
type PosturePolicy ¶ added in v1.0.36
Click to show internal directories.
Click to hide internal directories.