policies

package
v0.6.45 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegoPolicyHandler

func RegoPolicyHandler(ctx context.Context, policyDir []string, regoQueryString string, designFile []byte) (map[string]interface{}, error)

RegoPolicyHandler takes the required inputs and run the query against all the policy files provided

Types

type NetworkPolicyRegoResponse

type NetworkPolicyRegoResponse struct {
	ServicePodRelationships        []RelationObject `json:"service_pod_relationships,omitempty"`
	ServiceDeploymentRelationships []RelationObject `json:"service_deployment_relationships,omitempty"`
}

type RegoPolicy

type RegoPolicy struct {
	Rules string `json:"rules"`
}

Define a simple policy struct

type RelationObject

type RelationObject struct {
	DestinationID   string                 `json:"destination_id,omitempty"`
	DestinationName string                 `json:"destination_name,omitempty"`
	SourceId        string                 `json:"source_id,omitempty"`
	SourceName      string                 `json:"source_name,omitempty"`
	Port            map[string]interface{} `json:"port,omitempty"`
}

Jump to

Keyboard shortcuts

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