Module: Smplkit::Audit::ForwarderType

Defined in:
lib/smplkit/audit/models.rb

Overview

Public-facing enum for SIEM streaming destination types.

Mirrors the ForwarderType enum the audit OpenAPI spec emits (ADR-047 §2.12). Customers pass these constants — or any string in VALUES — to the management forwarders surface. The wrapper validates membership before round-tripping to the wire.

Constant Summary collapse

HTTP =
"HTTP"
DATADOG =
"DATADOG"
SPLUNK_HEC =
"SPLUNK_HEC"
SUMO_LOGIC =
"SUMO_LOGIC"
NEW_RELIC =
"NEW_RELIC"
HONEYCOMB =
"HONEYCOMB"
ELASTIC =
"ELASTIC"
VALUES =
[HTTP, DATADOG, SPLUNK_HEC, SUMO_LOGIC, NEW_RELIC, HONEYCOMB, ELASTIC].freeze

Class Method Summary collapse

Class Method Details

.coerce(value) ⇒ Object

Raises:

  • (ArgumentError)


55
56
57
58
59
60
61
62
63
# File 'lib/smplkit/audit/models.rb', line 55

def self.coerce(value)
  return nil if value.nil?

  s = value.to_s
  return s if VALUES.include?(s)

  raise ArgumentError,
        "Unknown ForwarderType #{value.inspect}; expected one of #{VALUES.inspect}"
end