1# frozen_string_literal: true
2
3require_relative "backend_sgx"
4require_relative "not_loaded"
5
6class TrivialBackendSgxRepo
7 def initialize(
8 jid: CONFIG[:sgx],
9 creds: CONFIG[:creds],
10 component_jid: CONFIG[:component][:jid]
11 )
12 @jid = Blather::JID.new(jid)
13 @creds = creds
14 @component_jid = component_jid
15 end
16
17 def get(customer_id)
18 BackendSgx.new(
19 jid: @jid, creds: @creds,
20 from_jid: Blather::JID.new("customer_#{customer_id}", @component_jid),
21 ogm_url: NotLoaded.new(:ogm_url),
22 fwd: NotLoaded.new(:fwd_timeout),
23 transcription_enabled: NotLoaded.new(:transcription_enabled),
24 registered?: NotLoaded.new(:registered?)
25 )
26 end
27end