Crate bulwark_sdk

source ·
Expand description

This crate provides the logic for Bulwark’s guest environment.

Re-exports§

Modules§

Macros§

  • Construct an ad-hoc error from a string or existing non-anyhow error value.
  • Construct a serde_json::Value from a JSON literal.

Structs§

  • A Decision represents evidence in favor of either accepting or restricting an operation under consideration.
  • A type map of protocol extensions.
  • A HandlerOutput represents a decision and associated output for a single handler within a single detection.
  • Represents a JSON key/value type.
  • The Request Method (VERB)
  • An HTTP status code (status-code in RFC 7230 et al.).
  • The URI component of a request.
  • A Verdict represents a combined decision across multiple detections.
  • Represents a version of the HTTP spec.

Enums§

  • Represents a value from a continuous range taken from the pignistic transformation as a category that can be used to select a response to an operation.
  • Returned when an attempt to parse a counter within a plugin environment fails.
  • Returned when there is an issue with the remote state requested by the plugin.
  • Returned when a threshold is either out-of-order or out-of-range.
  • Represents any valid JSON value.

Constants§

  • A decision representing acceptance with full certainty.
  • A decision representing restriction with full certainty.
  • A decision representing full uncertainty.

Functions§

  • Returns the true remote client IP address.
  • Returns all of the plugin’s configuration key names.
  • Returns a named plugin configuration value as a Value.

Type Aliases§

  • A type alias. See bytes::Bytes for details.
  • Generic error
  • An HTTP request combines a head consisting of a Method, Uri, and headers with Bytes, which provides access to the first chunk of a request body.
  • An HTTP response combines a head consisting of a StatusCode and headers with Bytes, which provides access to the first chunk of a response body.

Attribute Macros§

  • The bulwark_plugin attribute generates default implementations for all handler traits in a module and produces friendly errors for common mistakes.