api

package
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2019 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PutEvent = "PUT"
)

List of possible events executed against a ruleset.

Variables

This section is empty.

Functions

This section is empty.

Types

type Error

type Error struct {
	Err      string         `json:"error"`
	Response *http.Response `json:"-"` // Used by clients to return the original server response
}

Error is a generic error response.

func (Error) Error

func (e Error) Error() string

type EvalResult

type EvalResult struct {
	Value   *rule.Value `json:"value"`
	Version string      `json:"version"`
}

EvalResult is the response sent to the client after an eval.

type Event

type Event struct {
	Type    string          `json:"type"`
	Path    string          `json:"path"`
	Version string          `json:"version"`
	Ruleset *regula.Ruleset `json:"ruleset"`
}

Event describes an event occured on a ruleset.

type Events

type Events struct {
	Events   []Event `json:"events,omitempty"`
	Revision string  `json:"revision,omitempty"`
	Timeout  bool    `json:"timeout,omitempty"`
}

Events holds a list of events occured on a group of rulesets.

type Ruleset

type Ruleset struct {
	Path    string          `json:"path"`
	Version string          `json:"version"`
	Ruleset *regula.Ruleset `json:"ruleset"`
}

Ruleset holds a ruleset and its metadata.

type Rulesets

type Rulesets struct {
	Rulesets []Ruleset `json:"rulesets"`
	Revision string    `json:"revision"`
	Continue string    `json:"continue,omitempty"`
}

Rulesets holds a list of rulesets.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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