Buckets:
AnonymousSpottedToad/candidate_bucket / codebase /python /MTSWebServices_syncmaster /syncmaster /schemas /v1 /connections /mysql.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 MYSQL_TYPE | |
| from syncmaster.schemas.v1.connections.connection_base import ( | |
| CreateConnectionBaseSchema, | |
| ReadConnectionBaseSchema, | |
| ) | |
| class MySQLConnectionDataSchema(BaseModel): | |
| host: str | |
| port: int = Field(default=3306, gt=0, le=65535) | |
| database_name: str | None = None | |
| additional_params: dict = Field(default_factory=dict) | |
| class CreateMySQLConnectionSchema(CreateConnectionBaseSchema): | |
| type: MYSQL_TYPE = Field(description="Connection type") | |
| data: MySQLConnectionDataSchema = Field( | |
| alias="connection_data", | |
| description="Data required to connect to the database", | |
| ) | |
| auth_data: CreateBasicAuthSchema = Field( | |
| description="Credentials for authorization", | |
| ) | |
| class ReadMySQLConnectionSchema(ReadConnectionBaseSchema): | |
| type: MYSQL_TYPE = Field(description="Connection type") | |
| data: MySQLConnectionDataSchema = 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 UpdateMySQLConnectionSchema(CreateMySQLConnectionSchema): | |
| auth_data: UpdateBasicAuthSchema = Field( | |
| description="Credentials for authorization", | |
| ) | |
Xet Storage Details
- Size:
- 1.6 kB
- Xet hash:
- 07b6e02645433d2b558df5430806988a03e2e640f9447ed532a9bd5abe2e154e
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.