Sha256: 32de1042ce9d91012930e1ea940553128ebd4146ca10fac8d5dc169f477c7533

Contents?: true

Size: 449 Bytes

Versions: 10

Compression:

Stored size: 449 Bytes

Contents

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

    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

10 entries across 10 versions & 1 rubygems

Version Path
kontena-cli-0.13.4 lib/kontena/cli/vault/read_command.rb
kontena-cli-0.13.3 lib/kontena/cli/vault/read_command.rb
kontena-cli-0.13.2 lib/kontena/cli/vault/read_command.rb
kontena-cli-0.13.1 lib/kontena/cli/vault/read_command.rb
kontena-cli-0.13.0.1 lib/kontena/cli/vault/read_command.rb
kontena-cli-0.13.0 lib/kontena/cli/vault/read_command.rb
kontena-cli-0.12.3 lib/kontena/cli/vault/read_command.rb
kontena-cli-0.12.2 lib/kontena/cli/vault/read_command.rb
kontena-cli-0.12.1 lib/kontena/cli/vault/read_command.rb
kontena-cli-0.12.0 lib/kontena/cli/vault/read_command.rb