kropa

package module
v0.0.0-...-5181be0 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2020 License: MIT Imports: 10 Imported by: 0

README

kropa

Krakend plugin open policy agent integration

Documentation

Index

Constants

View Source
const Namespace = "github_com/zean00/kropa"

Variables

This section is empty.

Functions

func BackendFactory

func BackendFactory(l logging.Logger, bf proxy.BackendFactory) proxy.BackendFactory

BackendFactory create backend factory

func Middleware

func Middleware(l logging.Logger, config *xtraConfig) proxy.Middleware

Middleware create backend middleware

func ProxyFactory

func ProxyFactory(l logging.Logger, pf proxy.Factory) proxy.FactoryFunc

ProxyFactory creates an proxy factory over the injected one adding a JSON Schema validator middleware to the pipe when required

Types

type Input

type Input struct {
	Method  string      `json:"method,omitempty" mapstructure:"method"`
	Path    []string    `json:"path,omitempty" mapstructure:"path"`
	Token   string      `json:"token,omitempty" mapstructure:"token"`
	Payload interface{} `json:"payload,omitempty" mapstructure:"payload"`
}

Input opa input model

type OpaRequest

type OpaRequest struct {
	Input Input `json:"input,omitempty" mapstructure:"input"`
}

OpaRequest opa request model

type OpaResponse

type OpaResponse struct {
	Result bool `json:"result,omitempty" mapstructure:"result"`
}

OpaResponse opa response model

type PermissionError

type PermissionError struct {
}

PermissionError error permission

func (*PermissionError) Error

func (p *PermissionError) Error() string

func (*PermissionError) StatusCode

func (p *PermissionError) StatusCode() int

StatusCode error status code

Jump to

Keyboard shortcuts

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