From d797953c74798252d7153a20e788ed034c71b0ae Mon Sep 17 00:00:00 2001 From: vnugent Date: Thu, 12 Jan 2023 17:47:40 -0500 Subject: Large project reorder and consolidation --- Transactional Emails/TEmailEntryPoint.cs | 88 -------------------------------- 1 file changed, 88 deletions(-) delete mode 100644 Transactional Emails/TEmailEntryPoint.cs (limited to 'Transactional Emails/TEmailEntryPoint.cs') diff --git a/Transactional Emails/TEmailEntryPoint.cs b/Transactional Emails/TEmailEntryPoint.cs deleted file mode 100644 index c95ca08..0000000 --- a/Transactional Emails/TEmailEntryPoint.cs +++ /dev/null @@ -1,88 +0,0 @@ -/* -* Copyright (c) 2022 Vaughn Nugent -* -* Library: VNLib -* Package: Transactional Emails -* File: TEmailEntryPoint.cs -* -* TEmailEntryPoint.cs is part of Transactional Emails which is part of the larger -* VNLib collection of libraries and utilities. -* -* Transactional Emails is free software: you can redistribute it and/or modify -* it under the terms of the GNU General Public License as published -* by the Free Software Foundation, either version 2 of the License, -* or (at your option) any later version. -* -* Transactional Emails is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with Transactional Emails. If not, see http://www.gnu.org/licenses/. -*/ - -using System; -using System.Threading.Tasks; -using System.Collections.Generic; - -using Emails.Transactional.Endpoints; - -using Minio; -using Minio.DataModel.Tracing; - -using VNLib.Utils.Logging; -using VNLib.Plugins; -using VNLib.Plugins.Extensions.Loading.Routing; - -namespace Emails.Transactional -{ - public class TEmailEntryPoint : PluginBase - { - public override string PluginName => "Emails.Transactional"; - - internal class ReqLogger : IRequestLogger - { - private readonly ILogProvider logProvider; - - public ReqLogger(ILogProvider log) - { - logProvider = log; - } - - public void LogRequest(RequestToLog requestToLog, ResponseToLog responseToLog, double durationMs) - { - logProvider.Debug("S3 result\n{method} {uri} HTTP {ms}ms\nHTTP {status} {message}\n{content}", - requestToLog.method, requestToLog.resource, durationMs, - responseToLog.statusCode, responseToLog.errorMessage, responseToLog.content - ); - } - } - - protected override void OnLoad() - { - try - { - //Route send oauth endpoint - this.Route(); - - Log.Information("Plugin loaded"); - } - catch (KeyNotFoundException kne) - { - Log.Warn("Missing required configuration keys {err}", kne.Message); - } - } - - - protected override void OnUnLoad() - { - Log.Information("Plugin unloaded"); - } - - protected override void ProcessHostCommand(string cmd) - { - throw new NotImplementedException(); - } - } -} -- cgit