opa

package
v1.0.0-alpha1 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2022 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildChecksTree added in v0.4.0

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

BuildChecksTree 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 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

func SyncOPAChecks added in v0.4.0

func SyncOPAChecks(syncDir, org, insightsToken, host string, fullsync, dryrun bool) error

SyncOPAChecks syncs OPA checks

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, fullsync 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