esgf_core_utils.models.kafka
Models relating to Kakfa payloads for the ESGF Core architecture.
Classes
Base model for payloads in a Kafka message, provides the required |
|
Model describing a |
|
Model describing a |
|
Model describing a |
|
Model describing the |
|
Model describing |
|
Model describing |
|
Model describing the |
|
Multiple metadata attributes required for ESGF but not part of the STAC payload. |
|
Error following RFC9457: Problem Details for HTTP APIs. |
|
The full content of a Kafka message, containing both the STAC payload, the request description |
|
The full content of a Kafka error message, containing the STAC payload, the request description, |
Module Contents
- class esgf_core_utils.models.kafka._Payload(/, **data: Any)
Bases:
pydantic.BaseModelBase model for payloads in a Kafka message, provides the required
collection_idattribute.Warning
This model should not be used directly.
- collection_id: str
- class esgf_core_utils.models.kafka.CreatePayload(/, **data: Any)
Bases:
_PayloadModel describing a
CREATEpayload. This must be sent as aPOSTrequest.- method: Literal['POST']
- item: stac_pydantic.item.Item
- class esgf_core_utils.models.kafka.PatchPayload(/, **data: Any)
Bases:
_PayloadModel describing a
PARTIAL_UPDATEpayload. This must be sent as aPATCHrequest.- method: Literal['PATCH']
- patch: stac_fastapi.extensions.core.transaction.request.PartialItem | list[stac_fastapi.extensions.core.transaction.request.PatchOperation]
- item_id: str
- class esgf_core_utils.models.kafka.UpdatePayload(/, **data: Any)
Bases:
_PayloadModel describing a
UPDATEpayload. This must be sent as aPUTrequest.- method: Literal['PUT']
- item: stac_fastapi.extensions.core.transaction.request.PartialItem
- item_id: str
- class esgf_core_utils.models.kafka.Data(/, **data: Any)
Bases:
pydantic.BaseModelModel describing the
DATAcomponent of a Kafka message. This contains the payload itself.Note
Whilst the
typeandversionattributes are available, it is not expected that these will change for a significant length of time.- type: Literal['STAC']
- payload: CreatePayload | UpdatePayload | PatchPayload
- class esgf_core_utils.models.kafka.RequesterData(/, **data: Any)
Bases:
pydantic.BaseModelModel describing
Requests Datafor theAuthcomponent of a Kafka message in more detail.- client_id: str
- iss: str
- sub: str
- class esgf_core_utils.models.kafka.Auth(/, **data: Any)
Bases:
pydantic.BaseModelModel describing
Authcomponent of a Kafka message in more detail.Note
This is not an authorisation token or other verified identity. It is the simply an indication of the institute providing the message.
- auth_policy_id: str | None = None
- requester_data: RequesterData
- class esgf_core_utils.models.kafka.Publisher(/, **data: Any)
Bases:
pydantic.BaseModelModel describing the
PUBLISHERcomponent of a Kafka message. This is the name and version of the software used to publish the Kafka message.- package: str
- version: str
- class esgf_core_utils.models.kafka.Metadata(/, **data: Any)
Bases:
pydantic.BaseModelMultiple metadata attributes required for ESGF but not part of the STAC payload.
- event_id: str
- request_id: str
- time: datetime.datetime
- schema_version: str
- class esgf_core_utils.models.kafka.Error(/, **data: Any)
Bases:
pydantic.BaseModelError following RFC9457: Problem Details for HTTP APIs.
- detail: str
- instance: str
- status: int
- title: str
- type: str
- class esgf_core_utils.models.kafka.KafkaEvent(/, **data: Any)
Bases:
pydantic.BaseModelThe full content of a Kafka message, containing both the STAC payload, the request description and the ESGF mandated metadata.
- class esgf_core_utils.models.kafka.KafkaErrorEvent(/, **data: Any)
Bases:
KafkaEventThe full content of a Kafka error message, containing the STAC payload, the request description, ESGF mandated metadata, and error.