identity

package
v0.0.1-beta.5 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package identity is a collection of functions and objects that interacts with GLAIR Vision identity verification API and its results

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BasicIdentityVerification

type BasicIdentityVerification struct {
	Nik              bool  `json:"nik"`
	Name             *bool `json:"name,omitempty"`
	DateOfBirth      *bool `json:"date_of_birth,omitempty"`
	NoKk             *bool `json:"no_kk,omitempty"`
	MotherMaidenName *bool `json:"mother_maiden_name,omitempty"`
	PlaceOfBirth     *bool `json:"place_of_birth,omitempty"`
	Address          *bool `json:"address,omitempty"`
	Gender           *bool `json:"gender,omitempty"`
	MaritalStatus    *bool `json:"marital_status,omitempty"`
	JobType          *bool `json:"job_type,omitempty"`
	Province         *bool `json:"province,omitempty"`
	City             *bool `json:"city,omitempty"`
	District         *bool `json:"district,omitempty"`
	Subdistrict      *bool `json:"subdistrict,omitempty"`
	Rt               *bool `json:"rt,omitempty"`
	Rw               *bool `json:"rw,omitempty"`
}

type BasicIdentityVerificationResult

type BasicIdentityVerificationResult = IdentityVerificationResult[BasicIdentityVerification]

BasicIdentityVerificationResult represents basic identity verification result from GLAIR Vision API of the given NIK

type FaceIdentityVerification

type FaceIdentityVerification struct {
	Nik                 bool    `json:"nik,omitempty"`
	Name                bool    `json:"name,omitempty"`
	DateOfBirth         bool    `json:"date_of_birth,omitempty"`
	FaceImagePercentage float64 `json:"face_image_percentage,omitempty"`
}

type FaceIdentityVerificationResult

type FaceIdentityVerificationResult = IdentityVerificationResult[FaceIdentityVerification]

FaceIdentityVerificationResult represents face identity verification result from GLAIR Vision API of the given face data and NIK

type Identity

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

Identity provides functions to interact with GLAIR Vision identity verification API

func New

func New(config *glair.Config) *Identity

New creates a GLAIR Vision identity verification API client with the given config

func (*Identity) BasicVerification

func (identity *Identity) BasicVerification(
	ctx context.Context,
	input glair.BasicVerificationInput,
) (BasicIdentityVerificationResult, error)

BasicVerification performs KTP data verification to Dukcapil database from the given NIK

API Docs: https://docs.glair.ai/vision/identity-verification

func (*Identity) FaceVerification

func (identity *Identity) FaceVerification(
	ctx context.Context,
	input glair.FaceVerificationInput,
) (FaceIdentityVerificationResult, error)

FaceVerification performs KTP data verification to Dukcapil database from the given NIK

API Docs: https://docs.glair.ai/vision/identity-face-verification

type IdentityVerificationResult

type IdentityVerificationResult[T any] struct {
	VerificationStatus string `json:"verification_result,omitempty"`
	Reason             string `json:"reason,omitempty"`
	Result             T      `json:"result"`
}

IdentityVerificationResult is a wrapper object for identity verification result

Jump to

Keyboard shortcuts

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