Class: BoringBackup::Stores::R2

Inherits:
S3
  • Object
show all
Defined in:
lib/boring_backup/stores/r2.rb

Constant Summary

Constants inherited from S3

S3::DEFAULT_STORAGE_CLASS, S3::STORAGE_CLASSES

Instance Attribute Summary

Attributes inherited from S3

#access_key_id, #bucket, #endpoint, #part_size, #secret_access_key, #storage_class, #thread_count

Instance Method Summary collapse

Methods inherited from S3

#backup!, #cleanup!, #description, #initialize

Methods inherited from Store

#description

Constructor Details

This class inherits a constructor from BoringBackup::Stores::S3

Instance Method Details

#nameObject



6
# File 'lib/boring_backup/stores/r2.rb', line 6

def name = :r2

#regionObject



8
9
10
11
12
# File 'lib/boring_backup/stores/r2.rb', line 8

def region
  value = super

  value.to_s.empty? ? "auto" : value
end

#validate!Object



14
15
16
17
18
# File 'lib/boring_backup/stores/r2.rb', line 14

def validate!
  super

  raise BoringBackup::ConfigurationError, "endpoint is not configured" if endpoint.to_s.empty?
end