Skip to content

Commit

Permalink
started building s3 connector
Browse files Browse the repository at this point in the history
  • Loading branch information
praneeth-ais committed Apr 25, 2024
1 parent f22dcaf commit 622f872
Show file tree
Hide file tree
Showing 5 changed files with 117 additions and 0 deletions.
Binary file added .DS_Store
Binary file not shown.
56 changes: 56 additions & 0 deletions integrations/lib/multiwoven/integrations/source/s3/client.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# frozen_string_literal: true

require "aws-sdk-s3"

module Multiwoven::Integrations::Source
module S3
include Multiwoven::Integrations::Core
class Client < SourceConnector
def check_connection(connection_config)
# WIP
s3 = create_connection(connection_config)
ConnectionStatus.new(status: ConnectionStatusType["succeeded"]).to_multiwoven_message
rescue StandardError => e
ConnectionStatus.new(status: ConnectionStatusType["failed"], message: e.message).to_multiwoven_message
end

def discover(connection_config)
# TODO: implement
rescue StandardError => e
handle_exception(
"S3:DISCOVER:EXCEPTION",
"error",
e
)
end

def read(sync_config)
# TODO: implement
rescue StandardError => e
handle_exception(
"S3:READ:EXCEPTION",
"error",
e
)
end

private

def query(connection, query)
# TODO: implement
end

def create_connection(connection_config)
# TODO: implement
end

def create_streams(records)
# TODO: implement
end

def group_by_table(records)
# TODO: implement
end
end
end
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"data": {
"name": "S3",
"title": "AWS S3",
"connector_type": "source",
"category": "Cloud Storage",
"documentation_url": "https://docs.mutliwoven.com",
"github_issue_label": "source-s3",
"icon": "icon.svg",
"license": "MIT",
"release_stage": "alpha",
"support_level": "community",
"tags": ["language:ruby", "multiwoven", "storage", "aws"]
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"documentation_url": "https://docs.aws.amazon.com/s3/?icmpid=docs_homepage_featuredsvcs",
"stream_type": "static",
"connector_query_type": "none",
"connection_specification": {
"$schema": "",
"title": "Amazon S3",
"type": "object",
"required": ["access_key_id", "secret_access_key", "region", "bucket_name"],
"properties": {
"access_key_id": {
"type": "string",
"description": "Your AWS Access Key ID, which is provided when you create a new IAM user in your AWS account.",
"title": "AWS Access Key ID"
},
"secret_access_key": {
"type": "string",
"description": "Your AWS Secret Access Key, which is provided along with the Access Key ID when you create a new IAM user. This key should be kept confidential.",
"title": "AWS Secret Access Key"
},
"region": {
"type": "string",
"description": "The AWS Region where your S3 bucket is located. Example regions include us-east-1, eu-west-1, etc. This is critical for connecting to the correct regional endpoint.",
"title": "AWS Region"
},
"bucket_name": {
"type": "string",
"description": "The name of the S3 bucket you wish to access. Bucket names are globally unique across all existing bucket names in Amazon S3.",
"title": "S3 Bucket Name"
},
"credentials_json": { }
}
}
}
12 changes: 12 additions & 0 deletions integrations/lib/multiwoven/integrations/source/s3/icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 622f872

Please sign in to comment.