Class: ZeusSdk::V1::Secrets
- Inherits:
-
Object
- Object
- ZeusSdk::V1::Secrets
show all
- Includes:
- HTTParty, ServiceBase
- Defined in:
- lib/zeus_sdk/v1/secrets.rb
Constant Summary
collapse
- SUBDOMAIN =
"secrets"
- LOCAL_PORT =
3002
Instance Attribute Summary
Attributes included from ServiceBase
#env, #environment_id, #project_id, #public_key, #scope, #secret_key, #zeus_auth_key
Instance Method Summary
collapse
#create_project_environment, #destroy_project_environment, #get_headers, #get_project_environment, #get_project_environments, included, #initialize, #update_project_environment
Instance Method Details
#delete_secret(key) ⇒ Object
27
28
29
30
|
# File 'lib/zeus_sdk/v1/secrets.rb', line 27
def delete_secret(key)
resp = self.class.post("/api/v1/secrets/#{key}", headers: self.)
return resp
end
|
#get_secret(key) ⇒ Object
16
17
18
19
|
# File 'lib/zeus_sdk/v1/secrets.rb', line 16
def get_secret(key)
resp = self.class.get("/api/v1/secrets/#{key}", headers: self.)
return resp
end
|
#list_secrets(query) ⇒ Object
11
12
13
14
|
# File 'lib/zeus_sdk/v1/secrets.rb', line 11
def list_secrets(query)
resp = self.class.get("/api/v1/secrets", query: query, headers: self.)
return resp
end
|
#set_secret(key, value) ⇒ Object
21
22
23
24
25
|
# File 'lib/zeus_sdk/v1/secrets.rb', line 21
def set_secret(key, value)
body = {secret: {key: key, value: value}}
resp = self.class.post("/api/v1/secrets", body: body.to_json, headers: self.)
return resp
end
|