class Vault::Transform
Public Instance Methods
Source
# File lib/vault/api/transform/alphabet.rb, line 37 def alphabets json = client.list("/v1/transform/alphabet") if keys = json.dig(:data, :keys) keys else json end end
Source
# File lib/vault/api/transform/alphabet.rb, line 16 def create_alphabet(name, alphabet:, **opts) opts ||= {} opts[:alphabet] = alphabet client.post("/v1/transform/alphabet/#{encode_path(name)}", JSON.fast_generate(opts)) return true end
Source
# File lib/vault/api/transform/role.rb, line 16 def create_role(name, **opts) opts ||= {} client.post("/v1/transform/role/#{encode_path(name)}", JSON.fast_generate(opts)) return true end
Source
# File lib/vault/api/transform/template.rb, line 26 def create_template(name, type:, pattern:, **opts) opts ||= {} opts[:type] = type opts[:pattern] = pattern client.post("/v1/transform/template/#{encode_path(name)}", JSON.fast_generate(opts)) return true end
Source
# File lib/vault/api/transform/transformation.rb, line 33 def create_transformation(name, type:, template:, **opts) opts ||= {} opts[:type] = type opts[:template] = template client.post("/v1/transform/transformation/#{encode_path(name)}", JSON.fast_generate(opts)) return true end
Source
# File lib/vault/api/transform.rb, line 22 def decode(role_name:, **opts) opts ||= {} client.post("/v1/transform/decode/#{encode_path(role_name)}", JSON.fast_generate(opts)) end
Source
# File lib/vault/api/transform/alphabet.rb, line 32 def delete_alphabet(name) client.delete("/v1/transform/alphabet/#{encode_path(name)}") true end
Source
# File lib/vault/api/transform/role.rb, line 31 def delete_role(name) client.delete("/v1/transform/role/#{encode_path(name)}") true end
Source
# File lib/vault/api/transform/template.rb, line 43 def delete_template(name) client.delete("/v1/transform/template/#{encode_path(name)}") true end
Source
# File lib/vault/api/transform/transformation.rb, line 50 def delete_transformation(name) client.delete("/v1/transform/transformation/#{encode_path(name)}") true end
Source
# File lib/vault/api/transform.rb, line 17 def encode(role_name:, **opts) opts ||= {} client.post("/v1/transform/encode/#{encode_path(role_name)}", JSON.fast_generate(opts)) end
Source
# File lib/vault/api/transform/alphabet.rb, line 23 def get_alphabet(name) json = client.get("/v1/transform/alphabet/#{encode_path(name)}") if data = json.dig(:data) Alphabet.decode(data) else json end end
Source
# File lib/vault/api/transform/role.rb, line 22 def get_role(name) json = client.get("/v1/transform/role/#{encode_path(name)}") if data = json.dig(:data) Role.decode(data) else json end end
Source
# File lib/vault/api/transform/template.rb, line 34 def get_template(name) json = client.get("/v1/transform/template/#{encode_path(name)}") if data = json.dig(:data) Template.decode(data) else json end end
Source
# File lib/vault/api/transform/transformation.rb, line 41 def get_transformation(name) json = client.get("/v1/transform/transformation/#{encode_path(name)}") if data = json.dig(:data) Transformation.decode(data) else json end end
Source
# File lib/vault/api/transform/role.rb, line 36 def roles json = client.list("/v1/transform/role") if keys = json.dig(:data, :keys) keys else json end end
Source
# File lib/vault/api/transform/template.rb, line 48 def templates json = client.list("/v1/transform/template") if keys = json.dig(:data, :keys) keys else json end end
Source
# File lib/vault/api/transform/transformation.rb, line 55 def transformations json = client.list("/v1/transform/transformation") if keys = json.dig(:data, :keys) keys else json end end