Sha256: 1b0a32231cf4c668a8279f6a83c6f9372b8bb7b3b58dd26ff0c17b7c7cd20a65

Contents?: true

Size: 411 Bytes

Versions: 8

Compression:

Stored size: 411 Bytes

Contents

module Kontena::Cli::Vault
  class ReadCommand < Clamp::Command
    include Kontena::Cli::Common

    parameter "NAME", "Secret name"

    def execute
      require_api_url
      token = require_token
      result = client(token).get("secrets/#{current_grid}/#{name}")
      puts "#{result['name']}:"
      puts "  created_at: #{result['created_at']}"
      puts "  value: #{result['value']}"
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
kontena-cli-0.11.7 lib/kontena/cli/vault/read_command.rb
kontena-cli-0.11.6 lib/kontena/cli/vault/read_command.rb
kontena-cli-0.11.5 lib/kontena/cli/vault/read_command.rb
kontena-cli-0.11.4 lib/kontena/cli/vault/read_command.rb
kontena-cli-0.11.3 lib/kontena/cli/vault/read_command.rb
kontena-cli-0.11.2 lib/kontena/cli/vault/read_command.rb
kontena-cli-0.11.1 lib/kontena/cli/vault/read_command.rb
kontena-cli-0.11.0 lib/kontena/cli/vault/read_command.rb