opa

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2023 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddOPAChecksBranch added in v1.2.0

func AddOPAChecksBranch(org, token, hostName string, tree treeprint.Tree) error

AddOPAChecksBranch builds the tree for OPA checks

func DeleteCheck added in v0.4.0

func DeleteCheck(check models.CustomCheckModel, org, token, hostName string) error

DeleteCheck deletes an OPA Check from Fairwinds Insights

func DeleteInstance added in v0.4.0

func DeleteInstance(instance models.CustomCheckInstanceModel, org, token, hostName string) error

DeleteInstance deletes an Instance from Fairwinds Insights

func GetChecks added in v0.4.0

func GetChecks(org, token, hostName string) ([]opaPlugin.OPACustomCheck, error)

GetChecks queries Fairwinds Insights to retrieve all of the Checks for an organization

func GetInstances added in v0.4.0

func GetInstances(org, checkName, token, hostName string) ([]opaPlugin.CheckSetting, error)

GetInstances queries Fairwinds Insights to retrieve all of the instances for a given check

func PushOPAChecks added in v1.0.0

func PushOPAChecks(pushDir, org, insightsToken, host string, deleteMissing, dryrun bool) error

PushOPAChecks pushes OPA checks to Insights.

func PutCheck added in v0.4.0

func PutCheck(check models.CustomCheckModel, org, token, hostName string) error

PutCheck upserts an OPA Check to Fairwinds Insights

func PutInstance added in v0.4.0

func PutInstance(instance models.CustomCheckInstanceModel, org, token, hostName string) error

PutInstance upserts an Instance to Fairwinds Insights

Types

type CompareResults

type CompareResults struct {
	CheckInsert    []models.CustomCheckModel
	CheckUpdate    []models.CustomCheckModel
	CheckDelete    []models.CustomCheckModel
	InstanceInsert []models.CustomCheckInstanceModel
	InstanceUpdate []models.CustomCheckInstanceModel
	InstanceDelete []models.CustomCheckInstanceModel
}

CompareResults shows the results of a comparison between what's present in the API and what's in a folder

func CompareChecks

func CompareChecks(folder, org, token, hostName string, deleteMissing bool) (CompareResults, error)

CompareChecks compares a folder vs the checks returned by the API.

Jump to

Keyboard shortcuts

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