getter

package
v1.0.42 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ArmoBEURL = "eggdashbe.eudev3.cyberarmorsoft.com"
	ArmoERURL = "report.eudev3.cyberarmorsoft.com"
	ArmoFEURL = "armoui.eudev3.cyberarmorsoft.com"
)
View Source
const DefaultLocalStore = ".kubescape"

======================================================================================================================= ============================================== LoadPolicy ============================================================= =======================================================================================================================

Variables

This section is empty.

Functions

func GetDefaultPath

func GetDefaultPath(name string) string

func HttpGetter

func HttpGetter(httpClient *http.Client, fullURL string) (string, error)

func JSONDecoder

func JSONDecoder(origin string) *json.Decoder

JSONDecoder returns JSON decoder for given string

func SaveFrameworkInFile

func SaveFrameworkInFile(framework *opapolicy.Framework, path string) error

Types

type ArmoAPI

type ArmoAPI struct {
	// contains filtered or unexported fields
}

Armo API for downloading policies

func NewArmoAPI

func NewArmoAPI() *ArmoAPI

func (*ArmoAPI) GetCustomerGUID added in v1.0.42

func (armoAPI *ArmoAPI) GetCustomerGUID() (*TenantResponse, error)

func (*ArmoAPI) GetExceptions added in v1.0.36

func (armoAPI *ArmoAPI) GetExceptions(customerGUID, clusterName string) ([]armotypes.PostureExceptionPolicy, error)

func (*ArmoAPI) GetFramework

func (armoAPI *ArmoAPI) GetFramework(name string) (*opapolicy.Framework, error)

type DownloadReleasedPolicy

type DownloadReleasedPolicy struct {
	// contains filtered or unexported fields
}

Download released version

func NewDownloadReleasedPolicy

func NewDownloadReleasedPolicy() *DownloadReleasedPolicy

func (*DownloadReleasedPolicy) GetExceptions added in v1.0.36

func (drp *DownloadReleasedPolicy) GetExceptions(customerGUID, clusterName string) ([]armotypes.PostureExceptionPolicy, error)

func (*DownloadReleasedPolicy) GetFramework

func (drp *DownloadReleasedPolicy) GetFramework(name string) (*opapolicy.Framework, error)

type IPolicyGetter

type IPolicyGetter interface {
	GetFramework(name string) (*opapolicy.Framework, error)
	GetExceptions(customerGUID, clusterName string) ([]armotypes.PostureExceptionPolicy, error)
}

type LoadPolicy

type LoadPolicy struct {
	// contains filtered or unexported fields
}

Load policies from a local repository

func NewLoadPolicy

func NewLoadPolicy(filePath string) *LoadPolicy

func (*LoadPolicy) GetExceptions added in v1.0.36

func (lp *LoadPolicy) GetExceptions(customerGUID, clusterName string) ([]armotypes.PostureExceptionPolicy, error)

func (*LoadPolicy) GetFramework

func (lp *LoadPolicy) GetFramework(frameworkName string) (*opapolicy.Framework, error)

type TenantResponse added in v1.0.42

type TenantResponse struct {
	TenantID string `json:"tenantId"`
	Token    string `json:"token"`
	Expires  string `json:"expires"`
}

Jump to

Keyboard shortcuts

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