Sprites.Policy.Rule (Sprites v0.2.0)

View Source

Network policy rule.

Fields

  • :domain - Domain to match (e.g., "example.com")
  • :action - Action to take: "allow" or "deny"
  • :include - Optional include pattern for wildcard matching

Summary

Functions

Creates a rule from a map.

Converts a rule to a map for JSON encoding.

Types

t()

@type t() :: %Sprites.Policy.Rule{
  action: String.t() | nil,
  domain: String.t() | nil,
  include: String.t() | nil
}

Functions

from_map(map)

@spec from_map(map()) :: t()

Creates a rule from a map.

to_map(rule)

@spec to_map(t()) :: map()

Converts a rule to a map for JSON encoding.