policies

package
v0.7.19 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ErrPrepareForEvalCode = "meshkit-11144"
	ErrEvalCode           = "meshkit-11145"
)

Variables

This section is empty.

Functions

func ErrEval

func ErrEval(err error) error

func ErrPrepareForEval

func ErrPrepareForEval(err error) error

Types

type NetworkPolicyRegoResponse

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

type Rego

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

func NewRegoInstance

func NewRegoInstance(policyDir string, regManager *registry.RegistryManager) (*Rego, error)

func (*Rego) RegoPolicyHandler

func (r *Rego) RegoPolicyHandler(regoQueryString string, designFile []byte) (interface{}, error)

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

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