geodataproto.go 583 B

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