Add account usage logic (#1567)

---------

Co-authored-by: Yury Gargay <yury.gargay@gmail.com>
This commit is contained in:
Viktor Liu
2024-02-22 12:27:08 +01:00
committed by GitHub
co-authored by Yury Gargay
parent e18bf565a2
commit b7a6cbfaa5
21 changed files with 576 additions and 30 deletions
+2
View File
@@ -1,6 +1,7 @@
package server
import (
"context"
"fmt"
"os"
"path/filepath"
@@ -41,6 +42,7 @@ type Store interface {
// GetStoreEngine should return StoreEngine of the current store implementation.
// This is also a method of metrics.DataSource interface.
GetStoreEngine() StoreEngine
CalculateUsageStats(ctx context.Context, accountID string, start time.Time, end time.Time) (*AccountUsageStats, error)
}
type StoreEngine string