Sha256: d9a0c651787c279e013aa1f685dfe0522816a5908d34199eb0526cfde757798b
Contents?: true
Size: 628 Bytes
Versions: 2
Compression:
Stored size: 628 Bytes
Contents
# frozen_string_literal: true require 'pg_export' require 'pg_export/value_objects/result' class PgExport module Operations class DecryptDump def initialize(cipher_factory:) @cipher_factory = cipher_factory end def name :decrypt_dump end def call(dump:) dump.decrypt(cipher_factory: cipher_factory) ValueObjects::Success.new(dump: dump) rescue OpenSSL::Cipher::CipherError => e ValueObjects::Failure.new(message: "Problem decrypting dump file: #{e}. Try again.") end private attr_reader :cipher_factory end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
pg_export-1.0.0 | lib/pg_export/operations/decrypt_dump.rb |
pg_export-1.0.0.rc8 | lib/pg_export/operations/decrypt_dump.rb |