27 lines
1.0 KiB
C#
27 lines
1.0 KiB
C#
using System.Threading;
|
|
using System.Threading.Tasks;
|
|
using LaDOSE.Entity;
|
|
|
|
namespace LaDOSE.Business.Interface
|
|
{
|
|
/// <summary>
|
|
/// Writes tabular data into a Google Spreadsheet. Startup picks one implementation from
|
|
/// GoogleSheets:Writer, so nothing above this interface knows how Google is reached.
|
|
///
|
|
/// Implementations must be idempotent: writing the same request twice leaves the same
|
|
/// spreadsheet. They must also leave tabs they were not asked about completely alone —
|
|
/// the spreadsheet holds hand-made summaries and charts, and deletion is irreversible
|
|
/// through the API.
|
|
/// </summary>
|
|
public interface ISheetsWriter
|
|
{
|
|
/// <summary>Reported to the UI so the panel can say what it is talking to.</summary>
|
|
string Name { get; }
|
|
|
|
/// <summary>False when credentials are missing, so the API can answer 503 with a message.</summary>
|
|
bool IsConfigured { get; }
|
|
|
|
Task<SheetExportResult> WriteTablesAsync(SheetExportRequest request, CancellationToken ct = default);
|
|
}
|
|
}
|