This commit is contained in:
2026-10-01 16:55:14 +07:00
parent ee15d149bd
commit 385a43f5bd
2 changed files with 3 additions and 1 deletions
+1
View File
@@ -112,6 +112,7 @@ func main() {
usersService := users_service.NewUsersService(usersRepo, passwordGenerator, emailSender, processorJWT, refreshTokensRepo, os.Getenv("APP_BASE_URL")) usersService := users_service.NewUsersService(usersRepo, passwordGenerator, emailSender, processorJWT, refreshTokensRepo, os.Getenv("APP_BASE_URL"))
uiService := ui_service.NewUiService() uiService := ui_service.NewUiService()
fileStorage, err := file_storage.NewRustFSStorage( fileStorage, err := file_storage.NewRustFSStorage(
context.Background(),
os.Getenv("S3_HOST"), os.Getenv("S3_HOST"),
os.Getenv("S3_USER"), os.Getenv("S3_USER"),
os.Getenv("S3_PASSWORD"), os.Getenv("S3_PASSWORD"),
+2 -1
View File
@@ -19,6 +19,7 @@ type storage struct {
} }
func NewRustFSStorage( func NewRustFSStorage(
ctx context.Context,
endpoint string, endpoint string,
accessKeyID string, accessKeyID string,
secretAccessKey string, secretAccessKey string,
@@ -34,7 +35,7 @@ func NewRustFSStorage(
return nil, err return nil, err
} }
ctx, cancel := context.WithTimeout(context.Background(), 3*time.Second) ctx, cancel := context.WithTimeout(ctx, 3*time.Second)
defer cancel() defer cancel()
err = client.CreateBucket( err = client.CreateBucket(
ctx, ctx,