tcverify

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

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

Go to latest
Published: Mar 12, 2018 License: MIT Imports: 8 Imported by: 0

README

TC Kimlik Numarası Kontrolü ve Doğrulaması

Golang kullanılarak TC kontrolü ve doğrulama işlemini yapmayı sağlayan bir pakettir.

Kurulum

    go get github.com/barisesen/tcverify 

Kullanım

Algoritmik olarak kontrol etmek
    package main

    import (
        "fmt"
        "github.com/barisesen/tcverify"
    )

    func main() {
        resp, err := tcverify.Validate("xxxxxxxxxxx")
        fmt.Println(resp, err)
        // true <nil>
        // false xxxxxxxxxxx tc numarası algoritmik olarak doğrulanamadı.
    }

TC kimlik numarası algoritmik doğrulama için Hakan Ersu'nun oluşturduğu tcvalidate paketi kullanılmıştır.


Api desteği ile doğrulama
     package main

    import (
        "fmt"
        "github.com/barisesen/tcverify"
    )

    func main() {
        tc := "xxxxxxxxxxx"
        isim := "BARIŞ"
        soyisim := "ESEN"
        dogumTarihi := "1996"

        resp, err := tcverify.Check(tc, isim, soyisim, dogumTarihi)
        fmt.Println(resp, err)
        // true <nil>
        // false Bu bilgileri ait vatandaşlık doğrulanamadı.
    }   

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Check

func Check(ID string, name string, surname string, birthYear string) (bool, error)

func Validate

func Validate(ID string) (bool, error)

Types

type Response

type Response struct {
	TCKimlikNoDogrulaResult string `xml:"Body>TCKimlikNoDogrulaResponse>TCKimlikNoDogrulaResult"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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