Buckets:
AnonymousSpottedToad/candidate_bucket / codebase /python /MTSWebServices_syncmaster /syncmaster /schemas /v1 /connections /postgres.py
| # SPDX-FileCopyrightText: 2023-present MTS PJSC | |
| # SPDX-License-Identifier: Apache-2.0 | |
| from pydantic import BaseModel, Field | |
| from syncmaster.schemas.v1.auth import ( | |
| CreateBasicAuthSchema, | |
| ReadBasicAuthSchema, | |
| UpdateBasicAuthSchema, | |
| ) | |
| from syncmaster.schemas.v1.connection_types import POSTGRES_TYPE | |
| from syncmaster.schemas.v1.connections.connection_base import ( | |
| CreateConnectionBaseSchema, | |
| ReadConnectionBaseSchema, | |
| ) | |
| class PostgresConnectionDataSchema(BaseModel): | |
| host: str | |
| port: int = Field(default=5432, gt=0, le=65535) | |
| database_name: str | |
| additional_params: dict = Field(default_factory=dict) | |
| class CreatePostgresConnectionSchema(CreateConnectionBaseSchema): | |
| type: POSTGRES_TYPE = Field(description="Connection type") | |
| data: PostgresConnectionDataSchema = Field( | |
| alias="connection_data", | |
| description="Data required to connect to the database", | |
| ) | |
| auth_data: CreateBasicAuthSchema = Field( | |
| description="Credentials for authorization", | |
| ) | |
| class ReadPostgresConnectionSchema(ReadConnectionBaseSchema): | |
| type: POSTGRES_TYPE = Field(description="Connection type") | |
| data: PostgresConnectionDataSchema = Field( | |
| alias="connection_data", | |
| description="Data required to connect to the remote server", | |
| ) | |
| auth_data: ReadBasicAuthSchema | None = Field( | |
| default=None, | |
| description="Credentials for authorization", | |
| ) | |
| class UpdatePostgresConnectionSchema(CreatePostgresConnectionSchema): | |
| auth_data: UpdateBasicAuthSchema = Field( | |
| description="Credentials for authorization", | |
| ) | |
Xet Storage Details
- Size:
- 1.62 kB
- Xet hash:
- 029f1990e11303d4e3f96f9eb04c9de91c5bbbcc2c81f89b5e500157e20ef509
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.