Module: Smplkit::Audit::ForwarderType
- Defined in:
- lib/smplkit/audit/forwarders.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 Smplkit::Audit::Forwarders#create / Smplkit::Audit::Forwarders#update / Smplkit::Audit::Forwarders#list. 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 =
Every supported value, in spec order. Useful for membership checks, dropdown population, or test parametrization.
[HTTP, DATADOG, SPLUNK_HEC, SUMO_LOGIC, NEW_RELIC, HONEYCOMB, ELASTIC].freeze
Class Method Summary collapse
-
.coerce(value) ⇒ Object
Coerce
valueto a known wire-format slug, or raise ArgumentError.
Class Method Details
.coerce(value) ⇒ Object
Coerce value to a known wire-format slug, or raise ArgumentError. Strings round-trip transparently; nil passes through.
27 28 29 30 31 32 33 34 35 |
# File 'lib/smplkit/audit/forwarders.rb', line 27 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 |