Class: DependencyProxy::Manifest

Inherits:
ApplicationRecord show all
Includes:
EachBatch, FileStoreMounter, Packages::Destructible, TtlExpirable, UpdateNamespaceStatistics
Defined in:
app/models/dependency_proxy/manifest.rb

Constant Summary collapse

MAX_FILE_SIZE =
10.megabytes.freeze
DIGEST_HEADER =
'Docker-Content-Digest'
ACCEPTED_TYPES =
[
  ContainerRegistry::BaseClient::DOCKER_DISTRIBUTION_MANIFEST_V2_TYPE,
  ContainerRegistry::BaseClient::OCI_MANIFEST_V1_TYPE,
  ContainerRegistry::BaseClient::OCI_DISTRIBUTION_INDEX_TYPE,
  ContainerRegistry::BaseClient::DOCKER_DISTRIBUTION_MANIFEST_LIST_V2_TYPE
].freeze

Constants included from FileStoreMounter

FileStoreMounter::ALLOWED_FILE_FIELDS

Constants inherited from ApplicationRecord

ApplicationRecord::MAX_PLUCK

Constants included from ResetOnUnionError

ResetOnUnionError::MAX_RESET_PERIOD

Class Method Summary collapse

Methods included from AfterCommitQueue

#run_after_commit, #run_after_commit_or_now

Methods included from TtlExpirable

#read!

Methods inherited from ApplicationRecord

cached_column_list, #create_or_load_association, declarative_enum, default_select_columns, id_in, id_not_in, iid_in, pluck_primary_key, primary_key_in, #readable_by?, safe_ensure_unique, safe_find_or_create_by, safe_find_or_create_by!, #to_ability_name, underscore, where_exists, where_not_exists, with_fast_read_statement_timeout, without_order

Methods included from SensitiveSerializableHash

#serializable_hash

Class Method Details

.find_by_file_name_or_digest(file_name:, digest:) ⇒ Object



33
34
35
# File 'app/models/dependency_proxy/manifest.rb', line 33

def self.find_by_file_name_or_digest(file_name:, digest:)
  find_by(file_name: file_name) || find_by(digest: digest)
end