Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Validator ¶
type Validator struct { }
Validator is a utility that verifies and updates node attributes associated with its geographical location (LOCODE).
For correct operation, the Validator must be created using the constructor (New) based on the required parameters and optional components. After successful creation, the Validator is immediately ready to work through API.
func New ¶
func New() *Validator
New creates a new instance of the Validator.
The created Validator does not require additional initialization and is completely ready for work.
func (*Validator) Verify ¶ added in v0.39.0
Verify validates UN-LOCODE attribute of n and adds a group of related attributes.
If n contains at least one of the LOCODE-derived attributes, an error is returned.
If n contains UN-LOCODE attribute and its value does not match the UN/LOCODE format, an error is returned.