Sha256: 4cce8a2ea521fd97451180ebd6d53eff26a2ba6cc5a63f430fa16b483cc30070

Contents?: true

Size: 1005 Bytes

Versions: 7

Compression:

Stored size: 1005 Bytes

Contents

# frozen_string_literal: true

module Mihari
  module Schemas
    #
    # Enricher schemas
    #
    module Enrichers
      extend Schemas::Mixins

      IPInfo = Dry::Schema.Params do
        required(:enricher).value(Types::String.enum(*Mihari::Enrichers::IPInfo.class_keys))
        optional(:api_key).value(:string)
        optional(:options).hash(Options)
      end

      Whois = Dry::Schema.Params do
        required(:enricher).value(Types::String.enum(*Mihari::Enrichers::Whois.class_keys))
        optional(:options).hash(Options)
      end

      Shodan = Dry::Schema.Params do
        required(:enricher).value(Types::String.enum(*Mihari::Enrichers::Shodan.class_keys))
        optional(:options).hash(Options)
      end

      GooglePublicDNS = Dry::Schema.Params do
        required(:enricher).value(Types::String.enum(*Mihari::Enrichers::GooglePublicDNS.class_keys))
        optional(:options).hash(Options)
      end
    end

    Enricher = Schemas::Enrichers.get_or_composition
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
mihari-6.3.0 lib/mihari/schemas/enricher.rb
mihari-6.2.0 lib/mihari/schemas/enricher.rb
mihari-6.1.0 lib/mihari/schemas/enricher.rb
mihari-6.0.0 lib/mihari/schemas/enricher.rb
mihari-5.7.2 lib/mihari/schemas/enricher.rb
mihari-5.7.1 lib/mihari/schemas/enricher.rb
mihari-5.7.0 lib/mihari/schemas/enricher.rb