Sha256: 00afa2dc5973d89c7058a039d00188940747a090fa4cc91a882eb1fdf333cace

Contents?: true

Size: 665 Bytes

Versions: 3

Compression:

Stored size: 665 Bytes

Contents

# frozen_string_literal: true

module Mihari
  module Types
    include Dry.Types()

    Int = Strict::Integer
    Nil = Strict::Nil
    Hash = Strict::Hash
    String = Strict::String
    Bool = Strict::Bool
    Double = Strict::Float | Strict::Integer
    DateTime = Strict::DateTime

    DataTypes = Types::String.enum(*ALLOWED_DATA_TYPES)

    UrlscanDataTypes = Types::String.enum("ip", "domain", "url")

    HttpRequestMethods = Types::String.enum("GET", "POST")
    HttpRequestPayloadTypes = Types::String.enum("application/json", "application/x-www-form-urlencoded")

    EmitterTypes = Types::String.enum(
      "database",
      "webhook"
    )
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
mihari-4.5.0 lib/mihari/types.rb
mihari-4.4.1 lib/mihari/types.rb
mihari-4.4.0 lib/mihari/types.rb