Documentation
¶
Overview ¶
Package iana provides a lookup table of IANA service name assignments built from the official service-names-port-numbers CSV registry.
No data is bundled in the binary. On first use LoadEffective auto-downloads the CSV from the configured URL and caches it in the user config directory. Subsequent calls load from the cache. Manual refresh is available via Sync or the config TUI sync button.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LastSyncTime ¶
LastSyncTime returns the modification time of the user cache file and whether the cache exists at all.
Types ¶
type DB ¶
type DB map[portKey]Entry
DB is a loaded IANA registry keyed by (port, protocol).
func LoadEffective ¶
LoadEffective loads the IANA registry from the user cache when it exists. If the cache is absent or corrupt it auto-downloads a fresh copy from url and caches it before returning. On download failure it returns an empty DB and a non-nil error so callers can degrade gracefully (ports show as N/tcp).
type Entry ¶
type Entry struct {
ServiceName string
PortNumber string // stored as string to preserve original value
TransportProtocol string
Description string
Assignee string
Contact string
RegistrationDate string
ModificationDate string
Reference string
ServiceCode string
AssignmentNotes string
}
Entry is a single IANA port assignment with all registry columns preserved. Field names match the official CSV header so callers can write them verbatim.