Documentation ¶
Index ¶
- func AddOPAChecksBranch(org, token, hostName string, tree treeprint.Tree) error
- func DeleteCheck(check models.CustomCheckModel, org, token, hostName string) error
- func DeleteInstance(instance models.CustomCheckInstanceModel, org, token, hostName string) error
- func GetChecks(org, token, hostName string) ([]opaPlugin.OPACustomCheck, error)
- func GetInstances(org, checkName, token, hostName string) ([]opaPlugin.CheckSetting, error)
- func PushOPAChecks(pushDir, org, insightsToken, host string, deleteMissing, dryrun bool) error
- func PutCheck(check models.CustomCheckModel, org, token, hostName string) error
- func PutInstance(instance models.CustomCheckInstanceModel, org, token, hostName string) error
- type CompareResults
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddOPAChecksBranch ¶ added in v1.2.0
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
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.