geodataproto.go 535 B

1234567891011121314151617
  1. package geodata
  2. import "github.com/v2fly/v2ray-core/v4/app/router"
  3. //go:generate go run github.com/v2fly/v2ray-core/v4/common/errors/errorgen
  4. type LoaderImplementation interface {
  5. LoadSite(filename, list string) ([]*router.Domain, error)
  6. LoadIP(filename, country string) ([]*router.CIDR, error)
  7. }
  8. type Loader interface {
  9. LoaderImplementation
  10. LoadGeoSite(list string) ([]*router.Domain, error)
  11. LoadGeoSiteWithAttr(file string, siteWithAttr string) ([]*router.Domain, error)
  12. LoadGeoIP(country string) ([]*router.CIDR, error)
  13. }