2021-03-20 20:16:51 +03:00
|
|
|
version: "1"
|
|
|
|
|
|
|
|
container:
|
|
|
|
|
|
|
|
core:
|
|
|
|
config:
|
|
|
|
provider: Configuration
|
|
|
|
|
|
|
|
gateways:
|
|
|
|
database_client:
|
|
|
|
provider: Singleton
|
|
|
|
provides: sqlite3.connect
|
|
|
|
args:
|
|
|
|
- container.core.config.database.dsn
|
|
|
|
|
|
|
|
s3_client:
|
|
|
|
provider: Singleton
|
|
|
|
provides: boto3.client
|
|
|
|
kwargs:
|
|
|
|
service_name: s3
|
|
|
|
aws_access_key_id: container.core.config.aws.access_key_id
|
|
|
|
aws_secret_access_key: container.core.config.aws.secret_access_key
|
|
|
|
|
|
|
|
services:
|
|
|
|
user:
|
|
|
|
provider: Factory
|
2021-10-18 23:19:03 +03:00
|
|
|
provides: samples.schema.services.UserService
|
2021-03-20 20:16:51 +03:00
|
|
|
kwargs:
|
|
|
|
db: container.gateways.database_client
|
|
|
|
|
|
|
|
auth:
|
|
|
|
provider: Factory
|
2021-10-18 23:19:03 +03:00
|
|
|
provides: samples.schema.services.AuthService
|
2021-03-20 20:16:51 +03:00
|
|
|
kwargs:
|
|
|
|
db: container.gateways.database_client
|
|
|
|
token_ttl: container.core.config.auth.token_ttl.as_int()
|
|
|
|
|
|
|
|
photo:
|
|
|
|
provider: Factory
|
2021-10-18 23:19:03 +03:00
|
|
|
provides: samples.schema.services.PhotoService
|
2021-03-20 20:16:51 +03:00
|
|
|
kwargs:
|
|
|
|
db: container.gateways.database_client
|
|
|
|
s3: container.gateways.s3_client
|