internal

package
v0.61.0-envoy Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2024 License: Apache-2.0 Imports: 43 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// StartCheckErr error code returned when unable to start new execution
	StartCheckErr string = "start_check_error"

	// StartTxnErr error code returned when unable to start new storage transaction
	StartTxnErr string = "start_txn_error"

	// RequestParseErr error code returned when unable to parse protobuf request to input map
	RequestParseErr string = "request_parse_error"

	// CheckRequestTimeoutErr error code returned when context deadline exceeds before eval
	CheckRequestTimeoutErr string = "check_request_timeout"

	// InputParseErr error code returned when unable to convert input map to ast value
	InputParseErr string = "input_parse_error"

	// EnvoyAuthEvalErr error code returned when auth eval fails
	EnvoyAuthEvalErr string = "envoyauth_eval_error"

	// EnvoyAuthResultErr error code returned when error in fetching result from auth eval
	EnvoyAuthResultErr string = "envoyauth_result_error"
)
View Source
const (

	// PluginName is the name to register with the OPA plugin manager
	PluginName = "envoy_ext_authz_grpc"
)

Variables

This section is empty.

Functions

func New

func New(m *plugins.Manager, cfg *Config) plugins.Plugin

New returns a Plugin that implements the Envoy ext_authz API.

Types

type Config

type Config struct {
	Addr             string `json:"addr"`
	Query            string `json:"query"` // Deprecated: Use Path instead
	Path             string `json:"path"`
	DryRun           bool   `json:"dry-run"`
	EnableReflection bool   `json:"enable-reflection"`

	ProtoDescriptor string `json:"proto-descriptor"`

	GRPCMaxRecvMsgSize       int  `json:"grpc-max-recv-msg-size"`
	GRPCMaxSendMsgSize       int  `json:"grpc-max-send-msg-size"`
	SkipRequestBodyParse     bool `json:"skip-request-body-parse"`
	EnablePerformanceMetrics bool `json:"enable-performance-metrics"`
	// contains filtered or unexported fields
}

Config represents the plugin configuration.

func Validate

func Validate(m *plugins.Manager, bs []byte) (*Config, error)

Validate receives a slice of bytes representing the plugin's configuration and returns a configuration value that can be used to instantiate the plugin.

type Error

type Error struct {
	Code string `json:"code"`
	// contains filtered or unexported fields
}

Error is the error type returned by the internal check function

func (*Error) Error

func (e *Error) Error() string

Error allows converting internal Error to string type

func (*Error) Is

func (e *Error) Is(target error) bool

Is allows matching internal errors using errors.Is

func (*Error) Unwrap

func (e *Error) Unwrap() error

Unwrap gets error wrapped in the internal error

func (*Error) Wrap

func (e *Error) Wrap(err error) *Error

Wrap wraps error as an internal error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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