No description
Find a file
Winni Neessen 2e46246391
Update hibp.go
Switch version number back to v1.x.x since I really don't want to mess with Go's v2 mechanic (some Go tools are not v2 aware and therefore we would need to branch the new version to a v2 branch or subdir, which I really don't wanna do). This breaks with semver semantics, but it is, what it is.
2025-02-27 16:30:11 +01:00
.github Remove SonarQube review and test steps from CI workflow 2025-02-27 12:28:34 +01:00
LICENSES Add BSD-3-Clause and MIT license files 2025-02-21 13:48:45 +01:00
md4 Add and update SPDX license headers across all files 2025-02-21 13:34:56 +01:00
testdata Add test data for subscription and paste scenarios 2025-02-27 12:10:03 +01:00
.gitignore Update .gitignore to exclude breach-domain.sh 2025-02-26 11:57:32 +01:00
.golangci.toml Implement a golangci-lint workflow and the accordingly GH action 2022-10-29 15:32:12 +02:00
breach.go Ensure API key validation in all HIBP API calls 2025-02-27 13:27:31 +01:00
breach_test.go Add tests for API key requirement in breach API methods 2025-02-27 13:35:19 +01:00
codecov.yml Set Codecov to ignore the "md4/" directory 2025-02-27 12:08:27 +01:00
go.mod Refactor to use niljson for nullable JSON fields 2025-02-26 16:13:04 +01:00
go.sum Refactor to use niljson for nullable JSON fields 2025-02-26 16:13:04 +01:00
go.sum.license Refactor to use niljson for nullable JSON fields 2025-02-26 16:13:04 +01:00
hibp.go Update hibp.go 2025-02-27 16:30:11 +01:00
hibp_test.go Add tests for SubscriptionAPI Status method 2025-02-27 12:14:28 +01:00
json.go Use error wrapping with %w in JSON parsing error messages 2025-02-27 12:10:53 +01:00
json_test.go Add unit tests for APIDate JSON unmarshaling 2025-02-26 16:54:41 +01:00
LICENSE Initial commit 2021-09-19 17:58:02 +02:00
password.go Add API documentation references to password methods 2025-02-27 13:07:19 +01:00
password_test.go Refactor Match to replace pointers with value semantics. 2025-02-27 12:57:49 +01:00
paste.go Add API key requirement note for PastedAccount method 2025-02-27 13:09:47 +01:00
paste_test.go Add test cases for rate limit handling in pasted account API 2025-02-27 12:09:51 +01:00
README.md Update README.md to reflect dependency changes and fix typos 2025-02-27 10:41:55 +01:00
REUSE.toml Add REUSE compliance configuration file 2025-02-26 16:13:28 +01:00
sonar-project.properties Set Go coverage report path in Sonar configuration 2025-02-21 15:58:23 +01:00
subscription.go Ensure API key validation in all HIBP API calls 2025-02-27 13:27:31 +01:00
subscription_test.go Add test case for subscription status without API key 2025-02-27 13:31:49 +01:00

go-hibp - Simple Go binding to the "Have I Been Pwned" API

GoDoc Go Report Card Build Status codecov Mentioned in Awesome Go buy ma a coffee

This Go library provides simple bindings to the excellent "Have I Been Pwned" (HIBP) API by Troy Hunt. It implements all 3 APIs that are provided by HIBP (Breaches, Pastes, Passwords). API key support for the private API endpoints are supported as well. go-hibp follows idiomatic Go style and best practice. It's only depends on the Go standard library and one of my other packages: niljson.

Usage

The library is fully documented using the excellent GoDoc functionality. Check out the GoDocs Reference for details on how to implement access to any of the 3 APIs with this package. You will also find GoDoc code examples there for each of those APIs.