Перенесите реализацию ЛР 4 на стенд ЛР 5

This commit is contained in:
2026-11-18 15:33:31 +03:00
parent 276dbdad8a
commit 911d97a77a
153 changed files with 17451 additions and 1 deletions
+31
View File
@@ -0,0 +1,31 @@
package main
import (
"context"
"fmt"
"os"
"time"
"messenger/internal/platform/config"
"messenger/internal/platform/s3store"
)
func main() {
if err := run(); err != nil {
fmt.Fprintln(os.Stderr, "bucket bootstrap failed:", err)
os.Exit(1)
}
}
func run() error {
cfg, err := config.LoadS3(os.LookupEnv)
if err != nil {
return err
}
s, err := s3store.New(cfg)
if err != nil {
return err
}
ctx, cancel := context.WithTimeout(context.Background(), 60*time.Second)
defer cancel()
return s.Bootstrap(ctx)
}