Sha256: 22f21f3bba035dcafdab9e509641b529ee2e1b3741d0f3f6270fa4d3c665c0df

Contents?: true

Size: 715 Bytes

Versions: 3

Compression:

Stored size: 715 Bytes

Contents

require "ostruct"
require "time"
require "json"
require "securerandom"

require "snapshot_archive/stores"
require "snapshot_archive/archives"
require "snapshot_archive/formatters"

module SnapshotArchive
  class Cli
    class << self
      def backup(msg:, stores:)
        if msg.empty?
          Cfg.shell.warn("aborting due to empty message")
        else
          Cfg.repository.add(msg: msg, stores: stores)
        end
      end

      def restore(id:)
        Cfg.repository.restore(id)
      end

      def list(...)
        Cfg.repository.list(...)
      end

      def show(id)
        Cfg.repository.show(id)
      end

      def delete(id)
        Cfg.repository.delete(id)
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
snapshot_archive-0.25.0 lib/snapshot_archive/cli.rb
snapshot_archive-0.24.0 lib/snapshot_archive/cli.rb
snapshot_archive-0.23.0 lib/snapshot_archive/cli.rb