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 EnforcmentsRule
- type ExecutionPolicy
- type PortalBase
- type PortalDesignator
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" )
attributes
Variables ¶
View Source
var IgnoreLabels = []string{AttributeCluster, AttributeNamespace}
Functions ¶
func DigestPortalDesignator ¶
func DigestPortalDesignator(designator *PortalDesignator) (string, string, map[string]string)
DigestPortalDesignator - get cluster namespace and labels from designator
Types ¶
type DesignatorType ¶
type DesignatorType string
const ( DesignatorAttributes DesignatorType = "Attributes" /* 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 EnforcmentsRule ¶
type ExecutionPolicy ¶
type ExecutionPolicy struct { PortalBase `json:",inline"` Designators []PortalDesignator `json:"designators"` PolicyType string `json:"policyType"` CreationTime string `json:"creation_time"` ExecutionEnforcmentsRules []EnforcmentsRule `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
Click to show internal directories.
Click to hide internal directories.