Documentation
¶
Overview ¶
Package registration normalises aircraft registrations to the canonical notation of their state of registry, looked up in the nationality mark table in prefixes.go.
A registration is only rewritten when its nationality mark is recognised and the remainder matches the shape that state issues. Anything else is returned uppercased and trimmed, otherwise unchanged.
Design and maintenance: docs/AIRCRAFT_REGISTRATIONS.md.
Index ¶
Constants ¶
const LastReviewed = "2026-08-17"
LastReviewed is the date this table was last checked against upstream, reported via GET /admin/config.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Entry ¶
type Entry struct {
// Prefix is the nationality mark itself, uppercase and without a
// separator: "D", "N", "9XR", "RDPL".
Prefix string
// Country is the ISO 3166-1 alpha-2 code of the state of registry.
Country string
// CountryName is the English name of the state of registry.
CountryName string
// NoHyphen marks states that write the two marks without a separator.
// The zero value is hyphenated.
NoHyphen bool
// Suffix constrains the registration mark; empty means defaultSuffix.
Suffix string
// contains filtered or unexported fields
}
Entry is one state's nationality mark.
func Entries ¶
func Entries() []Entry
Entries returns a copy of the nationality mark table, longest mark first.
func (Entry) Hyphenated ¶
Hyphenated reports whether this state's canonical notation separates the nationality mark from the registration mark with a hyphen.
type Result ¶
type Result struct {
// Value is the normalised registration: always uppercase and trimmed,
// and rewritten into canonical notation when Matched is true.
Value string
// Entry is the matched nationality mark, zero when Matched is false.
Entry Entry
// Matched reports whether a nationality mark was recognised and the
// registration mark had the shape that state issues.
Matched bool
}
Result is the outcome of normalising one registration.