Expose attributes and add sigs to AwsService
This commit is contained in:
parent
c0df0fbd13
commit
74b59efd5f
2 changed files with 21 additions and 0 deletions
|
|
@ -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
19
sig/aws_service.rbs
Normal 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
|
||||
Loading…
Reference in a new issue