Sha256: 1484c5c7459601718527bfd6a3b236c63c10e62d86d12262bf8fd58b08d77c8d

Contents?: true

Size: 1.09 KB

Versions: 25

Compression:

Stored size: 1.09 KB

Contents

# frozen_string_literal: true

module Mihari
  module Schemas
    Database = Dry::Schema.Params do
      required(:emitter).value(Types::String.enum("database"))
    end

    MISP = Dry::Schema.Params do
      required(:emitter).value(Types::String.enum("misp"))
      optional(:url).value(:string)
      optional(:api_key).value(:string)
    end

    TheHive = Dry::Schema.Params do
      required(:emitter).value(Types::String.enum("the_hive"))
      optional(:url).value(:string)
      optional(:api_key).value(:string)
      optional(:api_version).value(Types::String.enum("v4", "v5")).default("v4")
    end

    Slack = Dry::Schema.Params do
      required(:emitter).value(Types::String.enum("slack"))
      optional(:webhook_url).value(:string)
      optional(:channel).value(:string)
    end

    Webhook = Dry::Schema.Params do
      required(:emitter).value(Types::String.enum("webhook"))
      required(:url).value(:string)
      optional(:method).value(Types::HTTPRequestMethods).default("POST")
      optional(:headers).value(:hash).default({})
      optional(:template).value(:string)
    end
  end
end

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
mihari-5.4.9 lib/mihari/schemas/emitter.rb
mihari-5.4.8 lib/mihari/schemas/emitter.rb
mihari-5.4.7 lib/mihari/schemas/emitter.rb
mihari-5.4.6 lib/mihari/schemas/emitter.rb
mihari-5.4.5 lib/mihari/schemas/emitter.rb
mihari-5.4.4 lib/mihari/schemas/emitter.rb
mihari-5.4.3 lib/mihari/schemas/emitter.rb
mihari-5.4.2 lib/mihari/schemas/emitter.rb
mihari-5.4.1 lib/mihari/schemas/emitter.rb
mihari-5.4.0 lib/mihari/schemas/emitter.rb
mihari-5.3.2 lib/mihari/schemas/emitter.rb
mihari-5.3.1 lib/mihari/schemas/emitter.rb
mihari-5.3.0 lib/mihari/schemas/emitter.rb
mihari-5.2.4 lib/mihari/schemas/emitter.rb
mihari-5.2.3 lib/mihari/schemas/emitter.rb
mihari-5.2.2 lib/mihari/schemas/emitter.rb
mihari-5.2.1 lib/mihari/schemas/emitter.rb
mihari-5.2.0 lib/mihari/schemas/emitter.rb
mihari-5.1.4 lib/mihari/schemas/emitter.rb
mihari-5.1.3 lib/mihari/schemas/emitter.rb