This repository has been archived on 2022-09-04. You can view files and clone it, but cannot push or open issues or pull requests.
api/dailytribestats/repository.go
Kichiyaki 01fdd80f7f [WIP] - refactor limit, sort, offset
- rename middleware.MayExceedLimit to CanExceedLimit
- update the DailyTribeStats/DailyPlayerStats repository and usecase
- rename utils.SanitizeSort to utils.SanitizeSortExpression
- add two new utils - SanitizeSortExpressions and FindStringWithPrefix
2020-11-21 09:13:25 +01:00

21 lines
343 B
Go

package dailytribestats
import (
"context"
"github.com/tribalwarshelp/shared/models"
)
type FetchConfig struct {
Server string
Filter *models.DailyTribeStatsFilter
Count bool
Sort []string
Limit int
Offset int
}
type Repository interface {
Fetch(ctx context.Context, cfg FetchConfig) ([]*models.DailyTribeStats, int, error)
}