https://github.com/iamfaizankhalid/nishan-go
Golang wrapper for NADRA's Nishan APIs
https://github.com/iamfaizankhalid/nishan-go
biometrics golang kyc-service nadra verification wrapper
Last synced: 3 months ago
JSON representation
Golang wrapper for NADRA's Nishan APIs
- Host: GitHub
- URL: https://github.com/iamfaizankhalid/nishan-go
- Owner: IamFaizanKhalid
- License: mit
- Created: 2023-06-11T13:32:19.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2023-06-13T17:42:20.000Z (about 2 years ago)
- Last Synced: 2025-01-18T01:10:02.387Z (5 months ago)
- Topics: biometrics, golang, kyc-service, nadra, verification, wrapper
- Language: Go
- Homepage:
- Size: 20.5 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://github.com/IamFaizanKhalid/nishan-go/actions/workflows/test.yml) [](https://goreportcard.com/report/github.com/IamFaizanKhalid/nishan-go) [](https://github.com/IamFaizanKhalid/nishan-go/releases) [](https://github.com/IamFaizanKhalid/nishan-go/blob/master/LICENSE)
Golang wrapper for [NADRA's Nishan](https://nishan.nadra.gov.pk/) APIs.
## Installation
```console
go get -u github.com/IamFaizanKhalid/nishan-go
```## Usage Example
```go
package mainimport (
"fmt"
"github.com/IamFaizanKhalid/nishan-go"
"github.com/IamFaizanKhalid/nishan-go/errors"
)func main() {
api, err := nishan.NewClient("your_company", "your_api_key")
if err != nil {
panic(err)
}response := api.KnowYourCustomer(nishan.Request{
CitizenNo: "1234567890124",
Fingerprint: "/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAA...",
FingerIndex: 6,
})if response.ErrCode != errors.Nil {
switch response.ErrCode {
case errors.FingerprintMismatch:
panic("fingerprint didn't match")
case errors.FingerIndexUnavailable:
panic(fmt.Sprintf("data available only for following finger indexes: %v", response.FingerList))
default:
panic(response.ErrMessage)
}
}fmt.Printf("Welcome %s %s!", response.PersonalData.Name, response.PersonalData.FatherName)
}
```## Reference
- [API Docs](https://nishan.nadra.gov.pk/tech-stack)## License
© 2023-time.Now() Faizan Khalid
Released under the [MIT License](https://github.com/IamFaizanKhalid/nishan-go/blob/master/LICENSE)