getter

package
v1.0.127 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2021 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

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 SaveControlInFile added in v1.0.84

func SaveControlInFile(control *reporthandling.Control, pathStr string) error

Save control as json in file

func SaveFrameworkInFile

func SaveFrameworkInFile(framework *reporthandling.Framework, pathStr string) error

func SetARMOAPIConnector added in v1.0.78

func SetARMOAPIConnector(armoAPI *ArmoAPI)

Types

type ArmoAPI

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

Armo API for downloading policies

func GetArmoAPIConnector added in v1.0.78

func GetArmoAPIConnector() *ArmoAPI

func NewARMOAPICustomized added in v1.0.78

func NewARMOAPICustomized(armoERURL, armoBEURL, armoFEURL string) *ArmoAPI

func NewARMOAPIDev added in v1.0.78

func NewARMOAPIDev() *ArmoAPI

func NewARMOAPIProd added in v1.0.78

func NewARMOAPIProd() *ArmoAPI

func (*ArmoAPI) GetCustomerGUID added in v1.0.42

func (armoAPI *ArmoAPI) GetCustomerGUID(customerGUID string) (*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) (*reporthandling.Framework, error)

func (*ArmoAPI) GetFrontendURL added in v1.0.78

func (armoAPI *ArmoAPI) GetFrontendURL() string

func (*ArmoAPI) GetReportReceiverURL added in v1.0.78

func (armoAPI *ArmoAPI) GetReportReceiverURL() string

type DownloadReleasedPolicy

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

Download released version

func NewDownloadReleasedPolicy

func NewDownloadReleasedPolicy() *DownloadReleasedPolicy

func (*DownloadReleasedPolicy) GetControl added in v1.0.84

func (drp *DownloadReleasedPolicy) GetControl(policyName string) (*reporthandling.Control, error)

Return control per name/id using ARMO api

func (*DownloadReleasedPolicy) GetFramework

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

type IBackend added in v1.0.65

type IBackend interface {
	GetCustomerGUID(customerGUID string) (*TenantResponse, error)
}

type IExceptionsGetter added in v1.0.44

type IExceptionsGetter interface {
	GetExceptions(customerGUID, clusterName string) ([]armotypes.PostureExceptionPolicy, error)
}

type IPolicyGetter

type IPolicyGetter interface {
	GetFramework(name string) (*reporthandling.Framework, error)
	GetControl(policyName string) (*reporthandling.Control, 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) GetControl added in v1.0.84

func (lp *LoadPolicy) GetControl(controlName string) (*reporthandling.Control, error)

Return control from file

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) (*reporthandling.Framework, error)

type TenantResponse added in v1.0.42

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

Jump to

Keyboard shortcuts

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