mirror of https://github.com/Squidex/squidex.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
935 B
24 lines
935 B
// ==========================================================================
|
|
// Squidex Headless CMS
|
|
// ==========================================================================
|
|
// Copyright (c) Squidex UG (haftungsbeschraenkt)
|
|
// All rights reserved. Licensed under the MIT license.
|
|
// ==========================================================================
|
|
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace Squidex.Infrastructure.UsageTracking
|
|
{
|
|
public interface IApiUsageTracker
|
|
{
|
|
Task TrackAsync(DateTime date, string key, string? category, double weight, long elapsedMs, long bytes);
|
|
|
|
Task<long> GetMonthCallsAsync(string key, DateTime date);
|
|
|
|
Task<long> GetMonthBytesAsync(string key, DateTime date);
|
|
|
|
Task<(ApiStatsSummary, Dictionary<string, List<ApiStats>> Details)> QueryAsync(string key, DateTime fromDate, DateTime toDate);
|
|
}
|
|
}
|
|
|