cloud_server.models¶
Pydantic models for the server.
Functions
Get the current Unix timestamp as an integer. |
Classes
|
Cloud server configuration. |
|
Enumeration for database actions. |
|
Response model for deleting a file. |
|
Model for file metadata stored in the index. |
|
Response model for getting metadata for all files. |
|
Configuration for the server database. |
|
Configuration model for the cloud storage. |
|
Request model for updating file metadata. |
|
Response model for updating file metadata. |
|
Response model for uploading a file. |
- class cloud_server.models.ServerDatabaseConfig(**data)[source]¶
Configuration for the server database.
- class cloud_server.models.CloudServerConfig(**data)[source]¶
Cloud server configuration.
- storage_config: StorageConfig¶
- cloud_server.models.current_timestamp_int()[source]¶
Get the current Unix timestamp as an integer.
- Return int:
The current Unix timestamp
- Return type:
- class cloud_server.models.DatabaseAction(*values)[source]¶
Enumeration for database actions.
- CREATE = 'create'¶
- READ = 'read'¶
- UPDATE = 'update'¶
- DELETE = 'delete'¶
- class cloud_server.models.FileMetadata(**data)[source]¶
Model for file metadata stored in the index.
- class cloud_server.models.ListFilesResponse(**data)[source]¶
Response model for getting metadata for all files.
- model_config: ClassVar[ConfigDict] = {'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- files_metadata: list[FileMetadata]¶
- class cloud_server.models.UploadFileResponse(**data)[source]¶
Response model for uploading a file.
- model_config: ClassVar[ConfigDict] = {'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- file_metadata: FileMetadata¶
- class cloud_server.models.DeleteFileResponse(**data)[source]¶
Response model for deleting a file.
- model_config: ClassVar[ConfigDict] = {'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- file_metadata: FileMetadata¶
- class cloud_server.models.UpdateFileMetadataResponse(**data)[source]¶
Response model for updating file metadata.
- model_config: ClassVar[ConfigDict] = {'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- file_metadata: FileMetadata¶
- class cloud_server.models.UpdateFileMetadataRequest(**data)[source]¶
Request model for updating file metadata.