initial commit

This commit is contained in:
Finn 2024-02-18 14:30:11 -08:00
commit b950384421
7 changed files with 218 additions and 0 deletions

25
main.go Normal file
View file

@ -0,0 +1,25 @@
package main
import (
"os"
minio "github.com/minio/minio-go/v7"
"github.com/minio/minio-go/v7/pkg/credentials"
"golang.org/x/exp/slog"
)
func main() {
minioClient, err := minio.New(config.S3Endpoint, &minio.Options{
Creds: credentials.NewStaticV4(config.AccessKeyID, config.SecretAccessKey, ""),
Secure: true,
})
if err != nil {
slog.Error("error connecting to s3 server", "error", err)
os.Exit(1)
}
if err := ListenAndServe(minioClient); err != nil {
slog.Error("error starting server", "error", err)
os.Exit(1)
}
}