Class: Datadog::AppSec::Configuration::DSL
- Inherits:
-
Object
- Object
- Datadog::AppSec::Configuration::DSL
- Defined in:
- lib/datadog/appsec/configuration.rb
Overview
Configuration DSL implementation
Constant Summary collapse
- Instrument =
Struct constant whisker cast for Steep
_ = Struct.new(:name, :options)
Instance Attribute Summary collapse
-
#instruments ⇒ Object
readonly
Returns the value of attribute instruments.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Instance Method Summary collapse
- #[](key) ⇒ Object
- #enabled=(value) ⇒ Object
-
#initialize ⇒ DSL
constructor
A new instance of DSL.
- #instrument(name, options = {}) ⇒ Object
- #ip_denylist=(value) ⇒ Object
- #obfuscator_key_regex=(value) ⇒ Object
- #obfuscator_value_regex=(value) ⇒ Object
- #ruleset=(value) ⇒ Object
- #trace_rate_limit=(value) ⇒ Object
- #user_id_denylist=(value) ⇒ Object
- #waf_debug=(value) ⇒ Object
-
#waf_timeout=(value) ⇒ Object
in microseconds.
Constructor Details
#initialize ⇒ DSL
Returns a new instance of DSL.
20 21 22 23 |
# File 'lib/datadog/appsec/configuration.rb', line 20 def initialize @instruments = [] @options = {} end |
Instance Attribute Details
#instruments ⇒ Object (readonly)
Returns the value of attribute instruments.
25 26 27 |
# File 'lib/datadog/appsec/configuration.rb', line 25 def instruments @instruments end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
25 26 27 |
# File 'lib/datadog/appsec/configuration.rb', line 25 def @options end |
Instance Method Details
#[](key) ⇒ Object
68 69 70 71 72 |
# File 'lib/datadog/appsec/configuration.rb', line 68 def [](key) found = @instruments.find { |e| e.name == key } found. if found end |
#enabled=(value) ⇒ Object
31 32 33 |
# File 'lib/datadog/appsec/configuration.rb', line 31 def enabled=(value) [:enabled] = value end |
#instrument(name, options = {}) ⇒ Object
27 28 29 |
# File 'lib/datadog/appsec/configuration.rb', line 27 def instrument(name, = {}) @instruments << Instrument.new(name, ) end |
#ip_denylist=(value) ⇒ Object
39 40 41 |
# File 'lib/datadog/appsec/configuration.rb', line 39 def ip_denylist=(value) [:ip_denylist] = value end |
#obfuscator_key_regex=(value) ⇒ Object
60 61 62 |
# File 'lib/datadog/appsec/configuration.rb', line 60 def obfuscator_key_regex=(value) [:obfuscator_key_regex] = value end |
#obfuscator_value_regex=(value) ⇒ Object
64 65 66 |
# File 'lib/datadog/appsec/configuration.rb', line 64 def obfuscator_value_regex=(value) [:obfuscator_value_regex] = value end |
#ruleset=(value) ⇒ Object
35 36 37 |
# File 'lib/datadog/appsec/configuration.rb', line 35 def ruleset=(value) [:ruleset] = value end |
#trace_rate_limit=(value) ⇒ Object
56 57 58 |
# File 'lib/datadog/appsec/configuration.rb', line 56 def trace_rate_limit=(value) [:trace_rate_limit] = value end |
#user_id_denylist=(value) ⇒ Object
43 44 45 |
# File 'lib/datadog/appsec/configuration.rb', line 43 def user_id_denylist=(value) [:user_id_denylist] = value end |
#waf_debug=(value) ⇒ Object
52 53 54 |
# File 'lib/datadog/appsec/configuration.rb', line 52 def waf_debug=(value) [:waf_debug] = value end |
#waf_timeout=(value) ⇒ Object
in microseconds
48 49 50 |
# File 'lib/datadog/appsec/configuration.rb', line 48 def waf_timeout=(value) [:waf_timeout] = value end |