opa

package
v1.18.0 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Attributes added in v1.7.0

type Attributes struct {
	Request *Request `json:"request"`
}

type Client

type Client struct {
	*httpclient.Client
	// contains filtered or unexported fields
}

func New

func New(host string) *Client

func NewDefault

func NewDefault() *Client

func (*Client) Evaluate

func (c *Client) Evaluate(query string, result interface{}, ig InputGenerator) error

Evaluate evaluates the query with the given input and return a json response which has a field called "result"

type HTTPSpec added in v1.7.0

type HTTPSpec struct {
	Method  string            `json:"method"`
	Headers map[string]string `json:"headers"`
}

type Input added in v1.7.0

type Input struct {
	ParsedQuery *ParseQuery `json:"parsed_query"`
	ParsedPath  []string    `json:"parsed_path"`
	Attributes  *Attributes `json:"attributes"`
}

type InputGenerator added in v1.7.0

type InputGenerator func() (*Input, error)

type ParseQuery added in v1.7.0

type ParseQuery struct {
	ProjectName []string `json:"projectName"`
}

type Request added in v1.7.0

type Request struct {
	HTTP *HTTPSpec `json:"http"`
}

Jump to

Keyboard shortcuts

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