russian_license_plate_validator

package module
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

README

Russian license plate validator

Go Reference Go Report Card Golang checks

Package for validate Russian license plate. Supports cars, motorcycles, trailers

go get github.com/nar10z/russian-license-plate-validator

License

MIT

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLicense = errors.New("invalid license")
)

Functions

func ValidateLicense

func ValidateLicense(license string) bool

func ValidateLicenseByType

func ValidateLicenseByType(license string, t Type) bool

Types

type License

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

func NewLicense

func NewLicense(license string) (License, error)

func (License) IsAuto

func (l License) IsAuto() bool

func (License) IsMotorcycle

func (l License) IsMotorcycle() bool

func (License) IsScooter

func (l License) IsScooter() bool

func (License) IsTrailer

func (l License) IsTrailer() bool

func (License) LicenseType

func (l License) LicenseType() Type

func (License) Original

func (l License) Original() string

func (License) RegionCode

func (l License) RegionCode() string

func (License) RegisterNumber

func (l License) RegisterNumber() string

func (License) Series

func (l License) Series() string

type Type

type Type int
const (
	Auto Type = iota
	Trailer
	Motorcycle
	Scooter
)

Jump to

Keyboard shortcuts

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