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.
2020-06-02 15:45:21 +00:00
|
|
|
package player
|
|
|
|
|
|
|
|
import (
|
|
|
|
"context"
|
|
|
|
|
|
|
|
"github.com/tribalwarshelp/shared/models"
|
|
|
|
)
|
|
|
|
|
2020-06-24 13:05:31 +00:00
|
|
|
type FetchConfig struct {
|
|
|
|
Server string
|
|
|
|
Filter *models.PlayerFilter
|
|
|
|
Count bool
|
2020-11-21 09:08:22 +00:00
|
|
|
Sort []string
|
|
|
|
Limit int
|
|
|
|
Offset int
|
2020-06-24 13:05:31 +00:00
|
|
|
}
|
|
|
|
|
2020-06-02 15:45:21 +00:00
|
|
|
type Repository interface {
|
2020-06-24 13:05:31 +00:00
|
|
|
Fetch(ctx context.Context, cfg FetchConfig) ([]*models.Player, int, error)
|
2020-11-06 19:23:12 +00:00
|
|
|
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)
|
2020-06-02 15:45:21 +00:00
|
|
|
}
|