generated from VLADIMIR/template
add ctx
This commit is contained in:
@@ -112,6 +112,7 @@ func main() {
|
||||
usersService := users_service.NewUsersService(usersRepo, passwordGenerator, emailSender, processorJWT, refreshTokensRepo, os.Getenv("APP_BASE_URL"))
|
||||
uiService := ui_service.NewUiService()
|
||||
fileStorage, err := file_storage.NewRustFSStorage(
|
||||
context.Background(),
|
||||
os.Getenv("S3_HOST"),
|
||||
os.Getenv("S3_USER"),
|
||||
os.Getenv("S3_PASSWORD"),
|
||||
|
||||
@@ -19,6 +19,7 @@ type storage struct {
|
||||
}
|
||||
|
||||
func NewRustFSStorage(
|
||||
ctx context.Context,
|
||||
endpoint string,
|
||||
accessKeyID string,
|
||||
secretAccessKey string,
|
||||
@@ -34,7 +35,7 @@ func NewRustFSStorage(
|
||||
return nil, err
|
||||
}
|
||||
|
||||
ctx, cancel := context.WithTimeout(context.Background(), 3*time.Second)
|
||||
ctx, cancel := context.WithTimeout(ctx, 3*time.Second)
|
||||
defer cancel()
|
||||
err = client.CreateBucket(
|
||||
ctx,
|
||||
|
||||
Reference in New Issue
Block a user