Class: SesDashboard::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/ses_dashboard.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



40
41
42
43
44
45
46
47
48
49
50
51
52
53
# File 'lib/ses_dashboard.rb', line 40

def initialize
  @aws_region              = ENV.fetch("AWS_REGION", "us-east-1")
  @aws_access_key_id       = nil
  @aws_secret_access_key   = nil
  @endpoint                = ENV["AWS_ENDPOINT_URL"]  # LocalStack in dev/test
  @authentication_adapter  = :none
  @cache_enabled           = true
  @per_page                = 25
  @time_zone               = "UTC"
  @test_email_from         = nil
  @verify_sns_signature    = false
  @cloudflare_team_domain  = nil
  @cloudflare_aud          = nil
end

Instance Attribute Details

#authentication_adapterObject

Auth — :none, :devise, :cloudflare, or any object responding to #authenticate(request)



23
24
25
# File 'lib/ses_dashboard.rb', line 23

def authentication_adapter
  @authentication_adapter
end

#aws_access_key_idObject

AWS — credentials are optional. The SDK credential chain (SSO, IAM roles, instance profiles, env vars) is used when these are not explicitly set.



20
21
22
# File 'lib/ses_dashboard.rb', line 20

def aws_access_key_id
  @aws_access_key_id
end

#aws_regionObject

AWS — credentials are optional. The SDK credential chain (SSO, IAM roles, instance profiles, env vars) is used when these are not explicitly set.



20
21
22
# File 'lib/ses_dashboard.rb', line 20

def aws_region
  @aws_region
end

#aws_secret_access_keyObject

AWS — credentials are optional. The SDK credential chain (SSO, IAM roles, instance profiles, env vars) is used when these are not explicitly set.



20
21
22
# File 'lib/ses_dashboard.rb', line 20

def aws_secret_access_key
  @aws_secret_access_key
end

#cache_enabledObject

Caching for SES API calls (quota, statistics, etc.)



26
27
28
# File 'lib/ses_dashboard.rb', line 26

def cache_enabled
  @cache_enabled
end

#cloudflare_audObject

JWT audience (your CF application AUD)



38
39
40
# File 'lib/ses_dashboard.rb', line 38

def cloudflare_aud
  @cloudflare_aud
end

#cloudflare_team_domainObject

Cloudflare Zero Trust



37
38
39
# File 'lib/ses_dashboard.rb', line 37

def cloudflare_team_domain
  @cloudflare_team_domain
end

#endpointObject

AWS — credentials are optional. The SDK credential chain (SSO, IAM roles, instance profiles, env vars) is used when these are not explicitly set.



20
21
22
# File 'lib/ses_dashboard.rb', line 20

def endpoint
  @endpoint
end

#per_pageObject

Dashboard behaviour



29
30
31
# File 'lib/ses_dashboard.rb', line 29

def per_page
  @per_page
end

#test_email_fromObject

From: address used when sending test emails



31
32
33
# File 'lib/ses_dashboard.rb', line 31

def test_email_from
  @test_email_from
end

#time_zoneObject

time zone for chart grouping (default “UTC”)



30
31
32
# File 'lib/ses_dashboard.rb', line 30

def time_zone
  @time_zone
end

#verify_sns_signatureObject

Security — set to true in production to validate SNS message signatures



34
35
36
# File 'lib/ses_dashboard.rb', line 34

def verify_sns_signature
  @verify_sns_signature
end