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
eac_tools-0.41.0 sub/avm/lib/avm/instances/entry_keys.rb
avm-0.54.0 lib/avm/instances/entry_keys.rb
eac_tools-0.40.0 sub/avm/lib/avm/instances/entry_keys.rb
avm-0.53.0 lib/avm/instances/entry_keys.rb
eac_tools-0.39.0 sub/avm/lib/avm/instances/entry_keys.rb
avm-0.52.0 lib/avm/instances/entry_keys.rb
eac_tools-0.38.0 sub/avm/lib/avm/instances/entry_keys.rb
avm-0.51.0 lib/avm/instances/entry_keys.rb
eac_tools-0.37.2 sub/avm/lib/avm/instances/entry_keys.rb
avm-0.50.0 lib/avm/instances/entry_keys.rb
eac_tools-0.37.1 sub/avm/lib/avm/instances/entry_keys.rb
avm-0.49.0 lib/avm/instances/entry_keys.rb
eac_tools-0.37.0 sub/avm/lib/avm/instances/entry_keys.rb
avm-0.48.0 lib/avm/instances/entry_keys.rb
eac_tools-0.36.1 sub/avm/lib/avm/instances/entry_keys.rb
avm-0.47.0 lib/avm/instances/entry_keys.rb
eac_tools-0.36.0 sub/avm/lib/avm/instances/entry_keys.rb
avm-0.46.0 lib/avm/instances/entry_keys.rb
eac_tools-0.35.0 sub/avm/lib/avm/instances/entry_keys.rb
eac_tools-0.34.0 sub/avm/lib/avm/instances/entry_keys.rb