flyte 0.0.1b0__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.
Potentially problematic release.
This version of flyte might be problematic. Click here for more details.
- flyte/__init__.py +62 -0
- flyte/_api_commons.py +3 -0
- flyte/_bin/__init__.py +0 -0
- flyte/_bin/runtime.py +126 -0
- flyte/_build.py +25 -0
- flyte/_cache/__init__.py +12 -0
- flyte/_cache/cache.py +146 -0
- flyte/_cache/defaults.py +9 -0
- flyte/_cache/policy_function_body.py +42 -0
- flyte/_cli/__init__.py +0 -0
- flyte/_cli/_common.py +287 -0
- flyte/_cli/_create.py +42 -0
- flyte/_cli/_delete.py +23 -0
- flyte/_cli/_deploy.py +140 -0
- flyte/_cli/_get.py +235 -0
- flyte/_cli/_run.py +152 -0
- flyte/_cli/main.py +72 -0
- flyte/_code_bundle/__init__.py +8 -0
- flyte/_code_bundle/_ignore.py +113 -0
- flyte/_code_bundle/_packaging.py +187 -0
- flyte/_code_bundle/_utils.py +339 -0
- flyte/_code_bundle/bundle.py +178 -0
- flyte/_context.py +146 -0
- flyte/_datastructures.py +342 -0
- flyte/_deploy.py +202 -0
- flyte/_doc.py +29 -0
- flyte/_docstring.py +32 -0
- flyte/_environment.py +43 -0
- flyte/_group.py +31 -0
- flyte/_hash.py +23 -0
- flyte/_image.py +760 -0
- flyte/_initialize.py +634 -0
- flyte/_interface.py +84 -0
- flyte/_internal/__init__.py +3 -0
- flyte/_internal/controllers/__init__.py +115 -0
- flyte/_internal/controllers/_local_controller.py +118 -0
- flyte/_internal/controllers/_trace.py +40 -0
- flyte/_internal/controllers/pbhash.py +39 -0
- flyte/_internal/controllers/remote/__init__.py +40 -0
- flyte/_internal/controllers/remote/_action.py +141 -0
- flyte/_internal/controllers/remote/_client.py +43 -0
- flyte/_internal/controllers/remote/_controller.py +361 -0
- flyte/_internal/controllers/remote/_core.py +402 -0
- flyte/_internal/controllers/remote/_informer.py +361 -0
- flyte/_internal/controllers/remote/_service_protocol.py +50 -0
- flyte/_internal/imagebuild/__init__.py +11 -0
- flyte/_internal/imagebuild/docker_builder.py +416 -0
- flyte/_internal/imagebuild/image_builder.py +241 -0
- flyte/_internal/imagebuild/remote_builder.py +0 -0
- flyte/_internal/resolvers/__init__.py +0 -0
- flyte/_internal/resolvers/_task_module.py +54 -0
- flyte/_internal/resolvers/common.py +31 -0
- flyte/_internal/resolvers/default.py +28 -0
- flyte/_internal/runtime/__init__.py +0 -0
- flyte/_internal/runtime/convert.py +199 -0
- flyte/_internal/runtime/entrypoints.py +135 -0
- flyte/_internal/runtime/io.py +136 -0
- flyte/_internal/runtime/resources_serde.py +138 -0
- flyte/_internal/runtime/task_serde.py +210 -0
- flyte/_internal/runtime/taskrunner.py +190 -0
- flyte/_internal/runtime/types_serde.py +54 -0
- flyte/_logging.py +124 -0
- flyte/_protos/__init__.py +0 -0
- flyte/_protos/common/authorization_pb2.py +66 -0
- flyte/_protos/common/authorization_pb2.pyi +108 -0
- flyte/_protos/common/authorization_pb2_grpc.py +4 -0
- flyte/_protos/common/identifier_pb2.py +71 -0
- flyte/_protos/common/identifier_pb2.pyi +82 -0
- flyte/_protos/common/identifier_pb2_grpc.py +4 -0
- flyte/_protos/common/identity_pb2.py +48 -0
- flyte/_protos/common/identity_pb2.pyi +72 -0
- flyte/_protos/common/identity_pb2_grpc.py +4 -0
- flyte/_protos/common/list_pb2.py +36 -0
- flyte/_protos/common/list_pb2.pyi +69 -0
- flyte/_protos/common/list_pb2_grpc.py +4 -0
- flyte/_protos/common/policy_pb2.py +37 -0
- flyte/_protos/common/policy_pb2.pyi +27 -0
- flyte/_protos/common/policy_pb2_grpc.py +4 -0
- flyte/_protos/common/role_pb2.py +37 -0
- flyte/_protos/common/role_pb2.pyi +53 -0
- flyte/_protos/common/role_pb2_grpc.py +4 -0
- flyte/_protos/common/runtime_version_pb2.py +28 -0
- flyte/_protos/common/runtime_version_pb2.pyi +24 -0
- flyte/_protos/common/runtime_version_pb2_grpc.py +4 -0
- flyte/_protos/logs/dataplane/payload_pb2.py +96 -0
- flyte/_protos/logs/dataplane/payload_pb2.pyi +168 -0
- flyte/_protos/logs/dataplane/payload_pb2_grpc.py +4 -0
- flyte/_protos/secret/definition_pb2.py +49 -0
- flyte/_protos/secret/definition_pb2.pyi +93 -0
- flyte/_protos/secret/definition_pb2_grpc.py +4 -0
- flyte/_protos/secret/payload_pb2.py +62 -0
- flyte/_protos/secret/payload_pb2.pyi +94 -0
- flyte/_protos/secret/payload_pb2_grpc.py +4 -0
- flyte/_protos/secret/secret_pb2.py +38 -0
- flyte/_protos/secret/secret_pb2.pyi +6 -0
- flyte/_protos/secret/secret_pb2_grpc.py +198 -0
- flyte/_protos/secret/secret_pb2_grpc_grpc.py +198 -0
- flyte/_protos/validate/validate/validate_pb2.py +76 -0
- flyte/_protos/workflow/node_execution_service_pb2.py +26 -0
- flyte/_protos/workflow/node_execution_service_pb2.pyi +4 -0
- flyte/_protos/workflow/node_execution_service_pb2_grpc.py +32 -0
- flyte/_protos/workflow/queue_service_pb2.py +106 -0
- flyte/_protos/workflow/queue_service_pb2.pyi +141 -0
- flyte/_protos/workflow/queue_service_pb2_grpc.py +172 -0
- flyte/_protos/workflow/run_definition_pb2.py +128 -0
- flyte/_protos/workflow/run_definition_pb2.pyi +310 -0
- flyte/_protos/workflow/run_definition_pb2_grpc.py +4 -0
- flyte/_protos/workflow/run_logs_service_pb2.py +41 -0
- flyte/_protos/workflow/run_logs_service_pb2.pyi +28 -0
- flyte/_protos/workflow/run_logs_service_pb2_grpc.py +69 -0
- flyte/_protos/workflow/run_service_pb2.py +133 -0
- flyte/_protos/workflow/run_service_pb2.pyi +175 -0
- flyte/_protos/workflow/run_service_pb2_grpc.py +412 -0
- flyte/_protos/workflow/state_service_pb2.py +58 -0
- flyte/_protos/workflow/state_service_pb2.pyi +71 -0
- flyte/_protos/workflow/state_service_pb2_grpc.py +138 -0
- flyte/_protos/workflow/task_definition_pb2.py +72 -0
- flyte/_protos/workflow/task_definition_pb2.pyi +65 -0
- flyte/_protos/workflow/task_definition_pb2_grpc.py +4 -0
- flyte/_protos/workflow/task_service_pb2.py +44 -0
- flyte/_protos/workflow/task_service_pb2.pyi +31 -0
- flyte/_protos/workflow/task_service_pb2_grpc.py +104 -0
- flyte/_resources.py +226 -0
- flyte/_retry.py +32 -0
- flyte/_reusable_environment.py +25 -0
- flyte/_run.py +411 -0
- flyte/_secret.py +61 -0
- flyte/_task.py +367 -0
- flyte/_task_environment.py +200 -0
- flyte/_timeout.py +47 -0
- flyte/_tools.py +27 -0
- flyte/_trace.py +128 -0
- flyte/_utils/__init__.py +20 -0
- flyte/_utils/asyn.py +119 -0
- flyte/_utils/coro_management.py +25 -0
- flyte/_utils/file_handling.py +72 -0
- flyte/_utils/helpers.py +108 -0
- flyte/_utils/lazy_module.py +54 -0
- flyte/_utils/uv_script_parser.py +49 -0
- flyte/_version.py +21 -0
- flyte/connectors/__init__.py +0 -0
- flyte/errors.py +143 -0
- flyte/extras/__init__.py +5 -0
- flyte/extras/_container.py +273 -0
- flyte/io/__init__.py +11 -0
- flyte/io/_dataframe.py +0 -0
- flyte/io/_dir.py +448 -0
- flyte/io/_file.py +468 -0
- flyte/io/pickle/__init__.py +0 -0
- flyte/io/pickle/transformer.py +117 -0
- flyte/io/structured_dataset/__init__.py +129 -0
- flyte/io/structured_dataset/basic_dfs.py +219 -0
- flyte/io/structured_dataset/structured_dataset.py +1061 -0
- flyte/py.typed +0 -0
- flyte/remote/__init__.py +25 -0
- flyte/remote/_client/__init__.py +0 -0
- flyte/remote/_client/_protocols.py +131 -0
- flyte/remote/_client/auth/__init__.py +12 -0
- flyte/remote/_client/auth/_authenticators/__init__.py +0 -0
- flyte/remote/_client/auth/_authenticators/base.py +397 -0
- flyte/remote/_client/auth/_authenticators/client_credentials.py +73 -0
- flyte/remote/_client/auth/_authenticators/device_code.py +118 -0
- flyte/remote/_client/auth/_authenticators/external_command.py +79 -0
- flyte/remote/_client/auth/_authenticators/factory.py +200 -0
- flyte/remote/_client/auth/_authenticators/pkce.py +516 -0
- flyte/remote/_client/auth/_channel.py +184 -0
- flyte/remote/_client/auth/_client_config.py +83 -0
- flyte/remote/_client/auth/_default_html.py +32 -0
- flyte/remote/_client/auth/_grpc_utils/__init__.py +0 -0
- flyte/remote/_client/auth/_grpc_utils/auth_interceptor.py +288 -0
- flyte/remote/_client/auth/_grpc_utils/default_metadata_interceptor.py +151 -0
- flyte/remote/_client/auth/_keyring.py +143 -0
- flyte/remote/_client/auth/_token_client.py +260 -0
- flyte/remote/_client/auth/errors.py +16 -0
- flyte/remote/_client/controlplane.py +95 -0
- flyte/remote/_console.py +18 -0
- flyte/remote/_data.py +155 -0
- flyte/remote/_logs.py +116 -0
- flyte/remote/_project.py +86 -0
- flyte/remote/_run.py +873 -0
- flyte/remote/_secret.py +132 -0
- flyte/remote/_task.py +227 -0
- flyte/report/__init__.py +3 -0
- flyte/report/_report.py +178 -0
- flyte/report/_template.html +124 -0
- flyte/storage/__init__.py +24 -0
- flyte/storage/_remote_fs.py +34 -0
- flyte/storage/_storage.py +251 -0
- flyte/storage/_utils.py +5 -0
- flyte/types/__init__.py +13 -0
- flyte/types/_interface.py +25 -0
- flyte/types/_renderer.py +162 -0
- flyte/types/_string_literals.py +120 -0
- flyte/types/_type_engine.py +2210 -0
- flyte/types/_utils.py +80 -0
- flyte-0.0.1b0.dist-info/METADATA +179 -0
- flyte-0.0.1b0.dist-info/RECORD +390 -0
- flyte-0.0.1b0.dist-info/WHEEL +5 -0
- flyte-0.0.1b0.dist-info/entry_points.txt +3 -0
- flyte-0.0.1b0.dist-info/top_level.txt +1 -0
- union/__init__.py +54 -0
- union/_api_commons.py +3 -0
- union/_bin/__init__.py +0 -0
- union/_bin/runtime.py +113 -0
- union/_build.py +25 -0
- union/_cache/__init__.py +12 -0
- union/_cache/cache.py +141 -0
- union/_cache/defaults.py +9 -0
- union/_cache/policy_function_body.py +42 -0
- union/_cli/__init__.py +0 -0
- union/_cli/_common.py +263 -0
- union/_cli/_create.py +40 -0
- union/_cli/_delete.py +23 -0
- union/_cli/_deploy.py +120 -0
- union/_cli/_get.py +162 -0
- union/_cli/_params.py +579 -0
- union/_cli/_run.py +150 -0
- union/_cli/main.py +72 -0
- union/_code_bundle/__init__.py +8 -0
- union/_code_bundle/_ignore.py +113 -0
- union/_code_bundle/_packaging.py +187 -0
- union/_code_bundle/_utils.py +342 -0
- union/_code_bundle/bundle.py +176 -0
- union/_context.py +146 -0
- union/_datastructures.py +295 -0
- union/_deploy.py +185 -0
- union/_doc.py +29 -0
- union/_docstring.py +26 -0
- union/_environment.py +43 -0
- union/_group.py +31 -0
- union/_hash.py +23 -0
- union/_image.py +760 -0
- union/_initialize.py +585 -0
- union/_interface.py +84 -0
- union/_internal/__init__.py +3 -0
- union/_internal/controllers/__init__.py +77 -0
- union/_internal/controllers/_local_controller.py +77 -0
- union/_internal/controllers/pbhash.py +39 -0
- union/_internal/controllers/remote/__init__.py +40 -0
- union/_internal/controllers/remote/_action.py +131 -0
- union/_internal/controllers/remote/_client.py +43 -0
- union/_internal/controllers/remote/_controller.py +169 -0
- union/_internal/controllers/remote/_core.py +341 -0
- union/_internal/controllers/remote/_informer.py +260 -0
- union/_internal/controllers/remote/_service_protocol.py +44 -0
- union/_internal/imagebuild/__init__.py +11 -0
- union/_internal/imagebuild/docker_builder.py +416 -0
- union/_internal/imagebuild/image_builder.py +243 -0
- union/_internal/imagebuild/remote_builder.py +0 -0
- union/_internal/resolvers/__init__.py +0 -0
- union/_internal/resolvers/_task_module.py +31 -0
- union/_internal/resolvers/common.py +24 -0
- union/_internal/resolvers/default.py +27 -0
- union/_internal/runtime/__init__.py +0 -0
- union/_internal/runtime/convert.py +163 -0
- union/_internal/runtime/entrypoints.py +121 -0
- union/_internal/runtime/io.py +136 -0
- union/_internal/runtime/resources_serde.py +134 -0
- union/_internal/runtime/task_serde.py +202 -0
- union/_internal/runtime/taskrunner.py +179 -0
- union/_internal/runtime/types_serde.py +53 -0
- union/_logging.py +124 -0
- union/_protos/__init__.py +0 -0
- union/_protos/common/authorization_pb2.py +66 -0
- union/_protos/common/authorization_pb2.pyi +106 -0
- union/_protos/common/authorization_pb2_grpc.py +4 -0
- union/_protos/common/identifier_pb2.py +71 -0
- union/_protos/common/identifier_pb2.pyi +82 -0
- union/_protos/common/identifier_pb2_grpc.py +4 -0
- union/_protos/common/identity_pb2.py +48 -0
- union/_protos/common/identity_pb2.pyi +72 -0
- union/_protos/common/identity_pb2_grpc.py +4 -0
- union/_protos/common/list_pb2.py +36 -0
- union/_protos/common/list_pb2.pyi +69 -0
- union/_protos/common/list_pb2_grpc.py +4 -0
- union/_protos/common/policy_pb2.py +37 -0
- union/_protos/common/policy_pb2.pyi +27 -0
- union/_protos/common/policy_pb2_grpc.py +4 -0
- union/_protos/common/role_pb2.py +37 -0
- union/_protos/common/role_pb2.pyi +51 -0
- union/_protos/common/role_pb2_grpc.py +4 -0
- union/_protos/common/runtime_version_pb2.py +28 -0
- union/_protos/common/runtime_version_pb2.pyi +24 -0
- union/_protos/common/runtime_version_pb2_grpc.py +4 -0
- union/_protos/logs/dataplane/payload_pb2.py +96 -0
- union/_protos/logs/dataplane/payload_pb2.pyi +168 -0
- union/_protos/logs/dataplane/payload_pb2_grpc.py +4 -0
- union/_protos/secret/definition_pb2.py +49 -0
- union/_protos/secret/definition_pb2.pyi +93 -0
- union/_protos/secret/definition_pb2_grpc.py +4 -0
- union/_protos/secret/payload_pb2.py +62 -0
- union/_protos/secret/payload_pb2.pyi +94 -0
- union/_protos/secret/payload_pb2_grpc.py +4 -0
- union/_protos/secret/secret_pb2.py +38 -0
- union/_protos/secret/secret_pb2.pyi +6 -0
- union/_protos/secret/secret_pb2_grpc.py +198 -0
- union/_protos/validate/validate/validate_pb2.py +76 -0
- union/_protos/workflow/node_execution_service_pb2.py +26 -0
- union/_protos/workflow/node_execution_service_pb2.pyi +4 -0
- union/_protos/workflow/node_execution_service_pb2_grpc.py +32 -0
- union/_protos/workflow/queue_service_pb2.py +75 -0
- union/_protos/workflow/queue_service_pb2.pyi +103 -0
- union/_protos/workflow/queue_service_pb2_grpc.py +172 -0
- union/_protos/workflow/run_definition_pb2.py +100 -0
- union/_protos/workflow/run_definition_pb2.pyi +256 -0
- union/_protos/workflow/run_definition_pb2_grpc.py +4 -0
- union/_protos/workflow/run_logs_service_pb2.py +41 -0
- union/_protos/workflow/run_logs_service_pb2.pyi +28 -0
- union/_protos/workflow/run_logs_service_pb2_grpc.py +69 -0
- union/_protos/workflow/run_service_pb2.py +133 -0
- union/_protos/workflow/run_service_pb2.pyi +173 -0
- union/_protos/workflow/run_service_pb2_grpc.py +412 -0
- union/_protos/workflow/state_service_pb2.py +58 -0
- union/_protos/workflow/state_service_pb2.pyi +69 -0
- union/_protos/workflow/state_service_pb2_grpc.py +138 -0
- union/_protos/workflow/task_definition_pb2.py +72 -0
- union/_protos/workflow/task_definition_pb2.pyi +65 -0
- union/_protos/workflow/task_definition_pb2_grpc.py +4 -0
- union/_protos/workflow/task_service_pb2.py +44 -0
- union/_protos/workflow/task_service_pb2.pyi +31 -0
- union/_protos/workflow/task_service_pb2_grpc.py +104 -0
- union/_resources.py +226 -0
- union/_retry.py +32 -0
- union/_reusable_environment.py +25 -0
- union/_run.py +374 -0
- union/_secret.py +61 -0
- union/_task.py +354 -0
- union/_task_environment.py +186 -0
- union/_timeout.py +47 -0
- union/_tools.py +27 -0
- union/_utils/__init__.py +11 -0
- union/_utils/asyn.py +119 -0
- union/_utils/file_handling.py +71 -0
- union/_utils/helpers.py +46 -0
- union/_utils/lazy_module.py +54 -0
- union/_utils/uv_script_parser.py +49 -0
- union/_version.py +21 -0
- union/connectors/__init__.py +0 -0
- union/errors.py +128 -0
- union/extras/__init__.py +5 -0
- union/extras/_container.py +263 -0
- union/io/__init__.py +11 -0
- union/io/_dataframe.py +0 -0
- union/io/_dir.py +425 -0
- union/io/_file.py +418 -0
- union/io/pickle/__init__.py +0 -0
- union/io/pickle/transformer.py +117 -0
- union/io/structured_dataset/__init__.py +122 -0
- union/io/structured_dataset/basic_dfs.py +219 -0
- union/io/structured_dataset/structured_dataset.py +1057 -0
- union/py.typed +0 -0
- union/remote/__init__.py +23 -0
- union/remote/_client/__init__.py +0 -0
- union/remote/_client/_protocols.py +129 -0
- union/remote/_client/auth/__init__.py +12 -0
- union/remote/_client/auth/_authenticators/__init__.py +0 -0
- union/remote/_client/auth/_authenticators/base.py +391 -0
- union/remote/_client/auth/_authenticators/client_credentials.py +73 -0
- union/remote/_client/auth/_authenticators/device_code.py +120 -0
- union/remote/_client/auth/_authenticators/external_command.py +77 -0
- union/remote/_client/auth/_authenticators/factory.py +200 -0
- union/remote/_client/auth/_authenticators/pkce.py +515 -0
- union/remote/_client/auth/_channel.py +184 -0
- union/remote/_client/auth/_client_config.py +83 -0
- union/remote/_client/auth/_default_html.py +32 -0
- union/remote/_client/auth/_grpc_utils/__init__.py +0 -0
- union/remote/_client/auth/_grpc_utils/auth_interceptor.py +204 -0
- union/remote/_client/auth/_grpc_utils/default_metadata_interceptor.py +144 -0
- union/remote/_client/auth/_keyring.py +154 -0
- union/remote/_client/auth/_token_client.py +258 -0
- union/remote/_client/auth/errors.py +16 -0
- union/remote/_client/controlplane.py +86 -0
- union/remote/_data.py +149 -0
- union/remote/_logs.py +74 -0
- union/remote/_project.py +86 -0
- union/remote/_run.py +820 -0
- union/remote/_secret.py +132 -0
- union/remote/_task.py +193 -0
- union/report/__init__.py +3 -0
- union/report/_report.py +178 -0
- union/report/_template.html +124 -0
- union/storage/__init__.py +24 -0
- union/storage/_remote_fs.py +34 -0
- union/storage/_storage.py +247 -0
- union/storage/_utils.py +5 -0
- union/types/__init__.py +11 -0
- union/types/_renderer.py +162 -0
- union/types/_string_literals.py +120 -0
- union/types/_type_engine.py +2131 -0
- union/types/_utils.py +80 -0
flyte/_logging.py
ADDED
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
import logging
|
|
4
|
+
import os
|
|
5
|
+
from typing import Optional
|
|
6
|
+
|
|
7
|
+
from ._tools import ipython_check, is_in_cluster
|
|
8
|
+
|
|
9
|
+
DEFAULT_LOG_LEVEL = logging.INFO
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
def is_rich_logging_disabled() -> bool:
|
|
13
|
+
"""
|
|
14
|
+
Check if rich logging is enabled
|
|
15
|
+
"""
|
|
16
|
+
return os.environ.get("DISABLE_RICH_LOGGING") is not None
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
def get_env_log_level() -> int:
|
|
20
|
+
return int(os.environ.get("LOG_LEVEL", DEFAULT_LOG_LEVEL))
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
def log_format_from_env() -> str:
|
|
24
|
+
"""
|
|
25
|
+
Get the log format from the environment variable.
|
|
26
|
+
"""
|
|
27
|
+
return os.environ.get("LOG_FORMAT", "json")
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
def get_rich_handler(log_level: int) -> Optional[logging.Handler]:
|
|
31
|
+
"""
|
|
32
|
+
Upgrades the global loggers to use Rich logging.
|
|
33
|
+
"""
|
|
34
|
+
if is_in_cluster():
|
|
35
|
+
return None
|
|
36
|
+
if not ipython_check() and is_rich_logging_disabled():
|
|
37
|
+
return None
|
|
38
|
+
|
|
39
|
+
import click
|
|
40
|
+
from rich.console import Console
|
|
41
|
+
from rich.logging import RichHandler
|
|
42
|
+
|
|
43
|
+
try:
|
|
44
|
+
width = os.get_terminal_size().columns
|
|
45
|
+
except Exception as e:
|
|
46
|
+
logger.debug(f"Failed to get terminal size: {e}")
|
|
47
|
+
width = 160
|
|
48
|
+
|
|
49
|
+
handler = RichHandler(
|
|
50
|
+
tracebacks_suppress=[click],
|
|
51
|
+
rich_tracebacks=True,
|
|
52
|
+
omit_repeated_times=False,
|
|
53
|
+
show_path=False,
|
|
54
|
+
log_time_format="%H:%M:%S.%f",
|
|
55
|
+
console=Console(width=width),
|
|
56
|
+
level=log_level,
|
|
57
|
+
)
|
|
58
|
+
|
|
59
|
+
formatter = logging.Formatter(fmt="%(filename)s:%(lineno)d - %(message)s")
|
|
60
|
+
handler.setFormatter(formatter)
|
|
61
|
+
return handler
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
def get_default_handler(log_level: int) -> logging.Handler:
|
|
65
|
+
handler = logging.StreamHandler()
|
|
66
|
+
handler.setLevel(log_level)
|
|
67
|
+
formatter = logging.Formatter(fmt="[%(name)s] %(message)s")
|
|
68
|
+
if log_format_from_env() == "json":
|
|
69
|
+
pass
|
|
70
|
+
# formatter = jsonlogger.JsonFormatter(fmt="%(asctime)s %(name)s %(levelname)s %(message)s")
|
|
71
|
+
handler.setFormatter(formatter)
|
|
72
|
+
return handler
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
def initialize_logger(log_level: int = DEFAULT_LOG_LEVEL, enable_rich: bool = False):
|
|
76
|
+
"""
|
|
77
|
+
Initializes the global loggers to the default configuration.
|
|
78
|
+
"""
|
|
79
|
+
global logger # noqa: PLW0603
|
|
80
|
+
logger = _create_logger("flyte", log_level, enable_rich)
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
def _create_logger(name: str, log_level: int = DEFAULT_LOG_LEVEL, enable_rich: bool = False) -> logging.Logger:
|
|
84
|
+
"""
|
|
85
|
+
Creates a logger with the given name and log level.
|
|
86
|
+
"""
|
|
87
|
+
logger = logging.getLogger(name)
|
|
88
|
+
logger.setLevel(log_level)
|
|
89
|
+
handler = None
|
|
90
|
+
logger.handlers = []
|
|
91
|
+
if enable_rich:
|
|
92
|
+
handler = get_rich_handler(log_level)
|
|
93
|
+
if handler is None:
|
|
94
|
+
handler = get_default_handler(log_level)
|
|
95
|
+
logger.addHandler(handler)
|
|
96
|
+
return logger
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
def log(fn=None, *, level=logging.DEBUG, entry=True, exit=True):
|
|
100
|
+
"""
|
|
101
|
+
Decorator to log function calls.
|
|
102
|
+
"""
|
|
103
|
+
|
|
104
|
+
def decorator(func):
|
|
105
|
+
if logger.isEnabledFor(level):
|
|
106
|
+
|
|
107
|
+
def wrapper(*args, **kwargs):
|
|
108
|
+
if entry:
|
|
109
|
+
logger.log(level, f"[{func.__name__}] with args: {args} and kwargs: {kwargs}")
|
|
110
|
+
try:
|
|
111
|
+
return func(*args, **kwargs)
|
|
112
|
+
finally:
|
|
113
|
+
if exit:
|
|
114
|
+
logger.log(level, f"[{func.__name__}] completed")
|
|
115
|
+
|
|
116
|
+
return wrapper
|
|
117
|
+
return func
|
|
118
|
+
|
|
119
|
+
if fn is None:
|
|
120
|
+
return decorator
|
|
121
|
+
return decorator(fn)
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
logger = _create_logger("flyte", get_env_log_level())
|
|
File without changes
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
3
|
+
# source: common/authorization.proto
|
|
4
|
+
"""Generated protocol buffer code."""
|
|
5
|
+
from google.protobuf import descriptor as _descriptor
|
|
6
|
+
from google.protobuf import descriptor_pool as _descriptor_pool
|
|
7
|
+
from google.protobuf import symbol_database as _symbol_database
|
|
8
|
+
from google.protobuf.internal import builder as _builder
|
|
9
|
+
# @@protoc_insertion_point(imports)
|
|
10
|
+
|
|
11
|
+
_sym_db = _symbol_database.Default()
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
from flyte._protos.common import identifier_pb2 as common_dot_identifier__pb2
|
|
15
|
+
from flyte._protos.validate.validate import validate_pb2 as validate_dot_validate__pb2
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1a\x63ommon/authorization.proto\x12\x0f\x63loudidl.common\x1a\x17\x63ommon/identifier.proto\x1a\x17validate/validate.proto\"+\n\x0cOrganization\x12\x1b\n\x04name\x18\x01 \x01(\tB\x07\xfa\x42\x04r\x02\x10\x01R\x04name\"i\n\x06\x44omain\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\x12K\n\x0corganization\x18\x02 \x01(\x0b\x32\x1d.cloudidl.common.OrganizationB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01R\x0corganization\"a\n\x07Project\x12\x1b\n\x04name\x18\x01 \x01(\tB\x07\xfa\x42\x04r\x02\x10\x01R\x04name\x12\x39\n\x06\x64omain\x18\x02 \x01(\x0b\x32\x17.cloudidl.common.DomainB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01R\x06\x64omain\"e\n\x08Workflow\x12\x1b\n\x04name\x18\x01 \x01(\tB\x07\xfa\x42\x04r\x02\x10\x01R\x04name\x12<\n\x07project\x18\x02 \x01(\x0b\x32\x18.cloudidl.common.ProjectB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01R\x07project\"g\n\nLaunchPlan\x12\x1b\n\x04name\x18\x01 \x01(\tB\x07\xfa\x42\x04r\x02\x10\x01R\x04name\x12<\n\x07project\x18\x02 \x01(\x0b\x32\x18.cloudidl.common.ProjectB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01R\x07project\"\xfd\x02\n\x08Resource\x12\x43\n\x0corganization\x18\x01 \x01(\x0b\x32\x1d.cloudidl.common.OrganizationH\x00R\x0corganization\x12\x31\n\x06\x64omain\x18\x02 \x01(\x0b\x32\x17.cloudidl.common.DomainH\x00R\x06\x64omain\x12\x34\n\x07project\x18\x03 \x01(\x0b\x32\x18.cloudidl.common.ProjectH\x00R\x07project\x12\x37\n\x08workflow\x18\x04 \x01(\x0b\x32\x19.cloudidl.common.WorkflowH\x00R\x08workflow\x12>\n\x0blaunch_plan\x18\x05 \x01(\x0b\x32\x1b.cloudidl.common.LaunchPlanH\x00R\nlaunchPlan\x12>\n\x07\x63luster\x18\x06 \x01(\x0b\x32\".cloudidl.common.ClusterIdentifierH\x00R\x07\x63lusterB\n\n\x08resource\"v\n\nPermission\x12\x35\n\x08resource\x18\x01 \x01(\x0b\x32\x19.cloudidl.common.ResourceR\x08resource\x12\x31\n\x07\x61\x63tions\x18\x02 \x03(\x0e\x32\x17.cloudidl.common.ActionR\x07\x61\x63tions*\x94\x04\n\x06\x41\x63tion\x12\x0f\n\x0b\x41\x43TION_NONE\x10\x00\x12\x15\n\rACTION_CREATE\x10\x01\x1a\x02\x08\x01\x12\x13\n\x0b\x41\x43TION_READ\x10\x02\x1a\x02\x08\x01\x12\x15\n\rACTION_UPDATE\x10\x03\x1a\x02\x08\x01\x12\x15\n\rACTION_DELETE\x10\x04\x1a\x02\x08\x01\x12\x1f\n\x1b\x41\x43TION_VIEW_FLYTE_INVENTORY\x10\x05\x12 \n\x1c\x41\x43TION_VIEW_FLYTE_EXECUTIONS\x10\x06\x12#\n\x1f\x41\x43TION_REGISTER_FLYTE_INVENTORY\x10\x07\x12\"\n\x1e\x41\x43TION_CREATE_FLYTE_EXECUTIONS\x10\x08\x12\x1d\n\x19\x41\x43TION_ADMINISTER_PROJECT\x10\t\x12\x1d\n\x19\x41\x43TION_MANAGE_PERMISSIONS\x10\n\x12\x1d\n\x19\x41\x43TION_ADMINISTER_ACCOUNT\x10\x0b\x12\x19\n\x15\x41\x43TION_MANAGE_CLUSTER\x10\x0c\x12,\n(ACTION_EDIT_EXECUTION_RELATED_ATTRIBUTES\x10\r\x12*\n&ACTION_EDIT_CLUSTER_RELATED_ATTRIBUTES\x10\x0e\x12!\n\x1d\x41\x43TION_EDIT_UNUSED_ATTRIBUTES\x10\x0f\x12\x1e\n\x1a\x41\x43TION_SUPPORT_SYSTEM_LOGS\x10\x10\x42\xb3\x01\n\x13\x63om.cloudidl.commonB\x12\x41uthorizationProtoH\x02P\x01Z)github.com/unionai/cloud/gen/pb-go/common\xa2\x02\x03\x43\x43X\xaa\x02\x0f\x43loudidl.Common\xca\x02\x0f\x43loudidl\\Common\xe2\x02\x1b\x43loudidl\\Common\\GPBMetadata\xea\x02\x10\x43loudidl::Commonb\x06proto3')
|
|
19
|
+
|
|
20
|
+
_globals = globals()
|
|
21
|
+
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
|
22
|
+
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'common.authorization_pb2', _globals)
|
|
23
|
+
if _descriptor._USE_C_DESCRIPTORS == False:
|
|
24
|
+
DESCRIPTOR._options = None
|
|
25
|
+
DESCRIPTOR._serialized_options = b'\n\023com.cloudidl.commonB\022AuthorizationProtoH\002P\001Z)github.com/unionai/cloud/gen/pb-go/common\242\002\003CCX\252\002\017Cloudidl.Common\312\002\017Cloudidl\\Common\342\002\033Cloudidl\\Common\\GPBMetadata\352\002\020Cloudidl::Common'
|
|
26
|
+
_ACTION.values_by_name["ACTION_CREATE"]._options = None
|
|
27
|
+
_ACTION.values_by_name["ACTION_CREATE"]._serialized_options = b'\010\001'
|
|
28
|
+
_ACTION.values_by_name["ACTION_READ"]._options = None
|
|
29
|
+
_ACTION.values_by_name["ACTION_READ"]._serialized_options = b'\010\001'
|
|
30
|
+
_ACTION.values_by_name["ACTION_UPDATE"]._options = None
|
|
31
|
+
_ACTION.values_by_name["ACTION_UPDATE"]._serialized_options = b'\010\001'
|
|
32
|
+
_ACTION.values_by_name["ACTION_DELETE"]._options = None
|
|
33
|
+
_ACTION.values_by_name["ACTION_DELETE"]._serialized_options = b'\010\001'
|
|
34
|
+
_ORGANIZATION.fields_by_name['name']._options = None
|
|
35
|
+
_ORGANIZATION.fields_by_name['name']._serialized_options = b'\372B\004r\002\020\001'
|
|
36
|
+
_DOMAIN.fields_by_name['organization']._options = None
|
|
37
|
+
_DOMAIN.fields_by_name['organization']._serialized_options = b'\372B\005\212\001\002\020\001'
|
|
38
|
+
_PROJECT.fields_by_name['name']._options = None
|
|
39
|
+
_PROJECT.fields_by_name['name']._serialized_options = b'\372B\004r\002\020\001'
|
|
40
|
+
_PROJECT.fields_by_name['domain']._options = None
|
|
41
|
+
_PROJECT.fields_by_name['domain']._serialized_options = b'\372B\005\212\001\002\020\001'
|
|
42
|
+
_WORKFLOW.fields_by_name['name']._options = None
|
|
43
|
+
_WORKFLOW.fields_by_name['name']._serialized_options = b'\372B\004r\002\020\001'
|
|
44
|
+
_WORKFLOW.fields_by_name['project']._options = None
|
|
45
|
+
_WORKFLOW.fields_by_name['project']._serialized_options = b'\372B\005\212\001\002\020\001'
|
|
46
|
+
_LAUNCHPLAN.fields_by_name['name']._options = None
|
|
47
|
+
_LAUNCHPLAN.fields_by_name['name']._serialized_options = b'\372B\004r\002\020\001'
|
|
48
|
+
_LAUNCHPLAN.fields_by_name['project']._options = None
|
|
49
|
+
_LAUNCHPLAN.fields_by_name['project']._serialized_options = b'\372B\005\212\001\002\020\001'
|
|
50
|
+
_globals['_ACTION']._serialized_start=1061
|
|
51
|
+
_globals['_ACTION']._serialized_end=1593
|
|
52
|
+
_globals['_ORGANIZATION']._serialized_start=97
|
|
53
|
+
_globals['_ORGANIZATION']._serialized_end=140
|
|
54
|
+
_globals['_DOMAIN']._serialized_start=142
|
|
55
|
+
_globals['_DOMAIN']._serialized_end=247
|
|
56
|
+
_globals['_PROJECT']._serialized_start=249
|
|
57
|
+
_globals['_PROJECT']._serialized_end=346
|
|
58
|
+
_globals['_WORKFLOW']._serialized_start=348
|
|
59
|
+
_globals['_WORKFLOW']._serialized_end=449
|
|
60
|
+
_globals['_LAUNCHPLAN']._serialized_start=451
|
|
61
|
+
_globals['_LAUNCHPLAN']._serialized_end=554
|
|
62
|
+
_globals['_RESOURCE']._serialized_start=557
|
|
63
|
+
_globals['_RESOURCE']._serialized_end=938
|
|
64
|
+
_globals['_PERMISSION']._serialized_start=940
|
|
65
|
+
_globals['_PERMISSION']._serialized_end=1058
|
|
66
|
+
# @@protoc_insertion_point(module_scope)
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
from flyte._protos.common import identifier_pb2 as _identifier_pb2
|
|
2
|
+
from flyte._protos.validate.validate import validate_pb2 as _validate_pb2
|
|
3
|
+
from google.protobuf.internal import containers as _containers
|
|
4
|
+
from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper
|
|
5
|
+
from google.protobuf import descriptor as _descriptor
|
|
6
|
+
from google.protobuf import message as _message
|
|
7
|
+
from typing import ClassVar as _ClassVar, Iterable as _Iterable, Mapping as _Mapping, Optional as _Optional, Union as _Union
|
|
8
|
+
|
|
9
|
+
DESCRIPTOR: _descriptor.FileDescriptor
|
|
10
|
+
|
|
11
|
+
class Action(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
|
|
12
|
+
__slots__ = []
|
|
13
|
+
ACTION_NONE: _ClassVar[Action]
|
|
14
|
+
ACTION_CREATE: _ClassVar[Action]
|
|
15
|
+
ACTION_READ: _ClassVar[Action]
|
|
16
|
+
ACTION_UPDATE: _ClassVar[Action]
|
|
17
|
+
ACTION_DELETE: _ClassVar[Action]
|
|
18
|
+
ACTION_VIEW_FLYTE_INVENTORY: _ClassVar[Action]
|
|
19
|
+
ACTION_VIEW_FLYTE_EXECUTIONS: _ClassVar[Action]
|
|
20
|
+
ACTION_REGISTER_FLYTE_INVENTORY: _ClassVar[Action]
|
|
21
|
+
ACTION_CREATE_FLYTE_EXECUTIONS: _ClassVar[Action]
|
|
22
|
+
ACTION_ADMINISTER_PROJECT: _ClassVar[Action]
|
|
23
|
+
ACTION_MANAGE_PERMISSIONS: _ClassVar[Action]
|
|
24
|
+
ACTION_ADMINISTER_ACCOUNT: _ClassVar[Action]
|
|
25
|
+
ACTION_MANAGE_CLUSTER: _ClassVar[Action]
|
|
26
|
+
ACTION_EDIT_EXECUTION_RELATED_ATTRIBUTES: _ClassVar[Action]
|
|
27
|
+
ACTION_EDIT_CLUSTER_RELATED_ATTRIBUTES: _ClassVar[Action]
|
|
28
|
+
ACTION_EDIT_UNUSED_ATTRIBUTES: _ClassVar[Action]
|
|
29
|
+
ACTION_SUPPORT_SYSTEM_LOGS: _ClassVar[Action]
|
|
30
|
+
ACTION_NONE: Action
|
|
31
|
+
ACTION_CREATE: Action
|
|
32
|
+
ACTION_READ: Action
|
|
33
|
+
ACTION_UPDATE: Action
|
|
34
|
+
ACTION_DELETE: Action
|
|
35
|
+
ACTION_VIEW_FLYTE_INVENTORY: Action
|
|
36
|
+
ACTION_VIEW_FLYTE_EXECUTIONS: Action
|
|
37
|
+
ACTION_REGISTER_FLYTE_INVENTORY: Action
|
|
38
|
+
ACTION_CREATE_FLYTE_EXECUTIONS: Action
|
|
39
|
+
ACTION_ADMINISTER_PROJECT: Action
|
|
40
|
+
ACTION_MANAGE_PERMISSIONS: Action
|
|
41
|
+
ACTION_ADMINISTER_ACCOUNT: Action
|
|
42
|
+
ACTION_MANAGE_CLUSTER: Action
|
|
43
|
+
ACTION_EDIT_EXECUTION_RELATED_ATTRIBUTES: Action
|
|
44
|
+
ACTION_EDIT_CLUSTER_RELATED_ATTRIBUTES: Action
|
|
45
|
+
ACTION_EDIT_UNUSED_ATTRIBUTES: Action
|
|
46
|
+
ACTION_SUPPORT_SYSTEM_LOGS: Action
|
|
47
|
+
|
|
48
|
+
class Organization(_message.Message):
|
|
49
|
+
__slots__ = ["name"]
|
|
50
|
+
NAME_FIELD_NUMBER: _ClassVar[int]
|
|
51
|
+
name: str
|
|
52
|
+
def __init__(self, name: _Optional[str] = ...) -> None: ...
|
|
53
|
+
|
|
54
|
+
class Domain(_message.Message):
|
|
55
|
+
__slots__ = ["name", "organization"]
|
|
56
|
+
NAME_FIELD_NUMBER: _ClassVar[int]
|
|
57
|
+
ORGANIZATION_FIELD_NUMBER: _ClassVar[int]
|
|
58
|
+
name: str
|
|
59
|
+
organization: Organization
|
|
60
|
+
def __init__(self, name: _Optional[str] = ..., organization: _Optional[_Union[Organization, _Mapping]] = ...) -> None: ...
|
|
61
|
+
|
|
62
|
+
class Project(_message.Message):
|
|
63
|
+
__slots__ = ["name", "domain"]
|
|
64
|
+
NAME_FIELD_NUMBER: _ClassVar[int]
|
|
65
|
+
DOMAIN_FIELD_NUMBER: _ClassVar[int]
|
|
66
|
+
name: str
|
|
67
|
+
domain: Domain
|
|
68
|
+
def __init__(self, name: _Optional[str] = ..., domain: _Optional[_Union[Domain, _Mapping]] = ...) -> None: ...
|
|
69
|
+
|
|
70
|
+
class Workflow(_message.Message):
|
|
71
|
+
__slots__ = ["name", "project"]
|
|
72
|
+
NAME_FIELD_NUMBER: _ClassVar[int]
|
|
73
|
+
PROJECT_FIELD_NUMBER: _ClassVar[int]
|
|
74
|
+
name: str
|
|
75
|
+
project: Project
|
|
76
|
+
def __init__(self, name: _Optional[str] = ..., project: _Optional[_Union[Project, _Mapping]] = ...) -> None: ...
|
|
77
|
+
|
|
78
|
+
class LaunchPlan(_message.Message):
|
|
79
|
+
__slots__ = ["name", "project"]
|
|
80
|
+
NAME_FIELD_NUMBER: _ClassVar[int]
|
|
81
|
+
PROJECT_FIELD_NUMBER: _ClassVar[int]
|
|
82
|
+
name: str
|
|
83
|
+
project: Project
|
|
84
|
+
def __init__(self, name: _Optional[str] = ..., project: _Optional[_Union[Project, _Mapping]] = ...) -> None: ...
|
|
85
|
+
|
|
86
|
+
class Resource(_message.Message):
|
|
87
|
+
__slots__ = ["organization", "domain", "project", "workflow", "launch_plan", "cluster"]
|
|
88
|
+
ORGANIZATION_FIELD_NUMBER: _ClassVar[int]
|
|
89
|
+
DOMAIN_FIELD_NUMBER: _ClassVar[int]
|
|
90
|
+
PROJECT_FIELD_NUMBER: _ClassVar[int]
|
|
91
|
+
WORKFLOW_FIELD_NUMBER: _ClassVar[int]
|
|
92
|
+
LAUNCH_PLAN_FIELD_NUMBER: _ClassVar[int]
|
|
93
|
+
CLUSTER_FIELD_NUMBER: _ClassVar[int]
|
|
94
|
+
organization: Organization
|
|
95
|
+
domain: Domain
|
|
96
|
+
project: Project
|
|
97
|
+
workflow: Workflow
|
|
98
|
+
launch_plan: LaunchPlan
|
|
99
|
+
cluster: _identifier_pb2.ClusterIdentifier
|
|
100
|
+
def __init__(self, organization: _Optional[_Union[Organization, _Mapping]] = ..., domain: _Optional[_Union[Domain, _Mapping]] = ..., project: _Optional[_Union[Project, _Mapping]] = ..., workflow: _Optional[_Union[Workflow, _Mapping]] = ..., launch_plan: _Optional[_Union[LaunchPlan, _Mapping]] = ..., cluster: _Optional[_Union[_identifier_pb2.ClusterIdentifier, _Mapping]] = ...) -> None: ...
|
|
101
|
+
|
|
102
|
+
class Permission(_message.Message):
|
|
103
|
+
__slots__ = ["resource", "actions"]
|
|
104
|
+
RESOURCE_FIELD_NUMBER: _ClassVar[int]
|
|
105
|
+
ACTIONS_FIELD_NUMBER: _ClassVar[int]
|
|
106
|
+
resource: Resource
|
|
107
|
+
actions: _containers.RepeatedScalarFieldContainer[Action]
|
|
108
|
+
def __init__(self, resource: _Optional[_Union[Resource, _Mapping]] = ..., actions: _Optional[_Iterable[_Union[Action, str]]] = ...) -> None: ...
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
3
|
+
# source: common/identifier.proto
|
|
4
|
+
"""Generated protocol buffer code."""
|
|
5
|
+
from google.protobuf import descriptor as _descriptor
|
|
6
|
+
from google.protobuf import descriptor_pool as _descriptor_pool
|
|
7
|
+
from google.protobuf import symbol_database as _symbol_database
|
|
8
|
+
from google.protobuf.internal import builder as _builder
|
|
9
|
+
# @@protoc_insertion_point(imports)
|
|
10
|
+
|
|
11
|
+
_sym_db = _symbol_database.Default()
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
from flyte._protos.validate.validate import validate_pb2 as validate_dot_validate__pb2
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x17\x63ommon/identifier.proto\x12\x0f\x63loudidl.common\x1a\x17validate/validate.proto\"~\n\x11ProjectIdentifier\x12+\n\x0corganization\x18\x01 \x01(\tB\x07\xfa\x42\x04r\x02\x10\x01R\x0corganization\x12\x1f\n\x06\x64omain\x18\x02 \x01(\tB\x07\xfa\x42\x04r\x02\x10\x01R\x06\x64omain\x12\x1b\n\x04name\x18\x03 \x01(\tB\x07\xfa\x42\x04r\x02\x10\x01R\x04name\"T\n\x11\x43lusterIdentifier\x12\"\n\x0corganization\x18\x01 \x01(\tR\x0corganization\x12\x1b\n\x04name\x18\x02 \x01(\tB\x07\xfa\x42\x04r\x02\x10\x01R\x04name\"O\n\x15\x43lusterPoolIdentifier\x12\"\n\x0corganization\x18\x01 \x01(\tR\x0corganization\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\"_\n\x17\x43lusterConfigIdentifier\x12+\n\x0corganization\x18\x01 \x01(\tB\x07\xfa\x42\x04r\x02\x10\x01R\x0corganization\x12\x17\n\x02id\x18\x02 \x01(\tB\x07\xfa\x42\x04r\x02\x10\x01R\x02id\"3\n\x0eUserIdentifier\x12!\n\x07subject\x18\x01 \x01(\tB\x07\xfa\x42\x04r\x02\x10\x01R\x07subject\":\n\x15\x41pplicationIdentifier\x12!\n\x07subject\x18\x01 \x01(\tB\x07\xfa\x42\x04r\x02\x10\x01R\x07subject\"Q\n\x0eRoleIdentifier\x12\"\n\x0corganization\x18\x01 \x01(\tR\x0corganization\x12\x1b\n\x04name\x18\x02 \x01(\tB\x07\xfa\x42\x04r\x02\x10\x01R\x04name\"O\n\rOrgIdentifier\x12>\n\x04name\x18\x01 \x01(\tB*\xfa\x42\'r%\x10\x01\x18?2\x1f^[a-z0-9]([-a-z0-9]*[a-z0-9])?$R\x04name\"y\n\x18ManagedClusterIdentifier\x12\x1b\n\x04name\x18\x02 \x01(\tB\x07\xfa\x42\x04r\x02\x10\x01R\x04name\x12:\n\x03org\x18\x03 \x01(\x0b\x32\x1e.cloudidl.common.OrgIdentifierB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01R\x03orgJ\x04\x08\x01\x10\x02\"S\n\x10PolicyIdentifier\x12\"\n\x0corganization\x18\x01 \x01(\tR\x0corganization\x12\x1b\n\x04name\x18\x02 \x01(\tB\x07\xfa\x42\x04r\x02\x10\x01R\x04nameB\xb0\x01\n\x13\x63om.cloudidl.commonB\x0fIdentifierProtoH\x02P\x01Z)github.com/unionai/cloud/gen/pb-go/common\xa2\x02\x03\x43\x43X\xaa\x02\x0f\x43loudidl.Common\xca\x02\x0f\x43loudidl\\Common\xe2\x02\x1b\x43loudidl\\Common\\GPBMetadata\xea\x02\x10\x43loudidl::Commonb\x06proto3')
|
|
18
|
+
|
|
19
|
+
_globals = globals()
|
|
20
|
+
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
|
21
|
+
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'common.identifier_pb2', _globals)
|
|
22
|
+
if _descriptor._USE_C_DESCRIPTORS == False:
|
|
23
|
+
DESCRIPTOR._options = None
|
|
24
|
+
DESCRIPTOR._serialized_options = b'\n\023com.cloudidl.commonB\017IdentifierProtoH\002P\001Z)github.com/unionai/cloud/gen/pb-go/common\242\002\003CCX\252\002\017Cloudidl.Common\312\002\017Cloudidl\\Common\342\002\033Cloudidl\\Common\\GPBMetadata\352\002\020Cloudidl::Common'
|
|
25
|
+
_PROJECTIDENTIFIER.fields_by_name['organization']._options = None
|
|
26
|
+
_PROJECTIDENTIFIER.fields_by_name['organization']._serialized_options = b'\372B\004r\002\020\001'
|
|
27
|
+
_PROJECTIDENTIFIER.fields_by_name['domain']._options = None
|
|
28
|
+
_PROJECTIDENTIFIER.fields_by_name['domain']._serialized_options = b'\372B\004r\002\020\001'
|
|
29
|
+
_PROJECTIDENTIFIER.fields_by_name['name']._options = None
|
|
30
|
+
_PROJECTIDENTIFIER.fields_by_name['name']._serialized_options = b'\372B\004r\002\020\001'
|
|
31
|
+
_CLUSTERIDENTIFIER.fields_by_name['name']._options = None
|
|
32
|
+
_CLUSTERIDENTIFIER.fields_by_name['name']._serialized_options = b'\372B\004r\002\020\001'
|
|
33
|
+
_CLUSTERCONFIGIDENTIFIER.fields_by_name['organization']._options = None
|
|
34
|
+
_CLUSTERCONFIGIDENTIFIER.fields_by_name['organization']._serialized_options = b'\372B\004r\002\020\001'
|
|
35
|
+
_CLUSTERCONFIGIDENTIFIER.fields_by_name['id']._options = None
|
|
36
|
+
_CLUSTERCONFIGIDENTIFIER.fields_by_name['id']._serialized_options = b'\372B\004r\002\020\001'
|
|
37
|
+
_USERIDENTIFIER.fields_by_name['subject']._options = None
|
|
38
|
+
_USERIDENTIFIER.fields_by_name['subject']._serialized_options = b'\372B\004r\002\020\001'
|
|
39
|
+
_APPLICATIONIDENTIFIER.fields_by_name['subject']._options = None
|
|
40
|
+
_APPLICATIONIDENTIFIER.fields_by_name['subject']._serialized_options = b'\372B\004r\002\020\001'
|
|
41
|
+
_ROLEIDENTIFIER.fields_by_name['name']._options = None
|
|
42
|
+
_ROLEIDENTIFIER.fields_by_name['name']._serialized_options = b'\372B\004r\002\020\001'
|
|
43
|
+
_ORGIDENTIFIER.fields_by_name['name']._options = None
|
|
44
|
+
_ORGIDENTIFIER.fields_by_name['name']._serialized_options = b'\372B\'r%\020\001\030?2\037^[a-z0-9]([-a-z0-9]*[a-z0-9])?$'
|
|
45
|
+
_MANAGEDCLUSTERIDENTIFIER.fields_by_name['name']._options = None
|
|
46
|
+
_MANAGEDCLUSTERIDENTIFIER.fields_by_name['name']._serialized_options = b'\372B\004r\002\020\001'
|
|
47
|
+
_MANAGEDCLUSTERIDENTIFIER.fields_by_name['org']._options = None
|
|
48
|
+
_MANAGEDCLUSTERIDENTIFIER.fields_by_name['org']._serialized_options = b'\372B\005\212\001\002\020\001'
|
|
49
|
+
_POLICYIDENTIFIER.fields_by_name['name']._options = None
|
|
50
|
+
_POLICYIDENTIFIER.fields_by_name['name']._serialized_options = b'\372B\004r\002\020\001'
|
|
51
|
+
_globals['_PROJECTIDENTIFIER']._serialized_start=69
|
|
52
|
+
_globals['_PROJECTIDENTIFIER']._serialized_end=195
|
|
53
|
+
_globals['_CLUSTERIDENTIFIER']._serialized_start=197
|
|
54
|
+
_globals['_CLUSTERIDENTIFIER']._serialized_end=281
|
|
55
|
+
_globals['_CLUSTERPOOLIDENTIFIER']._serialized_start=283
|
|
56
|
+
_globals['_CLUSTERPOOLIDENTIFIER']._serialized_end=362
|
|
57
|
+
_globals['_CLUSTERCONFIGIDENTIFIER']._serialized_start=364
|
|
58
|
+
_globals['_CLUSTERCONFIGIDENTIFIER']._serialized_end=459
|
|
59
|
+
_globals['_USERIDENTIFIER']._serialized_start=461
|
|
60
|
+
_globals['_USERIDENTIFIER']._serialized_end=512
|
|
61
|
+
_globals['_APPLICATIONIDENTIFIER']._serialized_start=514
|
|
62
|
+
_globals['_APPLICATIONIDENTIFIER']._serialized_end=572
|
|
63
|
+
_globals['_ROLEIDENTIFIER']._serialized_start=574
|
|
64
|
+
_globals['_ROLEIDENTIFIER']._serialized_end=655
|
|
65
|
+
_globals['_ORGIDENTIFIER']._serialized_start=657
|
|
66
|
+
_globals['_ORGIDENTIFIER']._serialized_end=736
|
|
67
|
+
_globals['_MANAGEDCLUSTERIDENTIFIER']._serialized_start=738
|
|
68
|
+
_globals['_MANAGEDCLUSTERIDENTIFIER']._serialized_end=859
|
|
69
|
+
_globals['_POLICYIDENTIFIER']._serialized_start=861
|
|
70
|
+
_globals['_POLICYIDENTIFIER']._serialized_end=944
|
|
71
|
+
# @@protoc_insertion_point(module_scope)
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
from flyte._protos.validate.validate import validate_pb2 as _validate_pb2
|
|
2
|
+
from google.protobuf import descriptor as _descriptor
|
|
3
|
+
from google.protobuf import message as _message
|
|
4
|
+
from typing import ClassVar as _ClassVar, Mapping as _Mapping, Optional as _Optional, Union as _Union
|
|
5
|
+
|
|
6
|
+
DESCRIPTOR: _descriptor.FileDescriptor
|
|
7
|
+
|
|
8
|
+
class ProjectIdentifier(_message.Message):
|
|
9
|
+
__slots__ = ["organization", "domain", "name"]
|
|
10
|
+
ORGANIZATION_FIELD_NUMBER: _ClassVar[int]
|
|
11
|
+
DOMAIN_FIELD_NUMBER: _ClassVar[int]
|
|
12
|
+
NAME_FIELD_NUMBER: _ClassVar[int]
|
|
13
|
+
organization: str
|
|
14
|
+
domain: str
|
|
15
|
+
name: str
|
|
16
|
+
def __init__(self, organization: _Optional[str] = ..., domain: _Optional[str] = ..., name: _Optional[str] = ...) -> None: ...
|
|
17
|
+
|
|
18
|
+
class ClusterIdentifier(_message.Message):
|
|
19
|
+
__slots__ = ["organization", "name"]
|
|
20
|
+
ORGANIZATION_FIELD_NUMBER: _ClassVar[int]
|
|
21
|
+
NAME_FIELD_NUMBER: _ClassVar[int]
|
|
22
|
+
organization: str
|
|
23
|
+
name: str
|
|
24
|
+
def __init__(self, organization: _Optional[str] = ..., name: _Optional[str] = ...) -> None: ...
|
|
25
|
+
|
|
26
|
+
class ClusterPoolIdentifier(_message.Message):
|
|
27
|
+
__slots__ = ["organization", "name"]
|
|
28
|
+
ORGANIZATION_FIELD_NUMBER: _ClassVar[int]
|
|
29
|
+
NAME_FIELD_NUMBER: _ClassVar[int]
|
|
30
|
+
organization: str
|
|
31
|
+
name: str
|
|
32
|
+
def __init__(self, organization: _Optional[str] = ..., name: _Optional[str] = ...) -> None: ...
|
|
33
|
+
|
|
34
|
+
class ClusterConfigIdentifier(_message.Message):
|
|
35
|
+
__slots__ = ["organization", "id"]
|
|
36
|
+
ORGANIZATION_FIELD_NUMBER: _ClassVar[int]
|
|
37
|
+
ID_FIELD_NUMBER: _ClassVar[int]
|
|
38
|
+
organization: str
|
|
39
|
+
id: str
|
|
40
|
+
def __init__(self, organization: _Optional[str] = ..., id: _Optional[str] = ...) -> None: ...
|
|
41
|
+
|
|
42
|
+
class UserIdentifier(_message.Message):
|
|
43
|
+
__slots__ = ["subject"]
|
|
44
|
+
SUBJECT_FIELD_NUMBER: _ClassVar[int]
|
|
45
|
+
subject: str
|
|
46
|
+
def __init__(self, subject: _Optional[str] = ...) -> None: ...
|
|
47
|
+
|
|
48
|
+
class ApplicationIdentifier(_message.Message):
|
|
49
|
+
__slots__ = ["subject"]
|
|
50
|
+
SUBJECT_FIELD_NUMBER: _ClassVar[int]
|
|
51
|
+
subject: str
|
|
52
|
+
def __init__(self, subject: _Optional[str] = ...) -> None: ...
|
|
53
|
+
|
|
54
|
+
class RoleIdentifier(_message.Message):
|
|
55
|
+
__slots__ = ["organization", "name"]
|
|
56
|
+
ORGANIZATION_FIELD_NUMBER: _ClassVar[int]
|
|
57
|
+
NAME_FIELD_NUMBER: _ClassVar[int]
|
|
58
|
+
organization: str
|
|
59
|
+
name: str
|
|
60
|
+
def __init__(self, organization: _Optional[str] = ..., name: _Optional[str] = ...) -> None: ...
|
|
61
|
+
|
|
62
|
+
class OrgIdentifier(_message.Message):
|
|
63
|
+
__slots__ = ["name"]
|
|
64
|
+
NAME_FIELD_NUMBER: _ClassVar[int]
|
|
65
|
+
name: str
|
|
66
|
+
def __init__(self, name: _Optional[str] = ...) -> None: ...
|
|
67
|
+
|
|
68
|
+
class ManagedClusterIdentifier(_message.Message):
|
|
69
|
+
__slots__ = ["name", "org"]
|
|
70
|
+
NAME_FIELD_NUMBER: _ClassVar[int]
|
|
71
|
+
ORG_FIELD_NUMBER: _ClassVar[int]
|
|
72
|
+
name: str
|
|
73
|
+
org: OrgIdentifier
|
|
74
|
+
def __init__(self, name: _Optional[str] = ..., org: _Optional[_Union[OrgIdentifier, _Mapping]] = ...) -> None: ...
|
|
75
|
+
|
|
76
|
+
class PolicyIdentifier(_message.Message):
|
|
77
|
+
__slots__ = ["organization", "name"]
|
|
78
|
+
ORGANIZATION_FIELD_NUMBER: _ClassVar[int]
|
|
79
|
+
NAME_FIELD_NUMBER: _ClassVar[int]
|
|
80
|
+
organization: str
|
|
81
|
+
name: str
|
|
82
|
+
def __init__(self, organization: _Optional[str] = ..., name: _Optional[str] = ...) -> None: ...
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
3
|
+
# source: common/identity.proto
|
|
4
|
+
"""Generated protocol buffer code."""
|
|
5
|
+
from google.protobuf import descriptor as _descriptor
|
|
6
|
+
from google.protobuf import descriptor_pool as _descriptor_pool
|
|
7
|
+
from google.protobuf import symbol_database as _symbol_database
|
|
8
|
+
from google.protobuf.internal import builder as _builder
|
|
9
|
+
# @@protoc_insertion_point(imports)
|
|
10
|
+
|
|
11
|
+
_sym_db = _symbol_database.Default()
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
from flyte._protos.common import identifier_pb2 as common_dot_identifier__pb2
|
|
15
|
+
from flyte._protos.common import policy_pb2 as common_dot_policy__pb2
|
|
16
|
+
from flyte._protos.common import role_pb2 as common_dot_role__pb2
|
|
17
|
+
from flyte._protos.validate.validate import validate_pb2 as validate_dot_validate__pb2
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x15\x63ommon/identity.proto\x12\x0f\x63loudidl.common\x1a\x17\x63ommon/identifier.proto\x1a\x13\x63ommon/policy.proto\x1a\x11\x63ommon/role.proto\x1a\x17validate/validate.proto\"\xcc\x01\n\x04User\x12/\n\x02id\x18\x01 \x01(\x0b\x32\x1f.cloudidl.common.UserIdentifierR\x02id\x12-\n\x04spec\x18\x02 \x01(\x0b\x32\x19.cloudidl.common.UserSpecR\x04spec\x12/\n\x05roles\x18\x03 \x03(\x0b\x32\x15.cloudidl.common.RoleB\x02\x18\x01R\x05roles\x12\x33\n\x08policies\x18\x04 \x03(\x0b\x32\x17.cloudidl.common.PolicyR\x08policies\"\xd6\x01\n\x08UserSpec\x12\x1d\n\nfirst_name\x18\x01 \x01(\tR\tfirstName\x12\x1b\n\tlast_name\x18\x02 \x01(\tR\x08lastName\x12\x14\n\x05\x65mail\x18\x03 \x01(\tR\x05\x65mail\x12\"\n\x0corganization\x18\x04 \x01(\tR\x0corganization\x12\x1f\n\x0buser_handle\x18\x05 \x01(\tR\nuserHandle\x12\x16\n\x06groups\x18\x06 \x03(\tR\x06groups\x12\x1b\n\tphoto_url\x18\x07 \x01(\tR\x08photoUrl\"s\n\x0b\x41pplication\x12\x36\n\x02id\x18\x01 \x01(\x0b\x32&.cloudidl.common.ApplicationIdentifierR\x02id\x12,\n\x04spec\x18\x02 \x01(\x0b\x32\x18.cloudidl.common.AppSpecR\x04spec\"A\n\x07\x41ppSpec\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\x12\"\n\x0corganization\x18\x02 \x01(\tR\x0corganization\"\xa7\x01\n\x10\x45nrichedIdentity\x12\x35\n\x04user\x18\x01 \x01(\x0b\x32\x15.cloudidl.common.UserB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01H\x00R\x04user\x12J\n\x0b\x61pplication\x18\x02 \x01(\x0b\x32\x1c.cloudidl.common.ApplicationB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01H\x00R\x0b\x61pplicationB\x10\n\tprincipal\x12\x03\xf8\x42\x01\"\xa4\x01\n\x08Identity\x12:\n\x07user_id\x18\x01 \x01(\x0b\x32\x1f.cloudidl.common.UserIdentifierH\x00R\x06userId\x12O\n\x0e\x61pplication_id\x18\x02 \x01(\x0b\x32&.cloudidl.common.ApplicationIdentifierH\x00R\rapplicationIdB\x0b\n\tprincipalB\xae\x01\n\x13\x63om.cloudidl.commonB\rIdentityProtoH\x02P\x01Z)github.com/unionai/cloud/gen/pb-go/common\xa2\x02\x03\x43\x43X\xaa\x02\x0f\x43loudidl.Common\xca\x02\x0f\x43loudidl\\Common\xe2\x02\x1b\x43loudidl\\Common\\GPBMetadata\xea\x02\x10\x43loudidl::Commonb\x06proto3')
|
|
21
|
+
|
|
22
|
+
_globals = globals()
|
|
23
|
+
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
|
24
|
+
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'common.identity_pb2', _globals)
|
|
25
|
+
if _descriptor._USE_C_DESCRIPTORS == False:
|
|
26
|
+
DESCRIPTOR._options = None
|
|
27
|
+
DESCRIPTOR._serialized_options = b'\n\023com.cloudidl.commonB\rIdentityProtoH\002P\001Z)github.com/unionai/cloud/gen/pb-go/common\242\002\003CCX\252\002\017Cloudidl.Common\312\002\017Cloudidl\\Common\342\002\033Cloudidl\\Common\\GPBMetadata\352\002\020Cloudidl::Common'
|
|
28
|
+
_USER.fields_by_name['roles']._options = None
|
|
29
|
+
_USER.fields_by_name['roles']._serialized_options = b'\030\001'
|
|
30
|
+
_ENRICHEDIDENTITY.oneofs_by_name['principal']._options = None
|
|
31
|
+
_ENRICHEDIDENTITY.oneofs_by_name['principal']._serialized_options = b'\370B\001'
|
|
32
|
+
_ENRICHEDIDENTITY.fields_by_name['user']._options = None
|
|
33
|
+
_ENRICHEDIDENTITY.fields_by_name['user']._serialized_options = b'\372B\005\212\001\002\020\001'
|
|
34
|
+
_ENRICHEDIDENTITY.fields_by_name['application']._options = None
|
|
35
|
+
_ENRICHEDIDENTITY.fields_by_name['application']._serialized_options = b'\372B\005\212\001\002\020\001'
|
|
36
|
+
_globals['_USER']._serialized_start=133
|
|
37
|
+
_globals['_USER']._serialized_end=337
|
|
38
|
+
_globals['_USERSPEC']._serialized_start=340
|
|
39
|
+
_globals['_USERSPEC']._serialized_end=554
|
|
40
|
+
_globals['_APPLICATION']._serialized_start=556
|
|
41
|
+
_globals['_APPLICATION']._serialized_end=671
|
|
42
|
+
_globals['_APPSPEC']._serialized_start=673
|
|
43
|
+
_globals['_APPSPEC']._serialized_end=738
|
|
44
|
+
_globals['_ENRICHEDIDENTITY']._serialized_start=741
|
|
45
|
+
_globals['_ENRICHEDIDENTITY']._serialized_end=908
|
|
46
|
+
_globals['_IDENTITY']._serialized_start=911
|
|
47
|
+
_globals['_IDENTITY']._serialized_end=1075
|
|
48
|
+
# @@protoc_insertion_point(module_scope)
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
from flyte._protos.common import identifier_pb2 as _identifier_pb2
|
|
2
|
+
from flyte._protos.common import policy_pb2 as _policy_pb2
|
|
3
|
+
from flyte._protos.common import role_pb2 as _role_pb2
|
|
4
|
+
from flyte._protos.validate.validate import validate_pb2 as _validate_pb2
|
|
5
|
+
from google.protobuf.internal import containers as _containers
|
|
6
|
+
from google.protobuf import descriptor as _descriptor
|
|
7
|
+
from google.protobuf import message as _message
|
|
8
|
+
from typing import ClassVar as _ClassVar, Iterable as _Iterable, Mapping as _Mapping, Optional as _Optional, Union as _Union
|
|
9
|
+
|
|
10
|
+
DESCRIPTOR: _descriptor.FileDescriptor
|
|
11
|
+
|
|
12
|
+
class User(_message.Message):
|
|
13
|
+
__slots__ = ["id", "spec", "roles", "policies"]
|
|
14
|
+
ID_FIELD_NUMBER: _ClassVar[int]
|
|
15
|
+
SPEC_FIELD_NUMBER: _ClassVar[int]
|
|
16
|
+
ROLES_FIELD_NUMBER: _ClassVar[int]
|
|
17
|
+
POLICIES_FIELD_NUMBER: _ClassVar[int]
|
|
18
|
+
id: _identifier_pb2.UserIdentifier
|
|
19
|
+
spec: UserSpec
|
|
20
|
+
roles: _containers.RepeatedCompositeFieldContainer[_role_pb2.Role]
|
|
21
|
+
policies: _containers.RepeatedCompositeFieldContainer[_policy_pb2.Policy]
|
|
22
|
+
def __init__(self, id: _Optional[_Union[_identifier_pb2.UserIdentifier, _Mapping]] = ..., spec: _Optional[_Union[UserSpec, _Mapping]] = ..., roles: _Optional[_Iterable[_Union[_role_pb2.Role, _Mapping]]] = ..., policies: _Optional[_Iterable[_Union[_policy_pb2.Policy, _Mapping]]] = ...) -> None: ...
|
|
23
|
+
|
|
24
|
+
class UserSpec(_message.Message):
|
|
25
|
+
__slots__ = ["first_name", "last_name", "email", "organization", "user_handle", "groups", "photo_url"]
|
|
26
|
+
FIRST_NAME_FIELD_NUMBER: _ClassVar[int]
|
|
27
|
+
LAST_NAME_FIELD_NUMBER: _ClassVar[int]
|
|
28
|
+
EMAIL_FIELD_NUMBER: _ClassVar[int]
|
|
29
|
+
ORGANIZATION_FIELD_NUMBER: _ClassVar[int]
|
|
30
|
+
USER_HANDLE_FIELD_NUMBER: _ClassVar[int]
|
|
31
|
+
GROUPS_FIELD_NUMBER: _ClassVar[int]
|
|
32
|
+
PHOTO_URL_FIELD_NUMBER: _ClassVar[int]
|
|
33
|
+
first_name: str
|
|
34
|
+
last_name: str
|
|
35
|
+
email: str
|
|
36
|
+
organization: str
|
|
37
|
+
user_handle: str
|
|
38
|
+
groups: _containers.RepeatedScalarFieldContainer[str]
|
|
39
|
+
photo_url: str
|
|
40
|
+
def __init__(self, first_name: _Optional[str] = ..., last_name: _Optional[str] = ..., email: _Optional[str] = ..., organization: _Optional[str] = ..., user_handle: _Optional[str] = ..., groups: _Optional[_Iterable[str]] = ..., photo_url: _Optional[str] = ...) -> None: ...
|
|
41
|
+
|
|
42
|
+
class Application(_message.Message):
|
|
43
|
+
__slots__ = ["id", "spec"]
|
|
44
|
+
ID_FIELD_NUMBER: _ClassVar[int]
|
|
45
|
+
SPEC_FIELD_NUMBER: _ClassVar[int]
|
|
46
|
+
id: _identifier_pb2.ApplicationIdentifier
|
|
47
|
+
spec: AppSpec
|
|
48
|
+
def __init__(self, id: _Optional[_Union[_identifier_pb2.ApplicationIdentifier, _Mapping]] = ..., spec: _Optional[_Union[AppSpec, _Mapping]] = ...) -> None: ...
|
|
49
|
+
|
|
50
|
+
class AppSpec(_message.Message):
|
|
51
|
+
__slots__ = ["name", "organization"]
|
|
52
|
+
NAME_FIELD_NUMBER: _ClassVar[int]
|
|
53
|
+
ORGANIZATION_FIELD_NUMBER: _ClassVar[int]
|
|
54
|
+
name: str
|
|
55
|
+
organization: str
|
|
56
|
+
def __init__(self, name: _Optional[str] = ..., organization: _Optional[str] = ...) -> None: ...
|
|
57
|
+
|
|
58
|
+
class EnrichedIdentity(_message.Message):
|
|
59
|
+
__slots__ = ["user", "application"]
|
|
60
|
+
USER_FIELD_NUMBER: _ClassVar[int]
|
|
61
|
+
APPLICATION_FIELD_NUMBER: _ClassVar[int]
|
|
62
|
+
user: User
|
|
63
|
+
application: Application
|
|
64
|
+
def __init__(self, user: _Optional[_Union[User, _Mapping]] = ..., application: _Optional[_Union[Application, _Mapping]] = ...) -> None: ...
|
|
65
|
+
|
|
66
|
+
class Identity(_message.Message):
|
|
67
|
+
__slots__ = ["user_id", "application_id"]
|
|
68
|
+
USER_ID_FIELD_NUMBER: _ClassVar[int]
|
|
69
|
+
APPLICATION_ID_FIELD_NUMBER: _ClassVar[int]
|
|
70
|
+
user_id: _identifier_pb2.UserIdentifier
|
|
71
|
+
application_id: _identifier_pb2.ApplicationIdentifier
|
|
72
|
+
def __init__(self, user_id: _Optional[_Union[_identifier_pb2.UserIdentifier, _Mapping]] = ..., application_id: _Optional[_Union[_identifier_pb2.ApplicationIdentifier, _Mapping]] = ...) -> None: ...
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
3
|
+
# source: common/list.proto
|
|
4
|
+
"""Generated protocol buffer code."""
|
|
5
|
+
from google.protobuf import descriptor as _descriptor
|
|
6
|
+
from google.protobuf import descriptor_pool as _descriptor_pool
|
|
7
|
+
from google.protobuf import symbol_database as _symbol_database
|
|
8
|
+
from google.protobuf.internal import builder as _builder
|
|
9
|
+
# @@protoc_insertion_point(imports)
|
|
10
|
+
|
|
11
|
+
_sym_db = _symbol_database.Default()
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x11\x63ommon/list.proto\x12\x0f\x63loudidl.common\"\x83\x01\n\x04Sort\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12=\n\tdirection\x18\x02 \x01(\x0e\x32\x1f.cloudidl.common.Sort.DirectionR\tdirection\"*\n\tDirection\x12\x0e\n\nDESCENDING\x10\x00\x12\r\n\tASCENDING\x10\x01\"\xfe\x01\n\x0bListRequest\x12\x14\n\x05limit\x18\x01 \x01(\rR\x05limit\x12\x14\n\x05token\x18\x02 \x01(\tR\x05token\x12\x32\n\x07sort_by\x18\x03 \x01(\x0b\x32\x15.cloudidl.common.SortB\x02\x18\x01R\x06sortBy\x12\x31\n\x07\x66ilters\x18\x04 \x03(\x0b\x32\x17.cloudidl.common.FilterR\x07\x66ilters\x12\x1f\n\x0braw_filters\x18\x05 \x03(\tR\nrawFilters\x12;\n\x0esort_by_fields\x18\x06 \x03(\x0b\x32\x15.cloudidl.common.SortR\x0csortByFields\"\xad\x02\n\x06\x46ilter\x12<\n\x08\x66unction\x18\x01 \x01(\x0e\x32 .cloudidl.common.Filter.FunctionR\x08\x66unction\x12\x14\n\x05\x66ield\x18\x02 \x01(\tR\x05\x66ield\x12\x16\n\x06values\x18\x03 \x03(\tR\x06values\"\xb6\x01\n\x08\x46unction\x12\t\n\x05\x45QUAL\x10\x00\x12\r\n\tNOT_EQUAL\x10\x01\x12\x10\n\x0cGREATER_THAN\x10\x02\x12\x19\n\x15GREATER_THAN_OR_EQUAL\x10\x03\x12\r\n\tLESS_THAN\x10\x04\x12\x16\n\x12LESS_THAN_OR_EQUAL\x10\x05\x12\x0c\n\x08\x43ONTAINS\x10\x06\x12\x0c\n\x08VALUE_IN\x10\x07\x12\r\n\tENDS_WITH\x10\x0c\x12\x11\n\rNOT_ENDS_WITH\x10\rB\xaa\x01\n\x13\x63om.cloudidl.commonB\tListProtoH\x02P\x01Z)github.com/unionai/cloud/gen/pb-go/common\xa2\x02\x03\x43\x43X\xaa\x02\x0f\x43loudidl.Common\xca\x02\x0f\x43loudidl\\Common\xe2\x02\x1b\x43loudidl\\Common\\GPBMetadata\xea\x02\x10\x43loudidl::Commonb\x06proto3')
|
|
17
|
+
|
|
18
|
+
_globals = globals()
|
|
19
|
+
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
|
20
|
+
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'common.list_pb2', _globals)
|
|
21
|
+
if _descriptor._USE_C_DESCRIPTORS == False:
|
|
22
|
+
DESCRIPTOR._options = None
|
|
23
|
+
DESCRIPTOR._serialized_options = b'\n\023com.cloudidl.commonB\tListProtoH\002P\001Z)github.com/unionai/cloud/gen/pb-go/common\242\002\003CCX\252\002\017Cloudidl.Common\312\002\017Cloudidl\\Common\342\002\033Cloudidl\\Common\\GPBMetadata\352\002\020Cloudidl::Common'
|
|
24
|
+
_LISTREQUEST.fields_by_name['sort_by']._options = None
|
|
25
|
+
_LISTREQUEST.fields_by_name['sort_by']._serialized_options = b'\030\001'
|
|
26
|
+
_globals['_SORT']._serialized_start=39
|
|
27
|
+
_globals['_SORT']._serialized_end=170
|
|
28
|
+
_globals['_SORT_DIRECTION']._serialized_start=128
|
|
29
|
+
_globals['_SORT_DIRECTION']._serialized_end=170
|
|
30
|
+
_globals['_LISTREQUEST']._serialized_start=173
|
|
31
|
+
_globals['_LISTREQUEST']._serialized_end=427
|
|
32
|
+
_globals['_FILTER']._serialized_start=430
|
|
33
|
+
_globals['_FILTER']._serialized_end=731
|
|
34
|
+
_globals['_FILTER_FUNCTION']._serialized_start=549
|
|
35
|
+
_globals['_FILTER_FUNCTION']._serialized_end=731
|
|
36
|
+
# @@protoc_insertion_point(module_scope)
|