brgeo

module
v0.0.0-...-0366eca Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 2, 2024 License: MIT

README ΒΆ

brgeo: Facade for KeyCDN Geolocation

tag Go Version GoDoc Build Status Go report Coverage Contributors License

πŸš€ Install

go get github.com/jvanrhyn/brgeo

Compatibility: go >= 1.21

πŸ’‘ Usage

Description

A simple facade library to wrap access to external IP Address geo-location information. Currently, it supports the following services: KeyCDN: https://tools.keycdn.com/geo

Third party endpoint results is mapped to a well-known model, so you can easily switch between services.

type LookupResponse struct {
	City        string `json:"city"`
	RegionName  string `json:"region"`
	CountryName string `json:"country"`
}

Query results are cached using the github.com/patrickmn/go-cache library.

🀝 Contributing

Don't hesitate ;)

# Install some dev dependencies
make tools

# Run tests
make test
# or
make watch-test

πŸ‘€ Contributors

Contributors

πŸ’« Show your support

Give a ⭐️ if this project helped you!

GitHub Sponsors

πŸ“ License

Copyright Β© 2023 Johan van Rhyn.

This project is MIT licensed.

Directories ΒΆ

Path Synopsis
cmd
cli
internal
api
Package api provides functions to get the environment file path.
Package api provides functions to get the environment file path.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL