All checks were successful
Java Maven 3.9.9 & JDK 26 CI/CD Pipeline / build-and-deploy (push) Successful in 3m22s
19 lines
431 B
Python
19 lines
431 B
Python
from abc import ABC, abstractmethod
|
|
from dataclasses import dataclass
|
|
|
|
|
|
@dataclass(frozen=True)
|
|
class ImageAttachment:
|
|
filename: str
|
|
content_type: str
|
|
data: bytes
|
|
|
|
|
|
class Notifier(ABC):
|
|
name = "base"
|
|
|
|
@abstractmethod
|
|
async def send(self, title: str, text: str,
|
|
images: list[ImageAttachment] | None = None) -> None:
|
|
"""Deliver one notification or raise so the caller can retry."""
|