initial commit
This commit is contained in:
commit
b950384421
7 changed files with 218 additions and 0 deletions
25
main.go
Normal file
25
main.go
Normal 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)
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue