Sha256: c573b2283ca40e2f259ad3277c1d5a51d86dec3b5527c2f0213737540493208b

Contents?: true

Size: 1.95 KB

Versions: 1

Compression:

Stored size: 1.95 KB

Contents

# frozen_string_literal: true


module SocketLabs
  module InjectionApi
    module Core
      class ApiKeyParseResult
        def self.enum
        {
          # No result could be produced.
          "None" =>
            {
              :name => "None",
              :value => 0,
            },
          # Invalid key length was found.
          "InvalidKeyLength" =>
            {
              :name => "InvalidKeyLength",
              :value => 1,
            },
          # Invalid key format was found.
          "InvalidKeyFormat" =>
            {
              :name => "InvalidKeyFormat",
              :value => 2,
            },
          # The key was found to be blank or invalid.
          "InvalidEmptyOrWhitespace" =>
            {
              :name => "InvalidEmptyOrWhitespace",
              :value => 3,
            },
          # The public portion of the key was unable to be parsed.
          "InvalidUnableToExtractPublicPart" =>
            {
              :name => "InvalidUnableToExtractPublicPart",
              :value => 4,
            },
          # The secret portion of the key was unable to be parsed.
          "InvalidUnableToExtractSecretPart" =>
            {
              :name => "InvalidUnableToExtractSecretPart",
              :value => 5,
            },
          # The public portion of the key is the incorrect length.
          "InvalidPublicPartLength" =>
            {
              :name => "InvalidPublicPartLength",
              :value => 6,
            },
          # The secret portion of the key is the incorrect length.
          "InvalidSecretPartLength" =>
            {
              :name => "InvalidSecretPartLength",
              :value => 7,
            },
          # Key was successfully parsed.
          "Success" =>
            {
              :name => "Success",
              :value => 8,
            }
        }
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
socketlabs-injectionapi-1.4.3 lib/socketlabs/injectionapi/core/api_key_parse_result.rb