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/player/repository.go
Kichiyaki a854a4b80a [WIP] - refactor limit, sort, offset
- update the Player/Ennoblement repository and usecase
2020-11-21 10:08:22 +01:00

23 lines
550 B
Go

package player
import (
"context"
"github.com/tribalwarshelp/shared/models"
)
type FetchConfig struct {
Server string
Filter *models.PlayerFilter
Count bool
Sort []string
Limit int
Offset int
}
type Repository interface {
Fetch(ctx context.Context, cfg FetchConfig) ([]*models.Player, int, error)
FetchNameChanges(ctx context.Context, code models.VersionCode, playerID ...int) (map[int][]*models.PlayerNameChange, error)
FetchPlayerServers(ctx context.Context, code models.VersionCode, playerID ...int) (map[int][]string, error)
}