Class: Legion::Extensions::Lakera::Client

Inherits:
Object
  • Object
show all
Includes:
Runners::Guard, Runners::Health, Runners::Policies, Runners::Projects
Defined in:
lib/legion/extensions/lakera/client.rb

Constant Summary

Constants included from Helpers::Client

Helpers::Client::DEFAULT_HOST, Helpers::Client::REGIONS

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Runners::Health

#live, #policy_health, #policy_lint, #ready, #startup

Methods included from Helpers::Client

client, self_hosted_client

Methods included from Runners::Projects

#create_project, #delete_project, #get_project, #update_project

Methods included from Runners::Policies

#create_policy, #delete_policy, #get_policy, #update_policy

Methods included from Runners::Guard

#check, #check_detailed

Constructor Details

#initialize(api_key: nil, host: Helpers::Client::DEFAULT_HOST, region: nil, self_hosted: false, **opts) ⇒ Client

Returns a new instance of Client.



20
21
22
23
24
# File 'lib/legion/extensions/lakera/client.rb', line 20

def initialize(api_key: nil, host: Helpers::Client::DEFAULT_HOST,
               region: nil, self_hosted: false, **opts)
  @config = { api_key: api_key, host: host, region: region,
              self_hosted: self_hosted, **opts }
end

Instance Attribute Details

#configObject (readonly)

Returns the value of attribute config.



18
19
20
# File 'lib/legion/extensions/lakera/client.rb', line 18

def config
  @config
end