Class: ZeusClient::V1::Secrets

Inherits:
Object
  • Object
show all
Includes:
HTTParty, ServiceBase
Defined in:
lib/zeus/v1/client/secrets.rb

Constant Summary collapse

SUBDOMAIN =
"secrets"
LOCAL_PORT =
3002

Instance Attribute Summary

Attributes included from ServiceBase

#environment_id, #project_id, #public_key, #scope, #secret_key, #zeus_auth_key

Instance Method Summary collapse

Methods included from ServiceBase

#create_project_environment, #destroy_project_environment, #get_headers, #get_project_environment, #get_project_environments, included, #initialize

Instance Method Details

#delete_secret(key) ⇒ Object



23
24
25
# File 'lib/zeus/v1/client/secrets.rb', line 23

def delete_secret(key)
    self.class.post("/api/v1/secrets/#{key}", headers: self.get_headers)
end

#get_secret(key) ⇒ Object



15
16
17
# File 'lib/zeus/v1/client/secrets.rb', line 15

def get_secret(key)
    self.class.get("/api/v1/secrets/#{key}", headers: self.get_headers)
end

#list_secrets(query) ⇒ Object



11
12
13
# File 'lib/zeus/v1/client/secrets.rb', line 11

def list_secrets(query)
    self.class.get("/api/v1/secrets", query: query, headers: self.get_headers)
end

#set_secret(key, value) ⇒ Object



19
20
21
# File 'lib/zeus/v1/client/secrets.rb', line 19

def set_secret(key, value)
    self.class.post("/api/v1/secrets", body: {secret: {key: key, value: value}}.to_json, headers: self.get_headers)
end