feat: Add Gmail Catchall Labeler service with configuration and functionality
Build and Push Docker Image / build-and-push (push) Successful in 2m21s

- Introduced a new Docker Compose configuration for the Gmail Catchall Labeler service.
- Implemented GmailOptions class for managing configuration settings.
- Developed GmailApiClient to interact with the Gmail API, including methods for fetching messages and managing labels.
- Created models for Gmail messages, labels, and headers.
- Added IGmailClient interface to define the contract for Gmail client implementations.
- Implemented GmailOrganizer to handle the organization of emails based on recipient addresses.
- Developed LabelNameResolver for generating label names based on local parts of email addresses.
- Created RecipientExtractor to extract local parts from email headers.
- Implemented state management with OrganizerState and StateStore for persisting state information.
- Added Worker class to manage the background processing of email organization.
- Created unit tests for GmailOrganizer, LabelNameResolver, and RecipientExtractor to ensure functionality.
- Added necessary project files and configurations for building and running the application.
This commit is contained in:
2026-09-26 20:05:21 +02:00
commit 48488b72b5
29 changed files with 1279 additions and 0 deletions
+20
View File
@@ -0,0 +1,20 @@
FROM mcr.microsoft.com/dotnet/sdk:10.0 AS build
WORKDIR /source
COPY src/GmailCatchallLabeler/GmailCatchallLabeler.csproj src/GmailCatchallLabeler/
RUN dotnet restore src/GmailCatchallLabeler/GmailCatchallLabeler.csproj
COPY src/GmailCatchallLabeler/ src/GmailCatchallLabeler/
RUN dotnet publish src/GmailCatchallLabeler/GmailCatchallLabeler.csproj \
--configuration Release \
--no-restore \
--output /app
FROM mcr.microsoft.com/dotnet/aspnet:10.0 AS final
WORKDIR /app
RUN mkdir /data && chown "$APP_UID:$APP_UID" /data
COPY --from=build --chown=$APP_UID:$APP_UID /app .
USER $APP_UID
VOLUME ["/data"]
EXPOSE 8080
ENTRYPOINT ["dotnet", "GmailCatchallLabeler.dll"]