forked from mtusi2026/mtusi2026lab6
25 lines
551 B
Go
25 lines
551 B
Go
package main
|
|
|
|
import (
|
|
"context"
|
|
"time"
|
|
|
|
"gitea.privcloud.tech/vlad_marlo/mtusi2026lab6/internal/config"
|
|
"gitea.privcloud.tech/vlad_marlo/mtusi2026lab6/internal/objectstore"
|
|
)
|
|
|
|
// bootstrapS3 creates the private bucket using separate operator credentials.
|
|
func bootstrapS3() error {
|
|
cfg, err := config.NewObjectStore()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
objects, err := objectstore.New(cfg)
|
|
if err != nil {
|
|
return err
|
|
}
|
|
ctx, cancel := context.WithTimeout(context.Background(), 30*time.Second)
|
|
defer cancel()
|
|
return objects.Bootstrap(ctx)
|
|
}
|