Documentation ¶
Index ¶
- type DBType
- type DumpFormat
- type GeoIpService
- func (s *GeoIpService) City(ctx context.Context, address string, includeISP bool) (*entity.City, error)
- func (s *GeoIpService) CityLite(ctx context.Context, address string, lang string) (*entity.CityLite, error)
- func (s *GeoIpService) Country(ctx context.Context, address string) (*entity.Country, error)
- func (r *GeoIpService) Database(ctx context.Context, dbType DBType, format DumpFormat) (*entity.Database, error)
- func (r *GeoIpService) MetaData(ctx context.Context, dbType DBType) (*entity.MetaData, error)
- type GeoNameRepository
- type GeoNameService
- func (s *GeoNameService) Cities(ctx context.Context, filter entity.GeoNameFilter) ([]*entity.GeoName, error)
- func (s *GeoNameService) Continents(ctx context.Context) []*entity.GeoNameContinent
- func (s *GeoNameService) Countries(ctx context.Context, filter entity.GeoNameFilter) ([]*entity.GeoNameCountry, error)
- func (s *GeoNameService) Dump(ctx context.Context, format DumpFormat) ([]byte, error)
- func (s *GeoNameService) Subdivisions(ctx context.Context, filter entity.GeoNameFilter) ([]*entity.GeoNameAdminSubdivision, error)
- type GeoRepository
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DBType ¶
type DBType = repository.MaxmindDBType
type DumpFormat ¶
type DumpFormat = repository.DumpFormat
type GeoIpService ¶
type GeoIpService struct {
// contains filtered or unexported fields
}
func NewGeoIpService ¶
func NewGeoIpService(rep GeoRepository) *GeoIpService
func (*GeoIpService) Database ¶
func (r *GeoIpService) Database(ctx context.Context, dbType DBType, format DumpFormat) (*entity.Database, error)
type GeoNameRepository ¶
type GeoNameRepository interface { Continents(ctx context.Context) []*entity.GeoNameContinent Countries(ctx context.Context, filter entity.GeoNameFilter) ([]*entity.GeoNameCountry, error) Subdivisions(ctx context.Context, filter entity.GeoNameFilter) ([]*entity.GeoNameAdminSubdivision, error) Cities(ctx context.Context, filter entity.GeoNameFilter) ([]*entity.GeoName, error) Dump(ctx context.Context, format DumpFormat) ([]byte, error) }
type GeoNameService ¶
type GeoNameService struct {
GeoNameRepository
}
func NewGeoNameService ¶
func NewGeoNameService(rep GeoNameRepository) *GeoNameService
func (*GeoNameService) Cities ¶
func (s *GeoNameService) Cities(ctx context.Context, filter entity.GeoNameFilter) ([]*entity.GeoName, error)
func (*GeoNameService) Continents ¶
func (s *GeoNameService) Continents(ctx context.Context) []*entity.GeoNameContinent
func (*GeoNameService) Countries ¶
func (s *GeoNameService) Countries(ctx context.Context, filter entity.GeoNameFilter) ([]*entity.GeoNameCountry, error)
func (*GeoNameService) Dump ¶
func (s *GeoNameService) Dump(ctx context.Context, format DumpFormat) ([]byte, error)
func (*GeoNameService) Subdivisions ¶
func (s *GeoNameService) Subdivisions(ctx context.Context, filter entity.GeoNameFilter) ([]*entity.GeoNameAdminSubdivision, error)
type GeoRepository ¶
type GeoRepository interface { Country(ctx context.Context, ip net.IP) (*entity.Country, error) City(ctx context.Context, ip net.IP, includeISP bool) (*entity.City, error) CityLite(ctx context.Context, ip net.IP, lang string) (*entity.CityLite, error) MetaData(ctx context.Context, dbType DBType) (*entity.MetaData, error) Database(ctx context.Context, dbType DBType, format DumpFormat) (*entity.Database, error) }
Click to show internal directories.
Click to hide internal directories.