Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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: about 2 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 (over 1 year ago)
- Default Branch: master
- Last Pushed: 2023-06-13T17:42:20.000Z (over 1 year ago)
- Last Synced: 2024-01-27T12:09:50.658Z (11 months ago)
- Topics: biometrics, golang, kyc-service, nadra, verification, wrapper
- Language: Go
- Homepage:
- Size: 20.5 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[![Tests](https://github.com/IamFaizanKhalid/nishan-go/actions/workflows/test.yml/badge.svg)](https://github.com/IamFaizanKhalid/nishan-go/actions/workflows/test.yml) [![Go Report Card](https://goreportcard.com/badge/github.com/IamFaizanKhalid/nishan-go)](https://goreportcard.com/report/github.com/IamFaizanKhalid/nishan-go) [![Release](https://img.shields.io/github/v/release/IamFaizanKhalid/nishan-go.svg?style=flat-square)](https://github.com/IamFaizanKhalid/nishan-go/releases) [![License](https://img.shields.io/badge/license-MIT-blue.svg)](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)