Class: Dsv::Secret

Inherits:
Object
  • Object
show all
Defined in:
lib/dsv/secret.rb

Constant Summary collapse

SECRETS_RESOURCE =
"secrets".freeze

Class Method Summary collapse

Class Method Details

.fetch(vault, path) ⇒ Hash

Fetch secrets from the server

Parameters:

  • vault (Server)
  • path (String)

    path to the secret

Returns:

  • (Hash)

    of the secret



11
12
13
14
15
# File 'lib/dsv/secret.rb', line 11

def self.fetch(vault, path)
    @vault = vault
  
    @secret = @vault.accessResource("GET", SECRETS_RESOURCE, path, nil)
end