esgf_playground_utils.models.kafka
Models relating to Kakfa payloads for the ESGF-Playground.
Classes
Base model for payloads in a Kafka message, provides the required |
|
Model describing a |
|
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. |
|
The full content of a Kafka message, containing both the STAC payload, the request description and the ESGF |
|
Enum describing the source of the error that occurred. |
|
Error event published to the Kafka error queue. |
Module Contents
- class esgf_playground_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_playground_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_playground_utils.models.kafka.RevokePayload(/, **data: Any)
Bases:
_PayloadModel describing a
REVOKEpayload. This must be sent as aPATCHorDELETErequest.Note
It is intended that the
PATCHrequest is interpreted as a “soft” delete, simply updating the item to signify that it is revoked.The
DELETErequest will operate as a “hard” delete strictly removing the item from the STAC index.Danger
The behaviour of either of these actions is not yet fully defined.
- method: Literal['PATCH', 'DELETE']
- item_id: str
- class esgf_playground_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_playground_utils.models.kafka.UpdatePayload(/, **data: Any)
Bases:
_PayloadModel describing a
UPDATEpayload. This must be sent as aPATCHorPUTrequest.- method: Literal['PUT', 'PATCH']
- item: stac_pydantic.item.Item
- item_id: str
- class esgf_playground_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 | RevokePayload | UpdatePayload | PatchPayload
- class esgf_playground_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_playground_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_playground_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_playground_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_playground_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.