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 the |
|
Model describing |
|
Model describing the |
|
Multiple metadata attributes required for ESGF but not part of the STAC payload. |
|
An extension of the Metadata Model for Publish Events. |
|
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.BaseModel
Base model for payloads in a Kafka message, provides the required
collection_id
attribute.Warning
This model should not be used directly.
- collection_id: str
- class esgf_playground_utils.models.kafka.CreatePayload(/, **data: Any)
Bases:
_Payload
Model describing a
CREATE
payload. This must be sent as aPOST
request.- method: Literal['POST']
- item: stac_pydantic.item.Item
- class esgf_playground_utils.models.kafka.RevokePayload(/, **data: Any)
Bases:
_Payload
Model describing a
REVOKE
payload. This must be sent as aPATCH
orDELETE
request.Note
It is intended that the
PATCH
request is interpreted as a “soft” delete, simply updating the item to signify that it is revoked.The
DELETE
request 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.PartialUpdatePayload(/, **data: Any)
Bases:
_Payload
Model describing a
PARTIAL_UPDATE
payload. This must be sent as aPATCH
request.- method: Literal['PATCH']
- item: Dict[str, Any]
- item_id: str
- class esgf_playground_utils.models.kafka.UpdatePayload(/, **data: Any)
Bases:
_Payload
Model describing a
UPDATE
payload. This must be sent as aPATCH
orPUT
request.- method: Literal['PUT', 'PATCH']
- item: stac_pydantic.item.Item
- item_id: str
- class esgf_playground_utils.models.kafka.Data(/, **data: Any)
Bases:
pydantic.BaseModel
Model describing the
DATA
component of a Kafka message. This contains the payload itself.Note
Whilst the
type
andversion
attributes are available, it is not expected that these will change for a significant length of time.- type: Literal['STAC']
- version: Literal['1.0.0']
- payload: CreatePayload | RevokePayload | UpdatePayload | PartialUpdatePayload
- class esgf_playground_utils.models.kafka.Auth(/, **data: Any)
Bases:
pydantic.BaseModel
Model describing the
AUTH
component of a Kafka message.Note
This is not an authorisation token or other verified identity. It is the simply an indication of the institute providing the message.
- client_id: str
- server: str
- class esgf_playground_utils.models.kafka.AuthData(/, **data: Any)
Bases:
pydantic.BaseModel
Model describing
Auth
component of a Kafka message in more detail.- auth_policy_id: str
- client_id: str
- requester_data: Dict[str, str]
- class esgf_playground_utils.models.kafka.Publisher(/, **data: Any)
Bases:
pydantic.BaseModel
Model describing the
PUBLISHER
component 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.BaseModel
Multiple metadata attributes required for ESGF but not part of the STAC payload.
- time: datetime.datetime
- schema_version: str
- class esgf_playground_utils.models.kafka.ExtendedMetadata(/, **data: Any)
Bases:
Metadata
An extension of the Metadata Model for Publish Events.
- event_id: str
- request_id: str
- class esgf_playground_utils.models.kafka.KafkaEvent(/, **data: Any)
Bases:
pydantic.BaseModel
The full content of a Kafka message, containing both the STAC payload, the request description and the ESGF mandated metadata.
- metadata: Metadata | ExtendedMetadata