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,
20 creds: @creds,
21 from_jid: Blather::JID.new("customer_#{customer_id}", @component_jid),
22 ogm_url: NotLoaded.new(:ogm_url),
23 fwd: NotLoaded.new(:fwd_timeout),
24 transcription_enabled: NotLoaded.new(:transcription_enabled),
25 registered?: NotLoaded.new(:registered?)
26 )
27 end
28end