Added docs for cpl.environment
This commit is contained in:
@@ -21,7 +21,9 @@ class ServiceCollectionABC(ABC):
|
||||
Parameter
|
||||
---------
|
||||
db_context: Type[:class:`cpl.database.context.database_context_abc.DatabaseContextABC`]
|
||||
Database context
|
||||
db_settings: :class:`cpl.database.database_settings.DatabaseSettings`
|
||||
Database settings
|
||||
"""
|
||||
pass
|
||||
|
||||
@@ -37,7 +39,9 @@ class ServiceCollectionABC(ABC):
|
||||
Parameter
|
||||
---------
|
||||
service_type: :class:`Type`
|
||||
Type of the service
|
||||
service: :class:`Callable`
|
||||
Object of the service
|
||||
"""
|
||||
pass
|
||||
|
||||
@@ -48,7 +52,9 @@ class ServiceCollectionABC(ABC):
|
||||
Parameter
|
||||
---------
|
||||
service_type: :class:`Type`
|
||||
Type of the service
|
||||
service: :class:`Callable`
|
||||
Object of the service
|
||||
"""
|
||||
pass
|
||||
|
||||
@@ -59,7 +65,9 @@ class ServiceCollectionABC(ABC):
|
||||
Parameter
|
||||
---------
|
||||
service_type: :class:`Type`
|
||||
Type of the service
|
||||
service: :class:`Callable`
|
||||
Object of the service
|
||||
"""
|
||||
pass
|
||||
|
||||
|
@@ -9,7 +9,9 @@ class ServiceDescriptor:
|
||||
Parameter
|
||||
---------
|
||||
implementation: Union[:class:`type`, Optional[:class:`object`]]
|
||||
Object or type of service
|
||||
lifetime: :class:`cpl.dependency_injection.service_lifetime_enum.ServiceLifetimeEnum`
|
||||
Lifetime of the service
|
||||
"""
|
||||
|
||||
def __init__(self, implementation: Union[type, Optional[object]], lifetime: ServiceLifetimeEnum):
|
||||
|
@@ -17,8 +17,11 @@ class ServiceProvider(ServiceProviderABC):
|
||||
Parameter
|
||||
---------
|
||||
service_descriptors: list[:class:`cpl.dependency_injection.service_descriptor.ServiceDescriptor`]
|
||||
Descriptor of the service
|
||||
config: :class:`cpl.configuration.configuration_abc.ConfigurationABC`
|
||||
CPL Configuration
|
||||
db_context: Optional[:class:`cpl.database.context.database_context_abc.DatabaseContextABC`]
|
||||
Database representation
|
||||
"""
|
||||
|
||||
def __init__(self, service_descriptors: list[ServiceDescriptor], config: ConfigurationABC, db_context: Optional[DatabaseContextABC]):
|
||||
|
Reference in New Issue
Block a user