orionis 0.253.0__py3-none-any.whl → 0.266.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- orionis/application.py +6 -0
- orionis/framework.py +1 -1
- orionis/luminate/{application.py → _application.py} +21 -19
- orionis/luminate/{container → _container}/container.py +4 -4
- orionis/luminate/{container → _container}/container_integrity.py +2 -2
- orionis/luminate/{container → _container}/resolve.py +2 -2
- orionis/luminate/{contracts → _contracts}/application.py +2 -2
- orionis/luminate/{contracts → _contracts}/console/task_manager.py +1 -1
- orionis/luminate/{contracts → _contracts}/facades/commands/scheduler_facade.py +1 -1
- orionis/luminate/{contracts → _contracts}/facades/facade.py +4 -3
- orionis/luminate/{contracts → _contracts}/foundation/providers/service_providers_bootstrapper.py +2 -2
- orionis/luminate/{contracts → _contracts}/providers/service_provider.py +1 -1
- orionis/luminate/{facades → _facades}/app_facade.py +2 -2
- orionis/luminate/{facades → _facades}/commands/commands_facade.py +3 -3
- orionis/luminate/{facades → _facades}/commands/scheduler_facade.py +3 -3
- orionis/luminate/{facades → _facades}/config/config_facade.py +3 -3
- orionis/luminate/{facades → _facades}/environment/environment_facade.py +3 -3
- orionis/luminate/{facades → _facades}/files/path_facade.py +4 -4
- orionis/luminate/{facades → _facades}/log/log_facade.py +2 -2
- orionis/luminate/{foundation → _foundation}/console/command_bootstrapper.py +2 -2
- orionis/luminate/{foundation → _foundation}/environment/environment_bootstrapper.py +3 -3
- orionis/luminate/{foundation → _foundation/foundation}/config/config_bootstrapper.py +3 -3
- orionis/luminate/{foundation → _foundation}/providers/service_providers_bootstrapper.py +4 -4
- orionis/luminate/{providers → _providers}/commands/reactor_commands_service_provider.py +7 -7
- orionis/luminate/{providers → _providers}/commands/scheduler_provider.py +3 -3
- orionis/luminate/{providers → _providers}/config/config_service_provider.py +3 -3
- orionis/luminate/{providers → _providers}/environment/environment__service_provider.py +4 -4
- orionis/luminate/_providers/files/paths_provider.py +21 -0
- orionis/luminate/{providers → _providers}/log/log_service_provider.py +5 -5
- orionis/luminate/{providers → _providers}/service_provider.py +2 -2
- orionis/luminate/{services_ → _services}/commands/reactor_commands_service.py +3 -3
- orionis/luminate/{services_ → _services}/commands/scheduler_service.py +1 -1
- orionis/luminate/{services_ → _services}/config/config_service.py +1 -1
- orionis/luminate/{services_ → _services}/log/log_service.py +1 -1
- orionis/luminate/app.py +19 -0
- orionis/luminate/console/base/command.py +1 -1
- orionis/luminate/console/command_filter.py +1 -1
- orionis/luminate/console/commands/help.py +1 -1
- orionis/luminate/console/commands/schedule_work.py +2 -2
- orionis/luminate/console/dumper/dump_die.py +1 -1
- orionis/luminate/console/kernel.py +1 -1
- orionis/luminate/console/output/console.py +3 -3
- orionis/luminate/console/output/executor.py +1 -1
- orionis/luminate/console/output/progress_bar.py +1 -1
- orionis/luminate/console/parser.py +1 -1
- orionis/luminate/{config → foundation/config}/app/entities/app.py +44 -43
- orionis/luminate/{config → foundation/config}/auth/entities/auth.py +9 -1
- orionis/luminate/foundation/config/cache/entities/cache.py +74 -0
- orionis/luminate/foundation/config/cache/entities/file.py +46 -0
- orionis/luminate/foundation/config/cache/entities/stores.py +46 -0
- orionis/luminate/{contracts/config → foundation/config/contracts}/config.py +8 -12
- orionis/luminate/foundation/config/cors/entities/cors.py +129 -0
- orionis/luminate/foundation/config/database/entities/connections.py +89 -0
- orionis/luminate/foundation/config/database/entities/database.py +62 -0
- orionis/luminate/foundation/config/database/entities/mysql.py +270 -0
- orionis/luminate/foundation/config/database/entities/oracle.py +227 -0
- orionis/luminate/foundation/config/database/entities/pgsql.py +189 -0
- orionis/luminate/foundation/config/database/entities/sqlite.py +178 -0
- orionis/luminate/foundation/config/database/enums/mysql_charsets.py +92 -0
- orionis/luminate/foundation/config/database/enums/mysql_collations.py +53 -0
- orionis/luminate/foundation/config/database/enums/mysql_engine.py +18 -0
- orionis/luminate/foundation/config/database/enums/oracle_encoding.py +44 -0
- orionis/luminate/foundation/config/database/enums/oracle_nencoding.py +31 -0
- orionis/luminate/foundation/config/database/enums/pgsql_charsets.py +90 -0
- orionis/luminate/foundation/config/database/enums/pgsql_collations.py +26 -0
- orionis/luminate/foundation/config/database/enums/pgsql_mode.py +24 -0
- orionis/luminate/foundation/config/database/enums/sqlite_foreign_key.py +12 -0
- orionis/luminate/foundation/config/database/enums/sqlite_journal.py +22 -0
- orionis/luminate/foundation/config/database/enums/sqlite_synchronous.py +16 -0
- orionis/luminate/foundation/config/filesystems/entitites/aws.py +134 -0
- orionis/luminate/foundation/config/filesystems/entitites/disks.py +68 -0
- orionis/luminate/foundation/config/filesystems/entitites/filesystems.py +53 -0
- orionis/luminate/foundation/config/filesystems/entitites/local.py +39 -0
- orionis/luminate/foundation/config/filesystems/entitites/public.py +52 -0
- orionis/luminate/foundation/config/logging/entities/channels.py +115 -0
- orionis/luminate/foundation/config/logging/entities/chunked.py +128 -0
- orionis/luminate/foundation/config/logging/entities/daily.py +113 -0
- orionis/luminate/foundation/config/logging/entities/hourly.py +100 -0
- orionis/luminate/foundation/config/logging/entities/logging.py +51 -0
- orionis/luminate/foundation/config/logging/entities/monthly.py +100 -0
- orionis/luminate/foundation/config/logging/entities/stack.py +74 -0
- orionis/luminate/foundation/config/logging/entities/weekly.py +102 -0
- orionis/luminate/foundation/config/logging/enums/levels.py +21 -0
- orionis/luminate/foundation/config/mail/entities/file.py +41 -0
- orionis/luminate/foundation/config/mail/entities/mail.py +56 -0
- orionis/luminate/foundation/config/mail/entities/mailers.py +54 -0
- orionis/luminate/foundation/config/mail/entities/smtp.py +104 -0
- orionis/luminate/foundation/config/queue/entities/brokers.py +55 -0
- orionis/luminate/foundation/config/queue/entities/database.py +107 -0
- orionis/luminate/foundation/config/queue/entities/queue.py +47 -0
- orionis/luminate/foundation/config/queue/enums/strategy.py +15 -0
- orionis/luminate/foundation/config/roots/paths.py +446 -0
- orionis/luminate/foundation/config/session/entities/session.py +147 -0
- orionis/luminate/foundation/config/session/enums/same_site_policy.py +14 -0
- orionis/luminate/foundation/config/session/helpers/secret_key.py +16 -0
- orionis/luminate/foundation/config/startup.py +203 -0
- orionis/luminate/foundation/config/testing/entities/__init__.py +0 -0
- orionis/luminate/{config → foundation/config/testing}/entities/testing.py +36 -20
- orionis/luminate/foundation/config/testing/enums/__init__.py +0 -0
- orionis/luminate/foundation/config/testing/enums/test_mode.py +12 -0
- orionis/luminate/patterns/__init__.py +0 -4
- orionis/luminate/patterns/singleton/__init__.py +0 -10
- orionis/luminate/services/asynchrony/__init__.py +0 -0
- orionis/luminate/services/asynchrony/async_io.py +31 -0
- orionis/luminate/services/environment/__init__.py +0 -10
- orionis/luminate/services/environment/contracts/__init__.py +0 -5
- orionis/luminate/services/environment/contracts/env.py +0 -11
- orionis/luminate/services/environment/dot_env.py +87 -163
- orionis/luminate/services/environment/env.py +0 -11
- orionis/luminate/services/introspection/__init__.py +0 -0
- orionis/luminate/services/introspection/abstracts/__init__.py +0 -0
- orionis/luminate/services/introspection/abstracts/entities/__init__.py +0 -0
- orionis/luminate/services/introspection/abstracts/entities/abstract_class_attributes.py +37 -0
- orionis/luminate/{support → services}/introspection/abstracts/reflect_abstract.py +1 -1
- orionis/luminate/services/introspection/dependencies/__init__.py +0 -0
- orionis/luminate/services/introspection/dependencies/contracts/__init__.py +0 -0
- orionis/luminate/{support → services}/introspection/dependencies/contracts/reflect_dependencies.py +2 -2
- orionis/luminate/services/introspection/dependencies/entities/__init__.py +0 -0
- orionis/luminate/services/introspection/dependencies/entities/class_dependencies.py +41 -0
- orionis/luminate/services/introspection/dependencies/entities/method_dependencies.py +42 -0
- orionis/luminate/services/introspection/dependencies/entities/resolved_dependencies.py +49 -0
- orionis/luminate/{support → services}/introspection/dependencies/reflect_dependencies.py +4 -4
- orionis/luminate/services/parsers/__init__.py +0 -0
- orionis/luminate/services/parsers/contracts/__init__.py +0 -0
- orionis/luminate/{support/parsers/exception_parser.py → services/parsers/exception.py} +1 -1
- orionis/luminate/services/parsers/serializer.py +15 -0
- orionis/luminate/services/paths/__init__.py +0 -9
- orionis/luminate/services/paths/resolver.py +1 -1
- orionis/luminate/services/standard/__init__.py +0 -0
- orionis/luminate/services/standard/contracts/__init__.py +0 -0
- orionis/luminate/{support → services}/standard/std.py +1 -1
- orionis/luminate/services/system/__init__.py +0 -0
- orionis/luminate/services/system/contracts/__init__.py +0 -0
- orionis/luminate/services/system/contracts/imports.py +31 -0
- orionis/luminate/services/system/contracts/workers.py +18 -0
- orionis/luminate/services/system/imports.py +124 -0
- orionis/luminate/services/system/runtime_imports.py +70 -0
- orionis/luminate/services/{workers/maximum_workers.py → system/workers.py} +2 -1
- orionis/luminate/services/wrapper/__init__.py +0 -0
- orionis/luminate/services/wrapper/dicts/__init__.py +0 -0
- orionis/luminate/services/wrapper/dicts/dot_dict.py +115 -0
- orionis/luminate/support/introspection/__init__.py +0 -5
- orionis/luminate/support/introspection/container_integrity.py +2 -2
- orionis/luminate/support/introspection/instances/__init__.py +0 -5
- orionis/luminate/support/introspection/reflection.py +1 -1
- orionis/luminate/test/__init__.py +0 -23
- orionis/luminate/test/cases/test_async.py +41 -9
- orionis/luminate/test/cases/test_case.py +27 -13
- orionis/luminate/test/cases/test_sync.py +28 -6
- orionis/luminate/test/output/contracts/{test_std_out.py → dumper.py} +2 -1
- orionis/luminate/test/output/{test_std_out.py → dumper.py} +7 -4
- orionis/luminate/test/suites/__init__.py +0 -0
- orionis/luminate/test/suites/contracts/__init__.py +0 -0
- orionis/luminate/test/suites/contracts/test_suite.py +23 -0
- orionis/luminate/test/suites/test_suite.py +101 -0
- orionis/luminate/test/{core → suites}/test_unit.py +16 -8
- orionis/unittesting.py +43 -0
- {orionis-0.253.0.dist-info → orionis-0.266.0.dist-info}/METADATA +19 -3
- orionis-0.266.0.dist-info/RECORD +440 -0
- {orionis-0.253.0.dist-info → orionis-0.266.0.dist-info}/WHEEL +1 -1
- orionis-0.266.0.dist-info/entry_points.txt +2 -0
- orionis-0.266.0.dist-info/zip-safe +1 -0
- tests/example/test_example.py +1 -1
- tests/foundation/__init__.py +0 -0
- tests/foundation/config/__init__.py +0 -0
- tests/foundation/config/app/__init__.py +0 -0
- tests/foundation/config/app/test_app.py +140 -0
- tests/foundation/config/auth/__init__.py +0 -0
- tests/{config → foundation/config/auth}/test_auth.py +6 -3
- tests/foundation/config/cache/__init__.py +0 -0
- tests/foundation/config/cache/test_cache.py +98 -0
- tests/foundation/config/cache/test_cache_file.py +78 -0
- tests/foundation/config/cache/test_cache_stores.py +88 -0
- tests/foundation/config/cors/__init__.py +0 -0
- tests/foundation/config/cors/test_cors.py +121 -0
- tests/foundation/config/database/__init__.py +0 -0
- tests/foundation/config/database/test_database.py +108 -0
- tests/foundation/config/database/test_database_connections.py +129 -0
- tests/foundation/config/database/test_database_mysql.py +231 -0
- tests/foundation/config/database/test_database_oracle.py +204 -0
- tests/foundation/config/database/test_database_pgsql.py +187 -0
- tests/foundation/config/database/test_database_sqlite.py +153 -0
- tests/foundation/config/exceptions/__init__.py +0 -0
- tests/foundation/config/exceptions/test_exceptions_integrity.py +83 -0
- tests/foundation/config/filesystems/__init__.py +0 -0
- tests/foundation/config/filesystems/test_filesystems.py +110 -0
- tests/foundation/config/filesystems/test_filesystems_aws.py +133 -0
- tests/foundation/config/filesystems/test_filesystems_disks.py +114 -0
- tests/foundation/config/filesystems/test_filesystems_local.py +95 -0
- tests/foundation/config/filesystems/test_filesystems_public.py +120 -0
- tests/foundation/config/logging/__init__.py +0 -0
- tests/foundation/config/logging/test_logging.py +48 -0
- tests/foundation/config/logging/test_logging_channels.py +157 -0
- tests/foundation/config/logging/test_logging_chunked.py +166 -0
- tests/foundation/config/logging/test_logging_daily.py +153 -0
- tests/foundation/config/logging/test_logging_hourly.py +131 -0
- tests/foundation/config/logging/test_logging_monthly.py +133 -0
- tests/foundation/config/logging/test_logging_stack.py +124 -0
- tests/foundation/config/logging/test_logging_weekly.py +133 -0
- tests/foundation/config/mail/__init__.py +0 -0
- tests/foundation/config/mail/test_mail.py +73 -0
- tests/foundation/config/mail/test_mail_file.py +61 -0
- tests/foundation/config/mail/test_mail_mailers.py +58 -0
- tests/foundation/config/mail/test_mail_smtp.py +102 -0
- tests/foundation/config/queue/__init__.py +0 -0
- tests/foundation/config/queue/test_queue.py +58 -0
- tests/foundation/config/queue/test_queue_brokers.py +67 -0
- tests/foundation/config/queue/test_queue_database.py +95 -0
- tests/foundation/config/root/__init__.py +0 -0
- tests/foundation/config/root/test_root_paths.py +134 -0
- tests/foundation/config/session/__init__.py +0 -0
- tests/foundation/config/session/test_session.py +138 -0
- tests/foundation/config/startup/__init__.py +0 -0
- tests/foundation/config/startup/test_config_startup.py +134 -0
- tests/foundation/config/testing/__init__.py +0 -0
- tests/foundation/config/testing/test_testing.py +167 -0
- tests/patterns/singleton/test_singleton.py +2 -2
- tests/services/asynchrony/__init__.py +0 -0
- tests/{support/async_io/test_async_coroutine.py → services/asynchrony/test_async_io.py} +6 -5
- tests/services/environment/test_env.py +155 -33
- tests/services/inspection/__init__.py +0 -0
- tests/services/inspection/dependencies/__init__.py +0 -0
- tests/services/inspection/dependencies/mocks/__init__.py +0 -0
- tests/services/inspection/dependencies/mocks/mock_user.py +30 -0
- tests/services/inspection/dependencies/mocks/mock_user_controller.py +27 -0
- tests/services/inspection/dependencies/mocks/mock_users_permissions.py +41 -0
- tests/services/inspection/dependencies/test_reflect_dependencies.py +94 -0
- tests/services/parsers/__init__.py +0 -0
- tests/services/parsers/mocks/__init__.py +0 -0
- tests/services/parsers/mocks/mock_custom_error.py +15 -0
- tests/{support → services}/parsers/test_exception_parser.py +8 -8
- tests/services/path/__init__.py +0 -0
- tests/services/path/test_resolver.py +73 -0
- tests/services/standard/__init__.py +0 -0
- tests/services/standard/test_std.py +127 -0
- tests/services/wrapper/__init__.py +0 -0
- tests/services/wrapper/test_wrapper_doc_dict.py +129 -0
- tests/testing/__init__.py +0 -0
- tests/testing/test_testing_result.py +92 -0
- tests/testing/test_testing_unit.py +138 -0
- orionis/luminate/config/app/__init__.py +0 -10
- orionis/luminate/config/auth/__init__.py +0 -7
- orionis/luminate/config/cache/__init__.py +0 -9
- orionis/luminate/config/cache/entities/cache.py +0 -58
- orionis/luminate/config/cache/entities/file.py +0 -29
- orionis/luminate/config/cache/entities/stores.py +0 -35
- orionis/luminate/config/entities/cors.py +0 -58
- orionis/luminate/config/entities/database.py +0 -204
- orionis/luminate/config/entities/filesystems.py +0 -98
- orionis/luminate/config/entities/logging.py +0 -157
- orionis/luminate/config/entities/mail.py +0 -76
- orionis/luminate/config/entities/queue.py +0 -62
- orionis/luminate/config/entities/session.py +0 -58
- orionis/luminate/providers/files/paths_provider.py +0 -20
- orionis/luminate/services/workers/__init__.py +0 -10
- orionis/luminate/support/adapters/dot_dict.py +0 -29
- orionis/luminate/support/asynchrony/async_io.py +0 -40
- orionis/luminate/support/asynchrony/contracts/async_coroutine.py +0 -26
- orionis/luminate/support/introspection/abstracts/entities/abstract_class_attributes.py +0 -11
- orionis/luminate/support/introspection/dependencies/__init__.py +0 -5
- orionis/luminate/support/introspection/dependencies/entities/class_dependencies.py +0 -11
- orionis/luminate/support/introspection/dependencies/entities/method_dependencies.py +0 -11
- orionis/luminate/support/introspection/dependencies/entities/resolved_dependencies.py +0 -12
- orionis/luminate/support/paths/contracts/resolver.py +0 -67
- orionis/luminate/support/paths/resolver.py +0 -83
- orionis/luminate/test/core/contracts/test_suite.py +0 -30
- orionis/luminate/test/core/test_suite.py +0 -93
- orionis-0.253.0.dist-info/RECORD +0 -318
- orionis-0.253.0.dist-info/entry_points.txt +0 -2
- tests/config/test_app.py +0 -122
- tests/config/test_cache.py +0 -20
- tests/support/adapters/fakes/fake_dict.py +0 -15
- tests/support/adapters/test_doct_dict.py +0 -21
- tests/support/inspection/fakes/fake_reflect_dependencies.py +0 -25
- tests/support/inspection/test_reflect_dependencies.py +0 -67
- tests/support/parsers/fakes/fake_custom_error.py +0 -27
- tests/support/path/test_resolver.py +0 -33
- tests/support/standard/test_std.py +0 -62
- /orionis/{console.py → clinstall.py} +0 -0
- /orionis/luminate/{config → _container}/__init__.py +0 -0
- /orionis/luminate/{container → _container}/exception.py +0 -0
- /orionis/luminate/{container → _container}/lifetimes.py +0 -0
- /orionis/luminate/{config/app/entities → _contracts}/__init__.py +0 -0
- /orionis/luminate/{config/app/enums → _contracts/config}/__init__.py +0 -0
- /orionis/luminate/{config/contracts → _contracts/config}/config.py +0 -0
- /orionis/luminate/{config/auth/entities → _contracts/console}/__init__.py +0 -0
- /orionis/luminate/{config/cache/entities → _contracts/console/base}/__init__.py +0 -0
- /orionis/luminate/{contracts → _contracts}/console/base/command.py +0 -0
- /orionis/luminate/{contracts → _contracts}/console/command_filter.py +0 -0
- /orionis/luminate/{contracts → _contracts}/console/kernel.py +0 -0
- /orionis/luminate/{config/cache/enums → _contracts/console/output}/__init__.py +0 -0
- /orionis/luminate/{contracts → _contracts}/console/output/console.py +0 -0
- /orionis/luminate/{contracts → _contracts}/console/output/executor.py +0 -0
- /orionis/luminate/{contracts → _contracts}/console/output/progress_bar.py +0 -0
- /orionis/luminate/{contracts → _contracts}/console/parser.py +0 -0
- /orionis/luminate/{contracts → _contracts}/container/container.py +0 -0
- /orionis/luminate/{contracts → _contracts}/container/container_integrity.py +0 -0
- /orionis/luminate/{config/contracts → _contracts/facades}/__init__.py +0 -0
- /orionis/luminate/{config/exceptions → _contracts/facades/commands}/__init__.py +0 -0
- /orionis/luminate/{contracts → _contracts}/facades/commands/commands_facade.py +0 -0
- /orionis/luminate/{container → _contracts/facades/config}/__init__.py +0 -0
- /orionis/luminate/{contracts → _contracts}/facades/config/config_facade.py +0 -0
- /orionis/luminate/{contracts → _contracts/facades/environment}/__init__.py +0 -0
- /orionis/luminate/{contracts → _contracts}/facades/environment/environment_facade.py +0 -0
- /orionis/luminate/{contracts/config → _contracts/facades/files}/__init__.py +0 -0
- /orionis/luminate/{contracts → _contracts}/facades/files/path_facade.py +0 -0
- /orionis/luminate/{contracts/console → _contracts/facades/log}/__init__.py +0 -0
- /orionis/luminate/{contracts → _contracts}/facades/log/log_facade.py +0 -0
- /orionis/luminate/{contracts/console/base → _contracts/facades/tests}/__init__.py +0 -0
- /orionis/luminate/{contracts → _contracts}/facades/tests/tests_facade.py +0 -0
- /orionis/luminate/{contracts/console/output → _contracts/foundation}/__init__.py +0 -0
- /orionis/luminate/{contracts → _contracts}/foundation/bootstraper.py +0 -0
- /orionis/luminate/{contracts/facades → _contracts/foundation/config}/__init__.py +0 -0
- /orionis/luminate/{contracts → _contracts}/foundation/config/config_bootstrapper.py +0 -0
- /orionis/luminate/{contracts/facades/commands → _contracts/foundation/console}/__init__.py +0 -0
- /orionis/luminate/{contracts → _contracts}/foundation/console/command_bootstrapper.py +0 -0
- /orionis/luminate/{contracts/facades/config → _contracts/foundation/environment}/__init__.py +0 -0
- /orionis/luminate/{contracts → _contracts}/foundation/environment/environment_bootstrapper.py +0 -0
- /orionis/luminate/{contracts/facades/environment → _contracts/foundation/providers}/__init__.py +0 -0
- /orionis/luminate/{contracts/facades/files → _contracts/providers}/__init__.py +0 -0
- /orionis/luminate/{contracts/facades/log → _contracts/services}/__init__.py +0 -0
- /orionis/luminate/{contracts/facades/tests → _contracts/services/commands}/__init__.py +0 -0
- /orionis/luminate/{contracts → _contracts}/services/commands/reactor_commands_service.py +0 -0
- /orionis/luminate/{contracts → _contracts}/services/commands/schedule_service.py +0 -0
- /orionis/luminate/{contracts/foundation → _contracts/services/config}/__init__.py +0 -0
- /orionis/luminate/{contracts → _contracts}/services/config/config_service.py +0 -0
- /orionis/luminate/{contracts/foundation/config → _contracts/services/environment}/__init__.py +0 -0
- /orionis/luminate/{contracts → _contracts}/services/environment/environment_service.py +0 -0
- /orionis/luminate/{contracts/foundation/console → _contracts/services/files}/__init__.py +0 -0
- /orionis/luminate/{contracts → _contracts}/services/files/path_resolver_service.py +0 -0
- /orionis/luminate/{contracts/foundation/environment → _contracts/services/log}/__init__.py +0 -0
- /orionis/luminate/{contracts → _contracts}/services/log/log_service.py +0 -0
- /orionis/luminate/{contracts → _contracts}/support/exception_parse.py +0 -0
- /orionis/luminate/{contracts → _contracts}/support/reflection.py +0 -0
- /orionis/luminate/{contracts/foundation/providers → _facades}/__init__.py +0 -0
- /orionis/luminate/{contracts/providers → _facades/commands}/__init__.py +0 -0
- /orionis/luminate/{contracts/services → _facades/config}/__init__.py +0 -0
- /orionis/luminate/{contracts/services/commands → _facades/environment}/__init__.py +0 -0
- /orionis/luminate/{contracts/services/config → _facades/files}/__init__.py +0 -0
- /orionis/luminate/{contracts/services/environment → _facades/log}/__init__.py +0 -0
- /orionis/luminate/{contracts/services/files → _foundation}/__init__.py +0 -0
- /orionis/luminate/{contracts/services/log → _foundation/console}/__init__.py +0 -0
- /orionis/luminate/{facades → _foundation/environment}/__init__.py +0 -0
- /orionis/luminate/{facades/commands → _foundation/exceptions}/__init__.py +0 -0
- /orionis/luminate/{foundation → _foundation}/exceptions/exception_bootstrapper.py +0 -0
- /orionis/luminate/{foundation → _foundation}/exceptions/exception_providers.py +0 -0
- /orionis/luminate/{facades → _foundation/foundation}/config/__init__.py +0 -0
- /orionis/luminate/{facades/environment → _foundation/providers}/__init__.py +0 -0
- /orionis/luminate/{facades/files → _providers}/__init__.py +0 -0
- /orionis/luminate/{facades/log → _providers/commands}/__init__.py +0 -0
- /orionis/luminate/{foundation/console → _providers/config}/__init__.py +0 -0
- /orionis/luminate/{foundation → _providers}/environment/__init__.py +0 -0
- /orionis/luminate/{foundation/exceptions → _providers/files}/__init__.py +0 -0
- /orionis/luminate/{foundation/providers → _providers/log}/__init__.py +0 -0
- /orionis/luminate/{providers → _services}/__init__.py +0 -0
- /orionis/luminate/{providers → _services}/commands/__init__.py +0 -0
- /orionis/luminate/{providers → _services}/config/__init__.py +0 -0
- /orionis/luminate/{providers/environment → _services/log}/__init__.py +0 -0
- /orionis/luminate/{providers/files → foundation/config/app}/__init__.py +0 -0
- /orionis/luminate/{providers/log → foundation/config/app/entities}/__init__.py +0 -0
- /orionis/luminate/{services_ → foundation/config/app/enums}/__init__.py +0 -0
- /orionis/luminate/{config → foundation/config}/app/enums/ciphers.py +0 -0
- /orionis/luminate/{config → foundation/config}/app/enums/environments.py +0 -0
- /orionis/luminate/{services_/commands → foundation/config/auth}/__init__.py +0 -0
- /orionis/luminate/{services_/config → foundation/config/auth/entities}/__init__.py +0 -0
- /orionis/luminate/{services_/log → foundation/config/cache}/__init__.py +0 -0
- /orionis/luminate/{support/adapters → foundation/config/cache/entities}/__init__.py +0 -0
- /orionis/luminate/{support/asynchrony → foundation/config/cache/enums}/__init__.py +0 -0
- /orionis/luminate/{config → foundation/config}/cache/enums/drivers.py +0 -0
- /orionis/luminate/{support/asynchrony → foundation/config}/contracts/__init__.py +0 -0
- /orionis/luminate/{support/introspection/abstracts → foundation/config/cors}/__init__.py +0 -0
- /orionis/luminate/{support/introspection/abstracts → foundation/config/cors}/entities/__init__.py +0 -0
- /orionis/luminate/{support/introspection/dependencies/contracts → foundation/config/database}/__init__.py +0 -0
- /orionis/luminate/{support/introspection/dependencies → foundation/config/database}/entities/__init__.py +0 -0
- /orionis/luminate/{support/parsers → foundation/config/database/enums}/__init__.py +0 -0
- /orionis/luminate/{support/parsers/contracts → foundation/config/exceptions}/__init__.py +0 -0
- /orionis/luminate/{config/exceptions/integrity_exception.py → foundation/config/exceptions/integrity.py} +0 -0
- /orionis/luminate/{support/paths → foundation/config/filesystems}/__init__.py +0 -0
- /orionis/luminate/{support/paths/contracts → foundation/config/filesystems/entitites}/__init__.py +0 -0
- /orionis/luminate/{support/standard → foundation/config/logging}/__init__.py +0 -0
- /orionis/luminate/{support/standard/contracts → foundation/config/logging/entities}/__init__.py +0 -0
- /orionis/luminate/{test/core → foundation/config/logging/enums}/__init__.py +0 -0
- /orionis/luminate/{test/core/contracts → foundation/config/mail}/__init__.py +0 -0
- {tests/config → orionis/luminate/foundation/config/mail/entities}/__init__.py +0 -0
- {tests/support/adapters → orionis/luminate/foundation/config/queue}/__init__.py +0 -0
- {tests/support/adapters/fakes → orionis/luminate/foundation/config/queue/entities}/__init__.py +0 -0
- {tests/support/async_io → orionis/luminate/foundation/config/roots}/__init__.py +0 -0
- {tests/support/parsers → orionis/luminate/foundation/config/session}/__init__.py +0 -0
- {tests/support/parsers/fakes → orionis/luminate/foundation/config/session/entities}/__init__.py +0 -0
- {tests/support/path → orionis/luminate/foundation/config/session/enums}/__init__.py +0 -0
- {tests/support/standard → orionis/luminate/foundation/config/testing}/__init__.py +0 -0
- /orionis/luminate/{support → services}/parsers/contracts/exception_parser.py +0 -0
- /orionis/luminate/{support → services}/standard/contracts/std.py +0 -0
- /orionis/luminate/test/exceptions/{test_exception.py → test_failure_exception.py} +0 -0
- /orionis/luminate/test/{core → suites}/contracts/test_unit.py +0 -0
- {orionis-0.253.0.dist-info → orionis-0.266.0.dist-info/licenses}/LICENCE +0 -0
- {orionis-0.253.0.dist-info → orionis-0.266.0.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,90 @@
|
|
1
|
+
from enum import Enum
|
2
|
+
|
3
|
+
class PGSQLCharset(Enum):
|
4
|
+
"""
|
5
|
+
Enumeration of supported PostgreSQL character encodings.
|
6
|
+
Each member of this enum represents a valid encoding name that can be used in PostgreSQL databases.
|
7
|
+
These encodings determine how text data is stored and interpreted in the database.
|
8
|
+
Members:
|
9
|
+
BIG5: Traditional Chinese encoding.
|
10
|
+
EUC_CN: Extended Unix Code for Simplified Chinese.
|
11
|
+
EUC_JP: Extended Unix Code for Japanese.
|
12
|
+
EUC_KR: Extended Unix Code for Korean.
|
13
|
+
EUC_TW: Extended Unix Code for Traditional Chinese.
|
14
|
+
GB18030: Chinese National Standard encoding.
|
15
|
+
GBK: Extended Guobiao encoding for Simplified Chinese.
|
16
|
+
ISO_8859_5: ISO 8859-5 Cyrillic encoding.
|
17
|
+
ISO_8859_6: ISO 8859-6 Arabic encoding.
|
18
|
+
ISO_8859_7: ISO 8859-7 Greek encoding.
|
19
|
+
ISO_8859_8: ISO 8859-8 Hebrew encoding.
|
20
|
+
JOHAB: Korean Johab encoding.
|
21
|
+
KOI8R: KOI8-R Russian encoding.
|
22
|
+
KOI8U: KOI8-U Ukrainian encoding.
|
23
|
+
LATIN1: ISO 8859-1 Western European encoding.
|
24
|
+
LATIN2: ISO 8859-2 Central European encoding.
|
25
|
+
LATIN3: ISO 8859-3 South European encoding.
|
26
|
+
LATIN4: ISO 8859-4 North European encoding.
|
27
|
+
LATIN5: ISO 8859-9 Turkish encoding.
|
28
|
+
LATIN6: ISO 8859-10 Nordic encoding.
|
29
|
+
LATIN7: ISO 8859-13 Baltic Rim encoding.
|
30
|
+
LATIN8: ISO 8859-14 Celtic encoding.
|
31
|
+
LATIN9: ISO 8859-15 Western European encoding with Euro.
|
32
|
+
LATIN10: ISO 8859-16 South-Eastern European encoding.
|
33
|
+
MULE_INTERNAL: Mule internal encoding.
|
34
|
+
SJIS: Shift JIS Japanese encoding.
|
35
|
+
SQL_ASCII: No encoding; raw bytes.
|
36
|
+
UHC: Unified Hangul Code for Korean.
|
37
|
+
UTF8: Unicode UTF-8 encoding.
|
38
|
+
WIN866: Windows code page 866 (Cyrillic).
|
39
|
+
WIN874: Windows code page 874 (Thai).
|
40
|
+
WIN1250: Windows code page 1250 (Central European).
|
41
|
+
WIN1251: Windows code page 1251 (Cyrillic).
|
42
|
+
WIN1252: Windows code page 1252 (Western European).
|
43
|
+
WIN1253: Windows code page 1253 (Greek).
|
44
|
+
WIN1254: Windows code page 1254 (Turkish).
|
45
|
+
WIN1255: Windows code page 1255 (Hebrew).
|
46
|
+
WIN1256: Windows code page 1256 (Arabic).
|
47
|
+
WIN1257: Windows code page 1257 (Baltic).
|
48
|
+
WIN1258: Windows code page 1258 (Vietnamese).
|
49
|
+
"""
|
50
|
+
|
51
|
+
BIG5 = "BIG5"
|
52
|
+
EUC_CN = "EUC_CN"
|
53
|
+
EUC_JP = "EUC_JP"
|
54
|
+
EUC_KR = "EUC_KR"
|
55
|
+
EUC_TW = "EUC_TW"
|
56
|
+
GB18030 = "GB18030"
|
57
|
+
GBK = "GBK"
|
58
|
+
ISO_8859_5 = "ISO_8859_5"
|
59
|
+
ISO_8859_6 = "ISO_8859_6"
|
60
|
+
ISO_8859_7 = "ISO_8859_7"
|
61
|
+
ISO_8859_8 = "ISO_8859_8"
|
62
|
+
JOHAB = "JOHAB"
|
63
|
+
KOI8R = "KOI8R"
|
64
|
+
KOI8U = "KOI8U"
|
65
|
+
LATIN1 = "LATIN1"
|
66
|
+
LATIN2 = "LATIN2"
|
67
|
+
LATIN3 = "LATIN3"
|
68
|
+
LATIN4 = "LATIN4"
|
69
|
+
LATIN5 = "LATIN5"
|
70
|
+
LATIN6 = "LATIN6"
|
71
|
+
LATIN7 = "LATIN7"
|
72
|
+
LATIN8 = "LATIN8"
|
73
|
+
LATIN9 = "LATIN9"
|
74
|
+
LATIN10 = "LATIN10"
|
75
|
+
MULE_INTERNAL = "MULE_INTERNAL"
|
76
|
+
SJIS = "SJIS"
|
77
|
+
SQL_ASCII = "SQL_ASCII"
|
78
|
+
UHC = "UHC"
|
79
|
+
UTF8 = "UTF8"
|
80
|
+
WIN866 = "WIN866"
|
81
|
+
WIN874 = "WIN874"
|
82
|
+
WIN1250 = "WIN1250"
|
83
|
+
WIN1251 = "WIN1251"
|
84
|
+
WIN1252 = "WIN1252"
|
85
|
+
WIN1253 = "WIN1253"
|
86
|
+
WIN1254 = "WIN1254"
|
87
|
+
WIN1255 = "WIN1255"
|
88
|
+
WIN1256 = "WIN1256"
|
89
|
+
WIN1257 = "WIN1257"
|
90
|
+
WIN1258 = "WIN1258"
|
@@ -0,0 +1,26 @@
|
|
1
|
+
from enum import Enum
|
2
|
+
|
3
|
+
class PGSQLCollation(Enum):
|
4
|
+
"""
|
5
|
+
Enumeration of common collations in PostgreSQL.
|
6
|
+
PostgreSQL supports collations based on the operating system and locales.
|
7
|
+
The names may vary depending on the system, but some common ones are listed here.
|
8
|
+
Attributes:
|
9
|
+
C: 'C' - Binary collation, fast, based on byte order.
|
10
|
+
POSIX: 'POSIX' - Similar to 'C', binary order.
|
11
|
+
EN_US: 'en_US' - English (United States), case-sensitive.
|
12
|
+
EN_US_UTF8: 'en_US.utf8' - English (United States), UTF-8 encoding.
|
13
|
+
ES_ES: 'es_ES' - Spanish (Spain).
|
14
|
+
ES_ES_UTF8: 'es_ES.utf8' - Spanish (Spain), UTF-8 encoding.
|
15
|
+
DE_DE: 'de_DE' - German (Germany).
|
16
|
+
DE_DE_UTF8: 'de_DE.utf8' - German (Germany), UTF-8 encoding.
|
17
|
+
"""
|
18
|
+
|
19
|
+
C = "C"
|
20
|
+
POSIX = "POSIX"
|
21
|
+
EN_US = "en_US"
|
22
|
+
EN_US_UTF8 = "en_US.utf8"
|
23
|
+
ES_ES = "es_ES"
|
24
|
+
ES_ES_UTF8 = "es_ES.utf8"
|
25
|
+
DE_DE = "de_DE"
|
26
|
+
DE_DE_UTF8 = "de_DE.utf8"
|
@@ -0,0 +1,24 @@
|
|
1
|
+
from enum import Enum
|
2
|
+
|
3
|
+
class PGSQLSSLMode(Enum):
|
4
|
+
"""
|
5
|
+
SSL modes for PostgreSQL connections.
|
6
|
+
Corresponds to the 'sslmode' parameter in libpq.
|
7
|
+
|
8
|
+
Official values documented at:
|
9
|
+
https://www.postgresql.org/docs/current/libpq-ssl.html
|
10
|
+
|
11
|
+
- DISABLE: No SSL (not secure)
|
12
|
+
- ALLOW: Attempts SSL, silently falls back if unavailable
|
13
|
+
- PREFER: Uses SSL if available (common default)
|
14
|
+
- REQUIRE: Requires SSL (no certificate validation)
|
15
|
+
- VERIFY_CA: Validates the server certificate against the CA
|
16
|
+
- VERIFY_FULL: Validates both the certificate and the host name (most secure)
|
17
|
+
"""
|
18
|
+
|
19
|
+
DISABLE = "disable" # No SSL (not secure)
|
20
|
+
ALLOW = "allow" # Attempts SSL, silently falls back if unavailable
|
21
|
+
PREFER = "prefer" # Uses SSL if available (common default)
|
22
|
+
REQUIRE = "require" # Requires SSL (no certificate validation)
|
23
|
+
VERIFY_CA = "verify-ca" # Validates the server certificate against the CA
|
24
|
+
VERIFY_FULL = "verify-full" # Validates both the certificate and the host name (most secure)
|
@@ -0,0 +1,12 @@
|
|
1
|
+
from enum import Enum
|
2
|
+
|
3
|
+
class SQLiteForeignKey(Enum):
|
4
|
+
"""
|
5
|
+
Enumeration for representing the state of foreign key constraints in SQLite.
|
6
|
+
Attributes:
|
7
|
+
ON (str): Enables foreign key constraint enforcement.
|
8
|
+
OFF (str): Disables foreign key constraint enforcement.
|
9
|
+
"""
|
10
|
+
|
11
|
+
ON = "ON" # Enables foreign key constraint enforcement
|
12
|
+
OFF = "OFF" # Disables foreign key constraint enforcement
|
@@ -0,0 +1,22 @@
|
|
1
|
+
from enum import Enum
|
2
|
+
|
3
|
+
class SQLiteJournalMode(Enum):
|
4
|
+
"""
|
5
|
+
Enumeration of SQLite journal modes.
|
6
|
+
SQLite uses different journal modes to control how transactions are logged and how database integrity is maintained.
|
7
|
+
Each mode offers a trade-off between performance, durability, and concurrency.
|
8
|
+
Members:
|
9
|
+
DELETE: (Default) The journal file is deleted at the end of each transaction.
|
10
|
+
TRUNCATE: The journal file is truncated to zero bytes instead of being deleted.
|
11
|
+
PERSIST: The journal file is retained but marked as inactive after a transaction.
|
12
|
+
MEMORY: The journal is kept in volatile memory, offering faster performance but less safety.
|
13
|
+
WAL: Write-Ahead Logging mode, which can improve concurrency and performance.
|
14
|
+
OFF: Disables journaling entirely, providing no protection against failures.
|
15
|
+
"""
|
16
|
+
|
17
|
+
DELETE = "DELETE" # (Default) The journal file is deleted at the end of the transaction.
|
18
|
+
TRUNCATE = "TRUNCATE" # Empties (truncates) the journal file to zero bytes instead of deleting it.
|
19
|
+
PERSIST = "PERSIST" # Keeps the journal file but marks it as inactive.
|
20
|
+
MEMORY = "MEMORY" # Keeps the journal in memory (faster, less safe).
|
21
|
+
WAL = "WAL" # Uses Write-Ahead Logging, improves concurrency and performance in many cases.
|
22
|
+
OFF = "OFF" # Disables journaling (risky: no protection against failures).
|
@@ -0,0 +1,16 @@
|
|
1
|
+
from enum import Enum
|
2
|
+
|
3
|
+
class SQLiteSynchronous(Enum):
|
4
|
+
"""
|
5
|
+
Enum representing the possible values for SQLite's synchronous setting.
|
6
|
+
Attributes:
|
7
|
+
FULL: Provides maximum data integrity and durability, but is the slowest option.
|
8
|
+
NORMAL: Offers a balance between data safety and performance.
|
9
|
+
OFF: Maximizes speed, but data may be lost in the event of a crash.
|
10
|
+
These values correspond to the SQLite PRAGMA synchronous settings:
|
11
|
+
https://www.sqlite.org/pragma.html#pragma_synchronous
|
12
|
+
"""
|
13
|
+
|
14
|
+
FULL = "FULL" # Greater safety, slower
|
15
|
+
NORMAL = "NORMAL" # Balance between safety and performance
|
16
|
+
OFF = "OFF" # Greater speed, less safe in case of failures
|
@@ -0,0 +1,134 @@
|
|
1
|
+
from dataclasses import asdict, dataclass, field
|
2
|
+
from typing import Optional
|
3
|
+
from orionis.luminate.foundation.config.exceptions.integrity import OrionisIntegrityException
|
4
|
+
|
5
|
+
@dataclass(unsafe_hash=True, kw_only=True)
|
6
|
+
class S3:
|
7
|
+
"""
|
8
|
+
Represents an AWS S3 storage configuration.
|
9
|
+
|
10
|
+
Attributes
|
11
|
+
----------
|
12
|
+
driver : str
|
13
|
+
The storage driver (default: 's3').
|
14
|
+
key : str
|
15
|
+
AWS access key ID.
|
16
|
+
secret : str
|
17
|
+
AWS secret access key.
|
18
|
+
region : str
|
19
|
+
AWS region where the bucket is located.
|
20
|
+
bucket : str
|
21
|
+
The S3 bucket name.
|
22
|
+
url : Optional[str], default=None
|
23
|
+
The URL endpoint for accessing the S3 bucket.
|
24
|
+
endpoint : Optional[str], default=None
|
25
|
+
The AWS S3 endpoint URL.
|
26
|
+
use_path_style_endpoint : bool, default=False
|
27
|
+
Whether to use a path-style endpoint.
|
28
|
+
"""
|
29
|
+
|
30
|
+
key: str = field(
|
31
|
+
default="",
|
32
|
+
metadata={
|
33
|
+
"description": "AWS access key ID.",
|
34
|
+
"default": ""
|
35
|
+
}
|
36
|
+
)
|
37
|
+
|
38
|
+
secret: str = field(
|
39
|
+
default="",
|
40
|
+
metadata={
|
41
|
+
"description": "AWS secret access key.",
|
42
|
+
"default": ""
|
43
|
+
}
|
44
|
+
)
|
45
|
+
|
46
|
+
region: str = field(
|
47
|
+
default="us-east-1",
|
48
|
+
metadata={
|
49
|
+
"description": "AWS region where the bucket is located.",
|
50
|
+
"default": "us-east-1"
|
51
|
+
}
|
52
|
+
)
|
53
|
+
|
54
|
+
bucket: str = field(
|
55
|
+
default="",
|
56
|
+
metadata={
|
57
|
+
"description": "The S3 bucket name.",
|
58
|
+
"default": ""
|
59
|
+
}
|
60
|
+
)
|
61
|
+
|
62
|
+
url: Optional[str] = field(
|
63
|
+
default=None,
|
64
|
+
metadata={
|
65
|
+
"description": "The URL endpoint for accessing the S3 bucket.",
|
66
|
+
"default": None
|
67
|
+
}
|
68
|
+
)
|
69
|
+
|
70
|
+
endpoint: Optional[str] = field(
|
71
|
+
default=None,
|
72
|
+
metadata={
|
73
|
+
"description": "The AWS S3 endpoint URL.",
|
74
|
+
"default": None
|
75
|
+
}
|
76
|
+
)
|
77
|
+
|
78
|
+
use_path_style_endpoint: bool = field(
|
79
|
+
default=False,
|
80
|
+
metadata={
|
81
|
+
"description": "Whether to use a path-style endpoint.",
|
82
|
+
"default": False
|
83
|
+
}
|
84
|
+
)
|
85
|
+
|
86
|
+
throw: bool = field(
|
87
|
+
default=False,
|
88
|
+
metadata={
|
89
|
+
"description": "Whether to raise an exception on errors.",
|
90
|
+
"default": False
|
91
|
+
}
|
92
|
+
)
|
93
|
+
|
94
|
+
def __post_init__(self):
|
95
|
+
"""
|
96
|
+
Validates the initialization of the AWS filesystem entity attributes.
|
97
|
+
|
98
|
+
Raises:
|
99
|
+
OrionisIntegrityException: If any attribute is of the wrong type or empty.
|
100
|
+
|
101
|
+
Ensures that all required attributes are of the correct type and, where applicable, are non-empty.
|
102
|
+
"""
|
103
|
+
|
104
|
+
if not isinstance(self.key, str):
|
105
|
+
raise OrionisIntegrityException("The 'key' attribute must be a string.")
|
106
|
+
|
107
|
+
if not isinstance(self.secret, str):
|
108
|
+
raise OrionisIntegrityException("The 'secret' attribute must be a string.")
|
109
|
+
|
110
|
+
if not isinstance(self.region, str) or not self.region:
|
111
|
+
raise OrionisIntegrityException("The 'region' attribute must be a non-empty string.")
|
112
|
+
|
113
|
+
if not isinstance(self.bucket, str):
|
114
|
+
raise OrionisIntegrityException("The 'bucket' attribute must be a string.")
|
115
|
+
|
116
|
+
if self.url is not None and not isinstance(self.url, str):
|
117
|
+
raise OrionisIntegrityException("The 'url' attribute must be a string or None.")
|
118
|
+
|
119
|
+
if self.endpoint is not None and not isinstance(self.endpoint, str):
|
120
|
+
raise OrionisIntegrityException("The 'endpoint' attribute must be a string or None.")
|
121
|
+
|
122
|
+
if not isinstance(self.use_path_style_endpoint, bool):
|
123
|
+
raise OrionisIntegrityException("The 'use_path_style_endpoint' attribute must be a boolean.")
|
124
|
+
|
125
|
+
if not isinstance(self.throw, bool):
|
126
|
+
raise OrionisIntegrityException("The 'throw' attribute must be a boolean.")
|
127
|
+
|
128
|
+
def toDict(self) -> dict:
|
129
|
+
"""
|
130
|
+
Convert the object to a dictionary representation.
|
131
|
+
Returns:
|
132
|
+
dict: A dictionary representation of the Dataclass object.
|
133
|
+
"""
|
134
|
+
return asdict(self)
|
@@ -0,0 +1,68 @@
|
|
1
|
+
from dataclasses import asdict, dataclass, field
|
2
|
+
from orionis.luminate.foundation.config.exceptions.integrity import OrionisIntegrityException
|
3
|
+
from orionis.luminate.foundation.config.filesystems.entitites.aws import S3
|
4
|
+
from orionis.luminate.foundation.config.filesystems.entitites.public import Public
|
5
|
+
from orionis.luminate.foundation.config.filesystems.entitites.local import Local
|
6
|
+
|
7
|
+
@dataclass(unsafe_hash=True, kw_only=True)
|
8
|
+
class Disks:
|
9
|
+
"""
|
10
|
+
Represents the configuration for different filesystem disks.
|
11
|
+
Attributes:
|
12
|
+
local (Local): The disk configuration for local file storage.
|
13
|
+
public (Public): The disk configuration for public file storage.
|
14
|
+
Methods:
|
15
|
+
__post_init__():
|
16
|
+
Ensures the 'path' attribute is a non-empty Path object and of the correct type.
|
17
|
+
toDict() -> dict:
|
18
|
+
Converts the Disks object into a dictionary representation.
|
19
|
+
"""
|
20
|
+
|
21
|
+
local : Local = field(
|
22
|
+
default_factory=Local,
|
23
|
+
metadata={
|
24
|
+
"description": "The absolute or relative path where local files are stored.",
|
25
|
+
"default": "Local()",
|
26
|
+
}
|
27
|
+
)
|
28
|
+
|
29
|
+
public : Public = field(
|
30
|
+
default_factory=Public,
|
31
|
+
metadata={
|
32
|
+
"description": "The absolute or relative path where public files are stored.",
|
33
|
+
"default": "Public()",
|
34
|
+
}
|
35
|
+
)
|
36
|
+
|
37
|
+
aws : S3 = field(
|
38
|
+
default_factory=S3,
|
39
|
+
metadata={
|
40
|
+
"description": "The configuration for AWS S3 storage.",
|
41
|
+
"default": "S3()",
|
42
|
+
}
|
43
|
+
)
|
44
|
+
|
45
|
+
def __post_init__(self):
|
46
|
+
"""
|
47
|
+
Post-initialization method to ensure the 'path' attribute is a non-empty Path object.
|
48
|
+
- Converts 'path' to a Path instance if it is not already.
|
49
|
+
- Raises:
|
50
|
+
ValueError: If the 'path' is empty after conversion.
|
51
|
+
"""
|
52
|
+
|
53
|
+
if not isinstance(self.local, Local):
|
54
|
+
raise OrionisIntegrityException("The 'local' attribute must be a Local object.")
|
55
|
+
|
56
|
+
if not isinstance(self.public, Public):
|
57
|
+
raise OrionisIntegrityException("The 'public' attribute must be a Public object.")
|
58
|
+
|
59
|
+
if not isinstance(self.aws, S3):
|
60
|
+
raise OrionisIntegrityException("The 'aws' attribute must be a S3 object.")
|
61
|
+
|
62
|
+
def toDict(self) -> dict:
|
63
|
+
"""
|
64
|
+
Convert the object to a dictionary representation.
|
65
|
+
Returns:
|
66
|
+
dict: A dictionary representation of the Dataclass object.
|
67
|
+
"""
|
68
|
+
return asdict(self)
|
@@ -0,0 +1,53 @@
|
|
1
|
+
from dataclasses import dataclass, field, asdict, fields
|
2
|
+
from orionis.luminate.foundation.config.filesystems.entitites.disks import Disks
|
3
|
+
from orionis.luminate.foundation.config.exceptions.integrity import OrionisIntegrityException
|
4
|
+
|
5
|
+
@dataclass(unsafe_hash=True, kw_only=True)
|
6
|
+
class Filesystems:
|
7
|
+
"""
|
8
|
+
Represents the filesystems configuration.
|
9
|
+
|
10
|
+
Attributes
|
11
|
+
----------
|
12
|
+
default : str
|
13
|
+
The default filesystem disk to use.
|
14
|
+
disks : Disks
|
15
|
+
A collection of available filesystem disks.
|
16
|
+
"""
|
17
|
+
|
18
|
+
default: str = field(
|
19
|
+
default="local",
|
20
|
+
metadata={
|
21
|
+
"description": "The default filesystem disk to use.",
|
22
|
+
"default": "local",
|
23
|
+
}
|
24
|
+
)
|
25
|
+
|
26
|
+
disks: Disks = field(
|
27
|
+
default_factory=Disks,
|
28
|
+
metadata={
|
29
|
+
"description": "A collection of available filesystem disks.",
|
30
|
+
"default": "Disks()",
|
31
|
+
}
|
32
|
+
)
|
33
|
+
|
34
|
+
def __post_init__(self):
|
35
|
+
"""
|
36
|
+
Validates the types of the attributes after initialization.
|
37
|
+
"""
|
38
|
+
options = [f.name for f in fields(Disks)]
|
39
|
+
if not isinstance(self.default, str) or self.default not in options:
|
40
|
+
raise OrionisIntegrityException(
|
41
|
+
f"The 'default' property must be a string and match one of the available options ({options})."
|
42
|
+
)
|
43
|
+
|
44
|
+
if not isinstance(self.disks, Disks):
|
45
|
+
raise OrionisIntegrityException(
|
46
|
+
"The 'disks' property must be an instance of Disks."
|
47
|
+
)
|
48
|
+
|
49
|
+
def toDict(self) -> dict:
|
50
|
+
"""
|
51
|
+
Converts the current instance into a dictionary representation.
|
52
|
+
"""
|
53
|
+
return asdict(self)
|
@@ -0,0 +1,39 @@
|
|
1
|
+
from dataclasses import asdict, dataclass, field
|
2
|
+
from orionis.luminate.foundation.config.exceptions.integrity import OrionisIntegrityException
|
3
|
+
|
4
|
+
@dataclass(unsafe_hash=True, kw_only=True)
|
5
|
+
class Local:
|
6
|
+
"""
|
7
|
+
Represents a local filesystem configuration.
|
8
|
+
|
9
|
+
Attributes
|
10
|
+
----------
|
11
|
+
path : str
|
12
|
+
The absolute or relative path where local files are stored.
|
13
|
+
"""
|
14
|
+
path: str = field(
|
15
|
+
default="storage/app/private",
|
16
|
+
metadata={
|
17
|
+
"description": "The absolute or relative path where local files are stored.",
|
18
|
+
"default": "storage/app/private",
|
19
|
+
}
|
20
|
+
)
|
21
|
+
|
22
|
+
def __post_init__(self):
|
23
|
+
"""
|
24
|
+
Post-initialization method to ensure the 'path' attribute is a non-empty string.
|
25
|
+
- Raises:
|
26
|
+
ValueError: If the 'path' is empty.
|
27
|
+
"""
|
28
|
+
if not isinstance(self.path, str):
|
29
|
+
raise OrionisIntegrityException("The 'path' attribute must be a string.")
|
30
|
+
if not self.path.strip():
|
31
|
+
raise OrionisIntegrityException("The 'path' attribute cannot be empty.")
|
32
|
+
|
33
|
+
def toDict(self) -> dict:
|
34
|
+
"""
|
35
|
+
Convert the object to a dictionary representation.
|
36
|
+
Returns:
|
37
|
+
dict: A dictionary representation of the Dataclass object.
|
38
|
+
"""
|
39
|
+
return asdict(self)
|
@@ -0,0 +1,52 @@
|
|
1
|
+
from dataclasses import asdict, dataclass, field
|
2
|
+
from orionis.luminate.foundation.config.exceptions.integrity import OrionisIntegrityException
|
3
|
+
|
4
|
+
@dataclass(unsafe_hash=True, kw_only=True)
|
5
|
+
class Public:
|
6
|
+
"""
|
7
|
+
Represents a local filesystem configuration.
|
8
|
+
|
9
|
+
Attributes
|
10
|
+
----------
|
11
|
+
path : str
|
12
|
+
The absolute or relative path where public files are stored.
|
13
|
+
"""
|
14
|
+
path: str = field(
|
15
|
+
default="storage/app/public",
|
16
|
+
metadata={
|
17
|
+
"description": "The absolute or relative path where public files are stored.",
|
18
|
+
"default": "storage/app/public",
|
19
|
+
}
|
20
|
+
)
|
21
|
+
|
22
|
+
url: str = field(
|
23
|
+
default="static",
|
24
|
+
metadata={
|
25
|
+
"description": "The URL where the public files can be accessed.",
|
26
|
+
"default": "static",
|
27
|
+
}
|
28
|
+
)
|
29
|
+
|
30
|
+
def __post_init__(self):
|
31
|
+
"""
|
32
|
+
Post-initialization method to ensure the 'path' attribute is a non-empty string.
|
33
|
+
- Raises:
|
34
|
+
OrionisIntegrityException: If any of the attributes are not of the expected type or are empty.
|
35
|
+
"""
|
36
|
+
|
37
|
+
if not isinstance(self.path, str):
|
38
|
+
raise OrionisIntegrityException("The 'path' attribute must be a string.")
|
39
|
+
|
40
|
+
if not isinstance(self.url, str):
|
41
|
+
raise OrionisIntegrityException("The 'url' attribute must be a string.")
|
42
|
+
|
43
|
+
if not self.path.strip() or not self.url.strip():
|
44
|
+
raise OrionisIntegrityException("The 'path' and 'url' attributes cannot be empty.")
|
45
|
+
|
46
|
+
def toDict(self) -> dict:
|
47
|
+
"""
|
48
|
+
Convert the object to a dictionary representation.
|
49
|
+
Returns:
|
50
|
+
dict: A dictionary representation of the Dataclass object.
|
51
|
+
"""
|
52
|
+
return asdict(self)
|
@@ -0,0 +1,115 @@
|
|
1
|
+
from dataclasses import asdict, dataclass, field
|
2
|
+
from orionis.luminate.foundation.config.logging.entities.monthly import Monthly
|
3
|
+
from orionis.luminate.foundation.config.logging.entities.chunked import Chunked
|
4
|
+
from orionis.luminate.foundation.config.logging.entities.daily import Daily
|
5
|
+
from orionis.luminate.foundation.config.logging.entities.hourly import Hourly
|
6
|
+
from orionis.luminate.foundation.config.logging.entities.stack import Stack
|
7
|
+
from orionis.luminate.foundation.config.logging.entities.weekly import Weekly
|
8
|
+
from orionis.luminate.foundation.config.exceptions.integrity import OrionisIntegrityException
|
9
|
+
|
10
|
+
@dataclass(unsafe_hash=True, kw_only=True)
|
11
|
+
class Channels:
|
12
|
+
"""
|
13
|
+
Represents the different logging channels available.
|
14
|
+
"""
|
15
|
+
|
16
|
+
stack: Stack = field(
|
17
|
+
default_factory=Stack,
|
18
|
+
metadata={
|
19
|
+
"description": "Configuration for stack log channel.",
|
20
|
+
"default": "Stack()",
|
21
|
+
}
|
22
|
+
)
|
23
|
+
|
24
|
+
hourly: Hourly = field(
|
25
|
+
default_factory=Hourly,
|
26
|
+
metadata={
|
27
|
+
"description": "Configuration for hourly log rotation.",
|
28
|
+
"default": "Hourly()",
|
29
|
+
}
|
30
|
+
)
|
31
|
+
|
32
|
+
daily: Daily = field(
|
33
|
+
default_factory=Daily,
|
34
|
+
metadata={
|
35
|
+
"description": "Configuration for daily log rotation.",
|
36
|
+
"default": "Daily()",
|
37
|
+
}
|
38
|
+
)
|
39
|
+
|
40
|
+
weekly: Weekly = field(
|
41
|
+
default_factory=Weekly,
|
42
|
+
metadata={
|
43
|
+
"description": "Configuration for weekly log rotation.",
|
44
|
+
"default": "Weekly()",
|
45
|
+
}
|
46
|
+
)
|
47
|
+
|
48
|
+
monthly: Monthly = field(
|
49
|
+
default_factory=Monthly,
|
50
|
+
metadata={
|
51
|
+
"description": "Configuration for monthly log rotation.",
|
52
|
+
"default": "Monthly()",
|
53
|
+
}
|
54
|
+
)
|
55
|
+
|
56
|
+
chunked: Chunked = field(
|
57
|
+
default_factory=Chunked,
|
58
|
+
metadata={
|
59
|
+
"description": "Configuration for chunked log file storage.",
|
60
|
+
"default": "Chunked()",
|
61
|
+
}
|
62
|
+
)
|
63
|
+
|
64
|
+
def __post_init__(self):
|
65
|
+
"""
|
66
|
+
Post-initialization method to validate the types of log rotation properties.
|
67
|
+
Ensures that the following instance attributes are of the correct types:
|
68
|
+
- `stack` must be an instance of `Stack`
|
69
|
+
- `hourly` must be an instance of `Hourly`
|
70
|
+
- `daily` must be an instance of `Daily`
|
71
|
+
- `weekly` must be an instance of `Weekly`
|
72
|
+
- `monthly` must be an instance of `Monthly`
|
73
|
+
- `chunked` must be an instance of `Chunked`
|
74
|
+
Raises:
|
75
|
+
OrionisIntegrityException: If any of the properties are not instances of their expected classes.
|
76
|
+
"""
|
77
|
+
|
78
|
+
if not isinstance(self.stack, Stack):
|
79
|
+
raise OrionisIntegrityException(
|
80
|
+
"The 'stack' property must be an instance of Stack."
|
81
|
+
)
|
82
|
+
|
83
|
+
if not isinstance(self.hourly, Hourly):
|
84
|
+
raise OrionisIntegrityException(
|
85
|
+
"The 'hourly' property must be an instance of Hourly."
|
86
|
+
)
|
87
|
+
|
88
|
+
if not isinstance(self.daily, Daily):
|
89
|
+
raise OrionisIntegrityException(
|
90
|
+
"The 'daily' property must be an instance of Daily."
|
91
|
+
)
|
92
|
+
|
93
|
+
if not isinstance(self.weekly, Weekly):
|
94
|
+
raise OrionisIntegrityException(
|
95
|
+
"The 'weekly' property must be an instance of Weekly."
|
96
|
+
)
|
97
|
+
|
98
|
+
if not isinstance(self.monthly, Monthly):
|
99
|
+
raise OrionisIntegrityException(
|
100
|
+
"The 'monthly' property must be an instance of Monthly."
|
101
|
+
)
|
102
|
+
|
103
|
+
if not isinstance(self.chunked, Chunked):
|
104
|
+
raise OrionisIntegrityException(
|
105
|
+
"The 'chunked' property must be an instance of Chunked."
|
106
|
+
)
|
107
|
+
|
108
|
+
def toDict(self) -> dict:
|
109
|
+
"""
|
110
|
+
Converts the current instance into a dictionary representation.
|
111
|
+
|
112
|
+
Returns:
|
113
|
+
dict: A dictionary containing all the fields of the instance.
|
114
|
+
"""
|
115
|
+
return asdict(self)
|