https://github.com/sshaplygin/docs-code
Official documents codes validation and generation in Go
https://github.com/sshaplygin/docs-code
bik bik-codes documentation golang inn inn-codes kpp kpp-codes ogrn-codes ogrnip ogrnip-codes orgn snils snils-codes validator
Last synced: 15 days ago
JSON representation
Official documents codes validation and generation in Go
- Host: GitHub
- URL: https://github.com/sshaplygin/docs-code
- Owner: sshaplygin
- License: mit
- Created: 2020-02-27T12:10:56.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2024-01-07T21:08:19.000Z (almost 2 years ago)
- Last Synced: 2024-06-21T19:09:45.224Z (over 1 year ago)
- Topics: bik, bik-codes, documentation, golang, inn, inn-codes, kpp, kpp-codes, ogrn-codes, ogrnip, ogrnip-codes, orgn, snils, snils-codes, validator
- Language: Go
- Homepage:
- Size: 214 KB
- Stars: 4
- Watchers: 1
- Forks: 1
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# docs-code
[](https://godoc.org/github.com/sshaplygin/docs-code) [](https://raw.githack.com/wiki/sshaplygin/docs-code/coverage.html) [](https://github.com/sshaplygin/docs-code/blob/master/LICENSE) [](https://goreportcard.com/report/github.com/sshaplygin/docs-code)
It is validator about official of documents codes in Go
## Alert
It is not production ready public API! It is API could be change it the future. To be attentive for this.
## Status
Status of implementation by code package:
- [ ] OKATO
- [ ] Generate method
- [ ] Validate method
Full supported codes: BIK, INN, KPP, OGRN, OGRNIP, SNILS
## Usage
``` bash
go get github.com/sshaplygin/docs-code
```
### Example
```go
import (
"log"
"github.com/sshaplygin/docs-code"
)
...
isValid, err := docs_code.Validate(docs_code.INN, "526317984689")
if err != nil {
log.Error(err)
}
if !isValid {
log.Println("INN is invalid")
} else {
log.Println("INN is valid")
}
```
## Documentation
* Info about INN - [ИНН](https://ru.wikipedia.org/wiki/%D0%98%D0%B4%D0%B5%D0%BD%D1%82%D0%B8%D1%84%D0%B8%D0%BA%D0%B0%D1%86%D0%B8%D0%BE%D0%BD%D0%BD%D1%8B%D0%B9_%D0%BD%D0%BE%D0%BC%D0%B5%D1%80_%D0%BD%D0%B0%D0%BB%D0%BE%D0%B3%D0%BE%D0%BF%D0%BB%D0%B0%D1%82%D0%B5%D0%BB%D1%8C%D1%89%D0%B8%D0%BA%D0%B0)
* Info about SNILS - [СНИЛС](http://www.consultant.ru/document/cons_doc_LAW_124607/68ac3b2d1745f9cc7d4332b63c2818ca5d5d20d0/)
* Info about OGRN - [ОГРН](https://ru.wikipedia.org/wiki/%D0%9E%D1%81%D0%BD%D0%BE%D0%B2%D0%BD%D0%BE%D0%B9_%D0%B3%D0%BE%D1%81%D1%83%D0%B4%D0%B0%D1%80%D1%81%D1%82%D0%B2%D0%B5%D0%BD%D0%BD%D1%8B%D0%B9_%D1%80%D0%B5%D0%B3%D0%B8%D1%81%D1%82%D1%80%D0%B0%D1%86%D0%B8%D0%BE%D0%BD%D0%BD%D1%8B%D0%B9_%D0%BD%D0%BE%D0%BC%D0%B5%D1%80)
* Info about OGRNIP - [ОГРНИП](http://www.temabiz.com/terminy/chto-takoe-ogrnip.html)
* Info about BIK - [БИК](https://ru.wikipedia.org/wiki/%D0%91%D0%B0%D0%BD%D0%BA%D0%BE%D0%B2%D1%81%D0%BA%D0%B8%D0%B9_%D0%B8%D0%B4%D0%B5%D0%BD%D1%82%D0%B8%D1%84%D0%B8%D0%BA%D0%B0%D1%86%D0%B8%D0%BE%D0%BD%D0%BD%D1%8B%D0%B9_%D0%BA%D0%BE%D0%B4)
* Info about KPP - [КПП](https://dic.academic.ru/dic.nsf/ruwiki/239834)