identitycheck

package module
v0.0.0-...-d4ff386 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

README

KYC/AML check

Build

The package provides a level of know your customer service for banking and other financial services.

Note: They may have some missing records. The source file will be populated from time to time. The current PEP and sanctions entry count is 178866.

Install

To start using identity check, install Go 1.16 or above. This package need Go modules to install. Run the following command to retrieve the library.

$ go get github.com/trk54ylmz/identitycheck/v0.2

Usage

The package needs name for filtering out results.

ic, err := identitycheck.NewIdentityCheck()

name := "Barack Obama"

results, err := ic.Check(name)

Result objects are JSON serializable, example output will be like,

[
    {
        "hash": "BRKBM",
        "name": "Barack Obama",
        "type": "pep",
        "birth_day": 4,
        "birth_month": 8,
        "birth_year": 1961,
        "alias": [
            "باراك أوباما",
            "Барак Обама",
            "Барак Абама",
            "贝拉克·奥巴马",
            "Baracus Obama",
            "ബറാക്ക് ഒബാമ",
            "Барақ Обама",
            "ባራክ ኦባማ"
        ],
        "birth_date": "1961-08-04T00:00:00Z",
        "country": {
            "code": "US",
            "iso": "USA",
            "name": "United States of America"
        }
    }
]

Stats

You can see below the entry count by top 30 countries,

Documentation

Index

Constants

View Source
const (
	PEP      = "pep"
	SANCTION = "sanction"
	UNKNOWN  = "unknown"
)

Person entry type

Variables

This section is empty.

Functions

This section is empty.

Types

type Country

type Country struct {
	Code string `json:"code"`
	Iso  string `json:"iso"`
	Name string `json:"name"`
}

Country is person country detail

func NewCountry

func NewCountry(name string) (*Country, error)

NewCountry creates country by given name

type IdentityCheck

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

IdentityCheck provides base checking

func NewIdentityCheck

func NewIdentityCheck() (*IdentityCheck, error)

NewIdentityCheck creates new pep and sanction check

func (*IdentityCheck) Check

func (i *IdentityCheck) Check(name string) (*[]Person, error)

Check finds given person from PEP and sanctions lists

type Person

type Person struct {
	Hash       string     `json:"hash"`
	Name       string     `json:"name"`
	Type       string     `json:"type"`
	BirthDay   *int       `json:"birth_day"`
	BirthMonth *int       `json:"birth_month"`
	BirthYear  *int       `json:"birth_year"`
	Alias      *[]string  `json:"alias"`
	BirthDate  *time.Time `json:"birth_date"`
	Country    *Country   `json:"country"`
}

Person contains name, birth detail, country and entry type

Jump to

Keyboard shortcuts

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