Documentation ¶
Index ¶
- Constants
- func BackendFactory(l logging.Logger, bf proxy.BackendFactory) proxy.BackendFactory
- func Middleware(l logging.Logger, config *xtraConfig) proxy.Middleware
- func ProxyFactory(l logging.Logger, pf proxy.Factory) proxy.FactoryFunc
- type Input
- type OpaRequest
- type OpaResponse
- type PermissionError
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 ¶
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
Click to show internal directories.
Click to hide internal directories.