envoy

package
v0.21.195 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2024 License: Apache-2.0, MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const PluginName = "envoy_ext_authz_grpc"

PluginName is the name to register with the OPA plugin manager

Variables

This section is empty.

Functions

func AdaptToExtAuthRequest

func AdaptToExtAuthRequest(req *http.Request, metadata *ext_authz_v3_core.Metadata, contextExtensions map[string]string, rawBody []byte) (*ext_authz_v3.CheckRequest, error)

Types

type Factory

type Factory struct{}

Factory defines the interface OPA uses to instantiate a plugin.

func (Factory) New

func (Factory) New(m *plugins.Manager, cfg interface{}) plugins.Plugin

New returns the object initialized with a valid plugin configuration.

func (Factory) Validate

func (Factory) Validate(m *plugins.Manager, bs []byte) (interface{}, error)

Validate returns a valid configuration to instantiate the plugin.

type Plugin

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

func (*Plugin) GetConfig

func (p *Plugin) GetConfig() PluginConfig

func (*Plugin) ParsedQuery

func (p *Plugin) ParsedQuery() ast.Body

func (*Plugin) Path

func (p *Plugin) Path() string

func (*Plugin) Reconfigure

func (p *Plugin) Reconfigure(ctx context.Context, config interface{})

func (*Plugin) Start

func (p *Plugin) Start(ctx context.Context) error

func (*Plugin) Stop

func (p *Plugin) Stop(ctx context.Context)

type PluginConfig

type PluginConfig struct {
	Path                 string `json:"path"`
	DryRun               bool   `json:"dry-run"`
	SkipRequestBodyParse bool   `json:"skip-request-body-parse"`

	ParsedQuery ast.Body
}

PluginConfig represents the plugin configuration.

func (*PluginConfig) ParseQuery

func (cfg *PluginConfig) ParseQuery() error

Jump to

Keyboard shortcuts

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