Sha256: a8fb21d6b356f551f88788a623fcd4d03fccc5db9442e6169e8c9baffa3815eb

Contents?: true

Size: 465 Bytes

Versions: 22

Compression:

Stored size: 465 Bytes

Contents

# frozen_string_literal: true

module Mihari
  module Services
    #
    # Alert creator
    #
    class AlertCreator < Service
      #
      # @param [Hash] params
      #
      # @return [Mihari::Models::Alert]
      #
      def call(params)
        normalized = params.to_snake_keys
        proxy = Services::AlertProxy.new(**normalized)
        emitter = Emitters::Database.new(rule: proxy.rule)
        emitter.call proxy.artifacts
      end
    end
  end
end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
mihari-8.0.0 lib/mihari/services/creators.rb
mihari-7.6.4 lib/mihari/services/creators.rb
mihari-7.6.3 lib/mihari/services/creators.rb
mihari-7.6.2 lib/mihari/services/creators.rb
mihari-7.6.1 lib/mihari/services/creators.rb
mihari-7.6.0 lib/mihari/services/creators.rb
mihari-7.5.0 lib/mihari/services/creators.rb
mihari-7.4.0 lib/mihari/services/creators.rb
mihari-7.3.2 lib/mihari/services/creators.rb
mihari-7.3.1 lib/mihari/services/creators.rb
mihari-7.3.0 lib/mihari/services/creators.rb
mihari-7.2.0 lib/mihari/services/creators.rb
mihari-7.1.3 lib/mihari/services/creators.rb
mihari-7.1.2 lib/mihari/services/creators.rb
mihari-7.1.1 lib/mihari/services/creators.rb
mihari-7.1.0 lib/mihari/services/creators.rb
mihari-7.0.5 lib/mihari/services/creators.rb
mihari-7.0.4 lib/mihari/services/creators.rb
mihari-7.0.3 lib/mihari/services/creators.rb
mihari-7.0.2 lib/mihari/services/creators.rb