Class: Pangea::Entities::Namespace::StateConfig

Inherits:
Dry::Struct
  • Object
show all
Defined in:
lib/pangea/entities/namespace.rb

Instance Method Summary collapse

Instance Method Details

#lock_tableObject



40
41
42
# File 'lib/pangea/entities/namespace.rb', line 40

def lock_table
  dynamodb_table || lock
end

#validate_s3!Object



31
32
33
34
35
36
37
38
# File 'lib/pangea/entities/namespace.rb', line 31

def validate_s3!
  errors = []
  errors << "S3 bucket name is required" if bucket.nil?
  errors << "S3 key is required" if key.nil?
  lock_table = dynamodb_table || lock
  errors << "DynamoDB lock table is required" if lock_table.nil?
  raise ::Pangea::Entities::ValidationError, errors.join(", ") unless errors.empty?
end