Sha256: dfffc91ef1ef639ccbf2f8e1376b373e17d169b3be5582182b13be71195008eb

Contents?: true

Size: 1.1 KB

Versions: 83

Compression:

Stored size: 1.1 KB

Contents

# frozen_string_literal: true

require 'avm/entries/keys_constants_set'
require 'avm/entries/uri_builder'
require 'eac_ruby_utils/core_ext'

module Avm
  module Instances
    module EntryKeys
      URI_FIELDS = ::Avm::Entries::UriBuilder::ENTRIES_FIELDS + %w[url]

      class << self
        def all
          all_keys.to_a
        end

        def keys_consts_set(prefix, suffixes)
          all_keys.merge(::Avm::Entries::KeysConstantsSet.new(self, prefix, suffixes).result)
        end

        private

        def all_keys
          @all_keys ||= ::Set.new
        end
      end

      {
        '' => %w[name source_instance_id],
        admin: URI_FIELDS + %w[api_key],
        database: URI_FIELDS + %w[id limit name system timeout extra],
        docker: %w[registry],
        install: URI_FIELDS + %w[id data_path email groupname],
        mailer: {
          '' => %w[id from reply_to],
          smtp: URI_FIELDS + %w[address domain authentication openssl_verify_mode starttls_auto tls]
        },
        web: URI_FIELDS
      }.each { |prefix, suffixes| keys_consts_set(prefix, suffixes) }
    end
  end
end

Version data entries

83 entries across 83 versions & 2 rubygems

Version Path
avm-0.69.0 lib/avm/instances/entry_keys.rb
eac_tools-0.63.0 sub/avm/lib/avm/instances/entry_keys.rb
eac_tools-0.62.1 sub/avm/lib/avm/instances/entry_keys.rb
avm-0.68.0 lib/avm/instances/entry_keys.rb
eac_tools-0.62.0 sub/avm/lib/avm/instances/entry_keys.rb
eac_tools-0.61.1 sub/avm/lib/avm/instances/entry_keys.rb
eac_tools-0.61.0 sub/avm/lib/avm/instances/entry_keys.rb
avm-0.67.1 lib/avm/instances/entry_keys.rb
eac_tools-0.60.3 sub/avm/lib/avm/instances/entry_keys.rb
eac_tools-0.60.2 sub/avm/lib/avm/instances/entry_keys.rb
avm-0.67.0 lib/avm/instances/entry_keys.rb
eac_tools-0.60.1 sub/avm/lib/avm/instances/entry_keys.rb
eac_tools-0.60.0 sub/avm/lib/avm/instances/entry_keys.rb
eac_tools-0.59.0 sub/avm/lib/avm/instances/entry_keys.rb
avm-0.66.1 lib/avm/instances/entry_keys.rb
eac_tools-0.58.0 sub/avm/lib/avm/instances/entry_keys.rb
eac_tools-0.57.0 sub/avm/lib/avm/instances/entry_keys.rb
eac_tools-0.56.1 sub/avm/lib/avm/instances/entry_keys.rb
avm-0.66.0 lib/avm/instances/entry_keys.rb
eac_tools-0.56.0 sub/avm/lib/avm/instances/entry_keys.rb