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/tribe/repository.go

31 lines
549 B
Go

package tribe
import (
"context"
"github.com/tribalwarshelp/shared/tw/twmodel"
)
type FetchConfig struct {
Server string
Filter *twmodel.TribeFilter
Count bool
Select bool
Sort []string
Limit int
Offset int
}
type SearchTribeConfig struct {
Version string
Query string
Count bool
Sort []string
Limit int
Offset int
}
type Repository interface {
Fetch(ctx context.Context, cfg FetchConfig) ([]*twmodel.Tribe, int, error)
SearchTribe(ctx context.Context, cfg SearchTribeConfig) ([]*twmodel.FoundTribe, int, error)
}