feat(proj): init
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
using TileServer.Domain.Extracts;
|
||||
|
||||
namespace TileServer.Application.Extracts;
|
||||
|
||||
public sealed record ExtractResponse(
|
||||
string Id,
|
||||
string Name,
|
||||
string Url,
|
||||
bool Enabled,
|
||||
double[] Center,
|
||||
int MinZoom,
|
||||
int MaxZoom,
|
||||
string TileUrlTemplate,
|
||||
string TileJsonUrl,
|
||||
ExtractSyncState Status,
|
||||
DateTimeOffset? DownloadedAt,
|
||||
DateTimeOffset? BuiltAt,
|
||||
long? PbfBytes,
|
||||
string? LastError,
|
||||
TilesetBounds? Bounds);
|
||||
|
||||
public sealed record TilesetBounds(double MinLon, double MinLat, double MaxLon, double MaxLat);
|
||||
|
||||
public sealed record CreateExtractRequest(
|
||||
string Id,
|
||||
string Name,
|
||||
string Url,
|
||||
double[]? Center,
|
||||
int? MinZoom,
|
||||
int? MaxZoom,
|
||||
bool Enabled = true);
|
||||
|
||||
public interface IExtractService
|
||||
{
|
||||
Task<IReadOnlyList<ExtractResponse>> ListAsync(string baseUrl, CancellationToken ct);
|
||||
|
||||
Task<ExtractResponse> GetAsync(string id, string baseUrl, CancellationToken ct);
|
||||
|
||||
Task<ExtractResponse> AddOrUpdateAsync(CreateExtractRequest request, string baseUrl, CancellationToken ct);
|
||||
|
||||
Task RemoveAsync(string id, CancellationToken ct);
|
||||
}
|
||||
Reference in New Issue
Block a user