package infrastructure

import "github.com/go-arrower/arrower/contexts/auth/internal/infrastructure"

Index

Variables

var (
	ErrInvalidIP     = errors.New("invalid ip address")
	ErrResolveFailed = errors.New("resolving ip failed")
)

Types

type IP2Location

type IP2Location struct {
	// contains filtered or unexported fields
}

func NewIP2LocationService

func NewIP2LocationService(dbPath string) *IP2Location

NewIP2LocationService returns a Service that can resolve ip addresses to a country, region, and city.

This site or product includes IP2Location LITE data available from <a href="https://lite.ip2location.com">https://lite.ip2location.com</a>.

func (*IP2Location) ResolveIP

func (s *IP2Location) ResolveIP(ip string) (domain.ResolvedIP, error)

Source Files

ip2location.go

Version
v0.0.0-20250311203644-ab26c1152cb4 (latest)
Published
Mar 11, 2025
Platform
linux/amd64
Imports
7 packages
Last checked
1 week ago

Tools for package owners.