You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gostorage/aws.go

26 lines
372 B

package gostorage
import (
"context"
"github.com/aws/aws-sdk-go-v2/config"
"github.com/aws/aws-sdk-go-v2/service/s3"
)
type Aws struct {
client *s3.Client
}
func NewAws() *Aws {
ac := &Aws{}
cfg, err := config.LoadDefaultConfig(context.TODO())
if err != nil {
panic("configuration error, " + err.Error())
}
ac.client = s3.NewFromConfig(cfg)
return ac
}