-
Notifications
You must be signed in to change notification settings - Fork 66
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f22dcaf
commit 622f872
Showing
5 changed files
with
117 additions
and
0 deletions.
There are no files selected for viewing
56 changes: 56 additions & 0 deletions
56
integrations/lib/multiwoven/integrations/source/s3/client.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
15 changes: 15 additions & 0 deletions
15
integrations/lib/multiwoven/integrations/source/s3/config/meta.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"] | ||
} | ||
} |
34 changes: 34 additions & 0 deletions
34
integrations/lib/multiwoven/integrations/source/s3/config/spec.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
12
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.