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

Class Method Details

.coerce(value) ⇒ Object

Coerce value to a known wire-format slug, or raise ArgumentError. Strings round-trip transparently; nil passes through.

Raises:

  • (ArgumentError)


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