Documentation ¶
Index ¶
- Constants
- Variables
- func ConvertLabelsToString(labels map[string]string) string
- func ConvertStringToLabels(labelsStr string) map[string]string
- func ErrorDisplay(str string)
- func GetValueFromConfigJson(key string) (string, error)
- func IsSilent() bool
- func PrettyJson(data interface{}) ([]byte, error)
- func ProgressTextDisplay(str string)
- func ScanStartDisplay()
- func SetKeyValueInConfigJson(key string, value string) error
- func SetSilentMode(s bool)
- func StartSpinner()
- func StopSpinner()
- func StringInSlice(strSlice []string, str string) int
- func SuccessTextDisplay(str string)
- type ClusterConfig
- func (c *ClusterConfig) GenerateURL()
- func (c *ClusterConfig) GetCustomerGUID() string
- func (c *ClusterConfig) GetValueByKeyFromConfigMap(key string) (string, error)
- func (c *ClusterConfig) SetCustomerGUID() error
- func (c *ClusterConfig) SetKeyValueInConfigmap(key string, value string) error
- func (c *ClusterConfig) ToMapString() map[string]interface{}
- type ComponentConfig
- type ConfigObj
- type DownloadInfo
- type EmptyConfig
- type Exception
- type Getters
- type IClusterConfig
- type K8SResources
- type OPASessionObj
- type ScanInfo
Constants ¶
View Source
const (
ComponentIdentifier = "Posture"
)
View Source
const (
ConfigFileName = "config"
)
View Source
const ValueNotFound = -1
Variables ¶
View Source
var ( CustomerGUID = "" ClusterName = "" EventReceiverURL = "" NotificationServerURL = "" DashboardBackendURL = "" RestAPIPort = "4001" )
CA environment vars
View Source
var InfoDisplay = color.New(color.Bold, color.FgHiYellow).FprintfFunc()
View Source
var InfoTextDisplay = color.New(color.Faint, color.FgHiYellow).FprintfFunc()
View Source
var Spinner *spinner.Spinner
Functions ¶
func ConvertLabelsToString ¶
func ConvertStringToLabels ¶
ConvertStringToLabels convert a string "a=b;c=d" to map: {"a":"b", "c":"d"}
func ErrorDisplay ¶
func ErrorDisplay(str string)
func GetValueFromConfigJson ¶ added in v1.0.47
func PrettyJson ¶ added in v1.0.37
func ProgressTextDisplay ¶
func ProgressTextDisplay(str string)
func ScanStartDisplay ¶
func ScanStartDisplay()
func SetKeyValueInConfigJson ¶ added in v1.0.47
func SetSilentMode ¶
func SetSilentMode(s bool)
func StartSpinner ¶
func StartSpinner()
func StopSpinner ¶
func StopSpinner()
func StringInSlice ¶
func SuccessTextDisplay ¶
func SuccessTextDisplay(str string)
Types ¶
type ClusterConfig ¶ added in v1.0.42
type ClusterConfig struct {
// contains filtered or unexported fields
}
func NewClusterConfig ¶ added in v1.0.42
func NewClusterConfig(k8s *k8sinterface.KubernetesApi, armoAPI *getter.ArmoAPI) *ClusterConfig
func (*ClusterConfig) GenerateURL ¶ added in v1.0.42
func (c *ClusterConfig) GenerateURL()
func (*ClusterConfig) GetCustomerGUID ¶ added in v1.0.42
func (c *ClusterConfig) GetCustomerGUID() string
func (*ClusterConfig) GetValueByKeyFromConfigMap ¶ added in v1.0.47
func (c *ClusterConfig) GetValueByKeyFromConfigMap(key string) (string, error)
func (*ClusterConfig) SetCustomerGUID ¶ added in v1.0.42
func (c *ClusterConfig) SetCustomerGUID() error
func (*ClusterConfig) SetKeyValueInConfigmap ¶ added in v1.0.47
func (c *ClusterConfig) SetKeyValueInConfigmap(key string, value string) error
func (*ClusterConfig) ToMapString ¶ added in v1.0.42
func (c *ClusterConfig) ToMapString() map[string]interface{}
type ComponentConfig ¶
type ComponentConfig struct {
Exceptions Exception `json:"exceptions"`
}
type ConfigObj ¶ added in v1.0.42
type DownloadInfo ¶ added in v1.0.35
type EmptyConfig ¶ added in v1.0.44
type EmptyConfig struct { }
func NewEmptyConfig ¶ added in v1.0.44
func NewEmptyConfig() *EmptyConfig
func (*EmptyConfig) GenerateURL ¶ added in v1.0.44
func (c *EmptyConfig) GenerateURL()
func (*EmptyConfig) GetCustomerGUID ¶ added in v1.0.44
func (c *EmptyConfig) GetCustomerGUID() string
func (*EmptyConfig) SetCustomerGUID ¶ added in v1.0.44
func (c *EmptyConfig) SetCustomerGUID() error
type Exception ¶
type Exception struct { Ignore *bool `json:"ignore"` // ignore test results MultipleScore *opapolicy.AlertScore `json:"multipleScore"` // MultipleScore number - float32 Namespaces []string `json:"namespaces"` Regex string `json:"regex"` // not supported }
type Getters ¶ added in v1.0.36
type Getters struct { ExceptionsGetter getter.IExceptionsGetter PolicyGetter getter.IPolicyGetter }
type IClusterConfig ¶ added in v1.0.42
type K8SResources ¶
type K8SResources map[string]interface{}
K8SResources map[<api group>/<api version>/<resource>]<resource object>
type OPASessionObj ¶
type OPASessionObj struct { Frameworks []opapolicy.Framework K8SResources *K8SResources Exceptions []armotypes.PostureExceptionPolicy PostureReport *opapolicy.PostureReport }
func NewOPASessionObj ¶
func NewOPASessionObj(frameworks []opapolicy.Framework, k8sResources *K8SResources) *OPASessionObj
func NewOPASessionObjMock ¶
func NewOPASessionObjMock() *OPASessionObj
type ScanInfo ¶ added in v1.0.35
type ScanInfo struct { Getters PolicyIdentifier opapolicy.PolicyIdentifier UseExceptions string UseFrom string UseDefault bool Format string Output string ExcludedNamespaces string InputPatterns []string Silent bool FailThreshold uint16 DoNotSendResults bool }
func (*ScanInfo) ScanRunningCluster ¶ added in v1.0.35
Source Files ¶
Click to show internal directories.
Click to hide internal directories.