小编Dan*_*n S的帖子

How can I use the AWS SDK v2 for Go with DigitalOcean Spaces?

I'm trying to use the AWS v2 SDK for Go to list all objects in a given bucket on DigitalOcean Spaces. Their documentation gives examples of how to use the v1 SDK to do this, but my app uses v2. I know I could technically use both, but I'd rather not if possible.

Here's what I've got so far:

package main

import (
    "context"
    "fmt"
    "github.com/aws/aws-sdk-go-v2/aws"
    "github.com/aws/aws-sdk-go-v2/config"
    "github.com/aws/aws-sdk-go-v2/service/s3"
)

func main() {

    customResolver := aws.EndpointResolverWithOptionsFunc(func(service, region string, options ...interface{}) …
Run Code Online (Sandbox Code Playgroud)

amazon-s3 go aws-sdk-go digital-ocean-spaces

5
推荐指数
1
解决办法
1362
查看次数

标签 统计

amazon-s3 ×1

aws-sdk-go ×1

digital-ocean-spaces ×1

go ×1