Expose attributes and add sigs to AwsService

This commit is contained in:
Justin Edmund 2025-01-18 08:51:37 -08:00
parent c0df0fbd13
commit 74b59efd5f
2 changed files with 21 additions and 0 deletions

View file

@ -3,6 +3,8 @@
require 'aws-sdk-s3'
class AwsService
attr_reader :s3_client, :bucket
class ConfigurationError < StandardError; end
def initialize

19
sig/aws_service.rbs Normal file
View file

@ -0,0 +1,19 @@
class AwsService
class ConfigurationError < StandardError
end
attr_reader bucket: String
attr_reader s3_client: Aws::S3::Client
def initialize: () -> void
def upload_stream: (IO io, String key) -> Aws::S3::Types::PutObjectOutput
def file_exists?: (String key) -> bool
private
def credentials: () -> Hash[Symbol, String]
def validate_credentials!: () -> void
end