2021-05-03 22:15:11 -04:00
|
|
|
package geodata
|
|
|
|
|
2021-09-07 04:13:58 -04:00
|
|
|
import (
|
|
|
|
"github.com/v2fly/v2ray-core/v4/app/router/routercommon"
|
|
|
|
)
|
2021-05-03 22:15:11 -04:00
|
|
|
|
|
|
|
//go:generate go run github.com/v2fly/v2ray-core/v4/common/errors/errorgen
|
|
|
|
|
|
|
|
type LoaderImplementation interface {
|
2021-09-07 04:13:58 -04:00
|
|
|
LoadSite(filename, list string) ([]*routercommon.Domain, error)
|
|
|
|
LoadIP(filename, country string) ([]*routercommon.CIDR, error)
|
2021-05-03 22:15:11 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
type Loader interface {
|
|
|
|
LoaderImplementation
|
2021-09-07 04:13:58 -04:00
|
|
|
LoadGeoSite(list string) ([]*routercommon.Domain, error)
|
|
|
|
LoadGeoSiteWithAttr(file string, siteWithAttr string) ([]*routercommon.Domain, error)
|
|
|
|
LoadGeoIP(country string) ([]*routercommon.CIDR, error)
|
2021-05-03 22:15:11 -04:00
|
|
|
}
|