MCPcopy Create free account
hub / github.com/apecloud/myduckserver / buildConfigForS3

Method buildConfigForS3

storage/object_storage.go:120–126  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

118}
119
120func (storageConfig *ObjectStorageConfig) buildConfigForS3() (cfg aws.Config, err error) {
121 return awsconfig.LoadDefaultConfig(context.TODO(),
122 awsconfig.WithCredentialsProvider(
123 credentials.NewStaticCredentialsProvider(storageConfig.AccessKeyId, storageConfig.SecretAccessKey, "")),
124 awsconfig.WithRegion(storageConfig.Region),
125 )
126}
127
128func ConstructStorageConfig(remoteUri, endpoint, accessKeyId, secretAccessKey string) (*ObjectStorageConfig, string, error) {
129 provider, remotePath, err := parseProviderAndPath(remoteUri)

Callers 1

buildConfigMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected