-
Notifications
You must be signed in to change notification settings - Fork 97
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
<img width="1728" alt="Screenshot 2023-11-16 at 1 33 12 PM" src="https://github.com/PeerDB-io/peerdb/assets/65964360/7b6a0f3e-29e3-451f-8c8e-c16fab9509f1"> - Upon choosing the GCS option, the `Region` and `Role ARN` fields will not be shown as they have fixed values for GCS
- Loading branch information
1 parent
0d12f09
commit 4a72fea
Showing
16 changed files
with
455 additions
and
13 deletions.
There are no files selected for viewing
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
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
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
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
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
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
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
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
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
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
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,63 @@ | ||
import { S3Config } from '@/grpc_generated/peers'; | ||
import { PeerSetting } from './common'; | ||
|
||
export const s3Setting: PeerSetting[] = [ | ||
{ | ||
label: 'Bucket URL', | ||
stateHandler: (value, setter) => | ||
setter((curr) => ({ ...curr, url: value })), | ||
tips: 'The URL of your existing S3/GCS bucket along with a prefix of your choice. It begins with s3://', | ||
helpfulLink: | ||
'https://docs.aws.amazon.com/AmazonS3/latest/userguide/access-bucket-intro.html#accessing-a-bucket-using-S3-format', | ||
default: 's3://<bucket_name>/<prefix_name>', | ||
}, | ||
{ | ||
label: 'Access Key ID', | ||
stateHandler: (value, setter) => | ||
setter((curr) => ({ ...curr, accessKeyId: value })), | ||
tips: 'The AWS access key ID associated with your account. In case of GCS, this is the HMAC access key ID.', | ||
helpfulLink: | ||
'https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_access-keys.html', | ||
}, | ||
{ | ||
label: 'Secret Access Key', | ||
stateHandler: (value, setter) => | ||
setter((curr) => ({ ...curr, secretAccessKey: value })), | ||
tips: 'The AWS secret access key associated with your account. In case of GCS, this is the HMAC secret.', | ||
helpfulLink: | ||
'https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_access-keys.html', | ||
}, | ||
{ | ||
label: 'Region', | ||
stateHandler: (value, setter) => | ||
setter((curr) => ({ ...curr, region: value })), | ||
tips: 'The region where your bucket is located. For example, us-east-1. In case of GCS, this will be set to auto, which detects where your bucket it.', | ||
}, | ||
{ | ||
label: 'Role ARN', | ||
stateHandler: (value, setter) => | ||
setter((curr) => ({ ...curr, roleArn: value })), | ||
type: 'password', | ||
tips: 'If set, the role ARN will be used to assume the role before accessing the bucket.', | ||
helpfulLink: | ||
'https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_identifiers.html#identifiers-arns', | ||
optional: true, | ||
}, | ||
]; | ||
|
||
export const blankS3Setting: S3Config = { | ||
url: 's3://<bucket_name>/<prefix_name>', | ||
accessKeyId: undefined, | ||
secretAccessKey: undefined, | ||
roleArn: undefined, | ||
region: undefined, | ||
endpoint: '', | ||
metadataDb: { | ||
host: '', | ||
port: 5432, | ||
user: 'postgres', | ||
password: '', | ||
database: 'postgres', | ||
transactionSnapshot: '', | ||
}, | ||
}; |
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
Oops, something went wrong.