opafilter

package
v2.7.3 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package opafilter implements OpenPolicyAgent function.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OPAFilter

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

OPAFilter is the filter for OpenPolicyAgent.

func (*OPAFilter) Close

func (o *OPAFilter) Close()

Close closes the filter instance.

func (*OPAFilter) Handle

func (o *OPAFilter) Handle(ctx *context.Context) (result string)

Handle handles the request.

func (*OPAFilter) Inherit

func (o *OPAFilter) Inherit(previousGeneration filters.Filter)

Inherit inherits previous generation of filter instance.

func (*OPAFilter) Init

func (o *OPAFilter) Init()

Init initialize the filter instance.

func (*OPAFilter) Kind

func (o *OPAFilter) Kind() *filters.Kind

Kind returns the kind of the OPAFilter filter instance.

func (*OPAFilter) Name

func (o *OPAFilter) Name() string

Name returns the name of the OPAFilter filter instance.

func (*OPAFilter) Spec

func (o *OPAFilter) Spec() filters.Spec

Spec returns the spec of the OPAFilter filter instance.

func (*OPAFilter) Status

func (o *OPAFilter) Status() interface{}

Status returns the status of the filter instance.

type Spec

type Spec struct {
	filters.BaseSpec `yaml:",inline"`
	DefaultStatus    int    `yaml:"defaultStatus"`
	IncludedHeaders  string `yaml:"includedHeaders"`
	ReadBody         bool   `yaml:"readBody"`
	Policy           string `yaml:"policy"`
}

Spec is the spec of the OPAFilter.

Jump to

Keyboard shortcuts

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