Class: BoringBackup::Stores::R2

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

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

#default_storage_classObject



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

def default_storage_class = :standard

#nameObject



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

def name = :r2

#regionObject



12
13
14
15
16
# File 'lib/boring_backup/stores/r2.rb', line 12

def region
  value = super

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

#storage_classesObject



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

def storage_classes = %i[standard standard_ia]

#validate!Object



18
19
20
21
22
# File 'lib/boring_backup/stores/r2.rb', line 18

def validate!
  super

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