Documentation
¶
Overview ¶
templ: version: v0.3.1001
templ: version: v0.3.1001
templ: version: v0.3.1001
templ: version: v0.3.1001
templ: version: v0.3.1001
templ: version: v0.3.1001
templ: version: v0.3.1001
templ: version: v0.3.1001
templ: version: v0.3.1001
templ: version: v0.3.1001
templ: version: v0.3.1001
templ: version: v0.3.1001
templ: version: v0.3.1001
templ: version: v0.3.1001
templ: version: v0.3.1001
templ: version: v0.3.1001
templ: version: v0.3.1001
Index ¶
- func AboutPage(freshness DataFreshness, privacy PrivacySync) templ.Component
- func Breadcrumb(typePlural string, entityName string) templ.Component
- func CampusDetailPage(data CampusDetail) templ.Component
- func CampusFacilitiesList(rows []CampusFacilityRow) templ.Component
- func CarrierDetailPage(data CarrierDetail) templ.Component
- func CarrierFacilitiesList(rows []CarrierFacilityRow) templ.Component
- func CollapsibleSection(title string, count int, loadURL string) templ.Component
- func CollapsibleSectionWithBandwidth(title string, count int, bandwidth string, loadURL string) templ.Component
- func CompareFormPage(asn1 string, asn2 string) templ.Component
- func CompareResultsPage(data CompareData) templ.Component
- func CopyableIP(label string, addr string) templ.Component
- func CountryFlag(code string) templ.Component
- func DetailField(label string, value string) templ.Component
- func DetailHeader(typeBadge string, accentColor string, name string, subtitle string) templ.Component
- func DetailLink(label string, url string) templ.Component
- func FacCarriersList(rows []FacCarrierRow) templ.Component
- func FacIXPsList(rows []FacIXRow) templ.Component
- func FacNetworksList(rows []FacNetworkRow) templ.Component
- func FacilityDetailPage(data FacilityDetail) templ.Component
- func Footer() templ.Component
- func Home(query string, groups []SearchGroup) templ.Component
- func IXDetailPage(data IXDetail) templ.Component
- func IXFacilitiesList(rows []IXFacilityRow) templ.Component
- func IXParticipantsList(rows []IXParticipantRow) templ.Component
- func IXPrefixesList(rows []IXPrefixRow) templ.Component
- func Layout(title string, contents templ.Component) templ.Component
- func MapContainer(id string, markers []MapMarker, zoom int) templ.Component
- func MultiPinMapContainer(id string, markers []MapMarker, ariaLabel string, showLegend bool, ...) templ.Component
- func Nav() templ.Component
- func NetworkContactsList(rows []ContactRow) templ.Component
- func NetworkDetailPage(data NetworkDetail) templ.Component
- func NetworkFacilitiesList(rows []NetworkFacRow) templ.Component
- func NetworkIXLansList(rows []NetworkIXLanRow) templ.Component
- func NotFoundPage() templ.Component
- func OrgCampusesList(rows []OrgCampusRow) templ.Component
- func OrgCarriersList(rows []OrgCarrierRow) templ.Component
- func OrgDetailPage(data OrgDetail) templ.Component
- func OrgFacilitiesList(rows []OrgFacilityRow) templ.Component
- func OrgIXPsList(rows []OrgIXRow) templ.Component
- func OrgNetworksList(rows []OrgNetworkRow) templ.Component
- func SearchForm(query string, groups []SearchGroup) templ.Component
- func SearchResults(groups []SearchGroup) templ.Component
- func ServerErrorPage() templ.Component
- func StatBadge(label string, count int) templ.Component
- func SyncingPage() templ.Component
- type AboutPageData
- type CampusDetail
- type CampusFacilityRow
- type CarrierDetail
- type CarrierFacilityRow
- type CompareCampus
- type CompareCampusFacility
- type CompareData
- type CompareFacPresence
- type CompareFacility
- type CompareIXP
- type CompareIXPresence
- type CompareNetwork
- type ContactRow
- type DataFreshness
- type FacCarrierRow
- type FacIXRow
- type FacNetworkRow
- type FacilityDetail
- type IXDetail
- type IXFacilityRow
- type IXParticipantRow
- type IXPrefixRow
- type MapMarker
- type NetworkDetail
- type NetworkFacRow
- type NetworkIXLanRow
- type OrgCampusRow
- type OrgCarrierRow
- type OrgDetail
- type OrgFacilityRow
- type OrgIXRow
- type OrgNetworkRow
- type PrivacySync
- type SearchGroup
- type SearchResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AboutPage ¶
func AboutPage(freshness DataFreshness, privacy PrivacySync) templ.Component
AboutPage renders the about page with project information, data freshness, and the Phase 61 OBS-02 Privacy & Sync section (D-04/D-05/D-06).
func Breadcrumb ¶ added in v1.9.0
Breadcrumb renders navigation breadcrumbs: Home > TypePlural > EntityName. typePlural is the display name for the entity type (e.g., "Networks"). entityName is the specific entity being viewed.
func CampusDetailPage ¶
func CampusDetailPage(data CampusDetail) templ.Component
CampusDetailPage renders the full campus detail page with header, stats, detail fields, and a collapsible lazy-loaded section for facilities.
func CampusFacilitiesList ¶
func CampusFacilitiesList(rows []CampusFacilityRow) templ.Component
CampusFacilitiesList renders the list of campus facilities as a 3-column sortable table (Name, City, Country+flag) linking to the respective facility detail page.
func CarrierDetailPage ¶
func CarrierDetailPage(data CarrierDetail) templ.Component
CarrierDetailPage renders the full carrier detail page with header, stats, detail fields, and a collapsible lazy-loaded section for facilities.
func CarrierFacilitiesList ¶
func CarrierFacilitiesList(rows []CarrierFacilityRow) templ.Component
CarrierFacilitiesList renders the list of carrier facilities as a single-column name-only table linking to the respective facility detail page.
func CollapsibleSection ¶
CollapsibleSection renders a collapsible details/summary element with htmx lazy loading on first expand. If count is 0, the section is not expandable and shows a static "None" message.
func CollapsibleSectionWithBandwidth ¶ added in v1.7.0
func CollapsibleSectionWithBandwidth(title string, count int, bandwidth string, loadURL string) templ.Component
CollapsibleSectionWithBandwidth renders a collapsible details/summary element with htmx lazy loading and aggregate bandwidth display in the header. If bandwidth is empty, it behaves like CollapsibleSection.
func CompareFormPage ¶
CompareFormPage renders the comparison form with optional pre-filled ASN values. asn1 and asn2 are pre-filled when navigating from a network detail page.
func CompareResultsPage ¶
func CompareResultsPage(data CompareData) templ.Component
CompareResultsPage renders the full comparison results between two networks.
func CopyableIP ¶ added in v1.7.0
CopyableIP renders an IP address with click-to-copy and a hover clipboard icon.
func CountryFlag ¶ added in v1.11.0
CountryFlag renders a country flag icon with the country code text. Uses flag-icons CSS classes. If code is empty, renders nothing (D-16).
func DetailField ¶
DetailField renders a label:value pair. Only renders if value is non-empty.
func DetailHeader ¶
func DetailHeader(typeBadge string, accentColor string, name string, subtitle string) templ.Component
DetailHeader renders the page header with type badge, entity name, and subtitle. The accentColor should match the search palette: emerald=net, sky=ix, violet=fac, amber=org, rose=campus, cyan=carrier.
func DetailLink ¶
DetailLink renders a clickable URL field. Only renders if url is non-empty.
func FacCarriersList ¶
func FacCarriersList(rows []FacCarrierRow) templ.Component
FacCarriersList renders facility carriers as a single-column name-only table. Pre-sorted alphabetically server-side, no sort UI.
func FacIXPsList ¶
FacIXPsList renders facility IXPs as a single-column name-only table. Pre-sorted alphabetically server-side, no sort UI.
func FacNetworksList ¶
func FacNetworksList(rows []FacNetworkRow) templ.Component
FacNetworksList renders facility networks as a 3-column sortable table with Name, ASN, and Country+flag columns.
func FacilityDetailPage ¶
func FacilityDetailPage(data FacilityDetail) templ.Component
FacilityDetailPage renders the full facility detail page with header, stats, detail fields, and collapsible lazy-loaded sections for related records.
func Home ¶
func Home(query string, groups []SearchGroup) templ.Component
Home renders the homepage with search form and API quick links. query is pre-filled on direct navigation (bookmarked URLs). groups contains pre-computed search results for bookmarked URL support.
func IXDetailPage ¶
IXDetailPage renders the full IXP detail page with header, stats, detail fields, and collapsible lazy-loaded sections for related records.
func IXFacilitiesList ¶
func IXFacilitiesList(rows []IXFacilityRow) templ.Component
IXFacilitiesList renders IX facilities as a 3-column sortable table with Name, City, and Country+flag columns.
func IXParticipantsList ¶
func IXParticipantsList(rows []IXParticipantRow) templ.Component
IXParticipantsList renders IX participants as a 6-column sortable table with Name, ASN, Speed, IPv4, IPv6, and RS columns.
func IXPrefixesList ¶
func IXPrefixesList(rows []IXPrefixRow) templ.Component
IXPrefixesList renders IX prefixes as a 3-column sortable table with Prefix, Protocol, and DFZ columns.
func MapContainer ¶ added in v1.11.0
MapContainer renders a map container div and initializes a Leaflet map with the provided markers. For Phase 44, exactly one marker is expected. Phase 45 will extend this to handle multiple markers with fitBounds.
func MultiPinMapContainer ¶ added in v1.11.0
func MultiPinMapContainer(id string, markers []MapMarker, ariaLabel string, showLegend bool, legendLabels map[string]string) templ.Component
MultiPinMapContainer renders a taller map container with clustered circleMarkers. If no markers have valid coordinates, nothing is rendered (D-10). When some markers lack coordinates, an unmapped count message is shown below the map (D-11).
func NetworkContactsList ¶
func NetworkContactsList(rows []ContactRow) templ.Component
NetworkContactsList renders network contacts as a 4-column sortable table with Name, Role, Email, and Phone columns.
func NetworkDetailPage ¶
func NetworkDetailPage(data NetworkDetail) templ.Component
NetworkDetailPage renders the full network detail page with header, stats, detail fields, and collapsible lazy-loaded sections for related records.
func NetworkFacilitiesList ¶
func NetworkFacilitiesList(rows []NetworkFacRow) templ.Component
NetworkFacilitiesList renders network facility presences as a 3-column sortable table with Name, City, and Country+flag columns.
func NetworkIXLansList ¶
func NetworkIXLansList(rows []NetworkIXLanRow) templ.Component
NetworkIXLansList renders network IX presences as a 5-column sortable table with IX Name, Speed, IPv4, IPv6, and RS columns.
func NotFoundPage ¶
NotFoundPage renders a styled 404 page with an embedded search box.
func OrgCampusesList ¶
func OrgCampusesList(rows []OrgCampusRow) templ.Component
OrgCampusesList renders the list of org campuses as a single-column name-only table linking to the respective campus detail page.
func OrgCarriersList ¶
func OrgCarriersList(rows []OrgCarrierRow) templ.Component
OrgCarriersList renders the list of org carriers as a single-column name-only table linking to the respective carrier detail page.
func OrgDetailPage ¶
OrgDetailPage renders the full organization detail page with header, stats, detail fields, and collapsible lazy-loaded sections for related records.
func OrgFacilitiesList ¶
func OrgFacilitiesList(rows []OrgFacilityRow) templ.Component
OrgFacilitiesList renders the list of org facilities as a 3-column sortable table (Name, City, Country+flag) linking to the respective facility detail page.
func OrgIXPsList ¶
OrgIXPsList renders the list of org IXPs as a single-column name-only table linking to the respective IX detail page.
func OrgNetworksList ¶
func OrgNetworksList(rows []OrgNetworkRow) templ.Component
OrgNetworksList renders the list of org networks as a 2-column sortable table (Name, ASN) linking to the respective network detail page by ASN.
func SearchForm ¶
func SearchForm(query string, groups []SearchGroup) templ.Component
SearchForm renders the search input with htmx attributes and results container. query is pre-filled on direct navigation; groups are pre-rendered for bookmarked URLs.
func SearchResults ¶
func SearchResults(groups []SearchGroup) templ.Component
SearchResults renders grouped search results with per-type colored badges, count badges, and compact single-line result rows with inline metadata. Returns empty output when groups is nil or empty.
func ServerErrorPage ¶
ServerErrorPage renders a styled 500 page with a link back to the homepage.
func SyncingPage ¶
SyncingPage renders a standalone page shown by readiness middleware before the first sync completes. It is self-contained with its own DOCTYPE, head, and styling because it renders outside the normal handler flow at the middleware level.
Types ¶
type AboutPageData ¶ added in v1.14.0
type AboutPageData struct {
Freshness DataFreshness
Privacy PrivacySync
}
AboutPageData bundles the two payloads consumed by the terminal About renderer. The dispatch table (internal/web/termrender/dispatch.go) registers a single concrete type per page; this struct is that type for /ui/about post-Phase-61.
type CampusDetail ¶
type CampusDetail struct {
// ID is the campus's PeeringDB identifier.
ID int
// Name is the campus's display name.
Name string
// NameLong is the campus's long-form name.
NameLong string
// AKA is the "also known as" alias.
AKA string
// Website is the campus's website URL.
Website string
// OrgName is the name of the parent organization.
OrgName string
// OrgID is the parent organization's PeeringDB ID.
OrgID int
// City is the campus's city.
City string
// State is the campus's state or province.
State string
// Country is the campus's country code.
Country string
// Zipcode is the postal code.
Zipcode string
// Notes contains freeform notes.
Notes string
// Status is the record status.
Status string
// FacCount is the count of facilities (requires query).
FacCount int
// Facilities holds eager-loaded facility rows for terminal/JSON rendering. Nil for web UI requests.
Facilities []CampusFacilityRow `json:"facilities,omitempty"`
}
CampusDetail holds display data for a campus detail page.
type CampusFacilityRow ¶
type CampusFacilityRow struct {
// FacName is the facility name.
FacName string
// FacID is the facility's PeeringDB ID for cross-linking.
FacID int
// City is the facility's city.
City string
// Country is the facility's country code.
Country string
// Latitude is the facility's geographic latitude. Zero means no data.
Latitude float64
// Longitude is the facility's geographic longitude. Zero means no data.
Longitude float64
}
CampusFacilityRow holds display data for a campus's facility row.
type CarrierDetail ¶
type CarrierDetail struct {
// ID is the carrier's PeeringDB identifier.
ID int
// Name is the carrier's display name.
Name string
// NameLong is the carrier's long-form name.
NameLong string
// AKA is the "also known as" alias.
AKA string
// Website is the carrier's website URL.
Website string
// OrgName is the name of the parent organization.
OrgName string
// OrgID is the parent organization's PeeringDB ID.
OrgID int
// Notes contains freeform notes.
Notes string
// Status is the record status.
Status string
// FacCount is the pre-computed count of facilities.
FacCount int
// Facilities holds eager-loaded facility rows for terminal/JSON rendering. Nil for web UI requests.
Facilities []CarrierFacilityRow `json:"facilities,omitempty"`
}
CarrierDetail holds display data for a carrier detail page.
type CarrierFacilityRow ¶
type CarrierFacilityRow struct {
// FacName is the facility name.
FacName string
// FacID is the facility's PeeringDB ID for cross-linking.
FacID int
// Latitude is the facility's geographic latitude. Zero means no data.
Latitude float64
// Longitude is the facility's geographic longitude. Zero means no data.
Longitude float64
}
CarrierFacilityRow holds display data for a carrier's facility row.
type CompareCampus ¶
type CompareCampus struct {
// CampusID is the campus's PeeringDB ID for cross-linking.
CampusID int
// CampusName is the campus display name.
CampusName string
SharedFacilities []CompareCampusFacility
}
CompareCampus holds comparison data for a shared campus.
type CompareCampusFacility ¶
type CompareCampusFacility struct {
// FacID is the facility's PeeringDB ID for cross-linking.
FacID int
// FacName is the facility display name.
FacName string
}
CompareCampusFacility holds a facility within a shared campus.
type CompareData ¶
type CompareData struct {
// NetA is the first network's summary info.
NetA CompareNetwork
// NetB is the second network's summary info.
NetB CompareNetwork
SharedIXPs []CompareIXP
SharedFacilities []CompareFacility
SharedCampuses []CompareCampus
// AllIXPs lists all IXPs for both networks with a shared flag (for full view).
AllIXPs []CompareIXP
// AllFacilities lists all facilities for both networks with shared flag (for full view).
AllFacilities []CompareFacility
// ViewMode is "shared" (default) or "full".
ViewMode string
}
CompareData holds the full comparison result for template rendering.
type CompareFacPresence ¶
type CompareFacPresence struct {
// LocalASN is the local ASN used at this facility.
LocalASN int
}
CompareFacPresence holds one network's presence details at a facility.
type CompareFacility ¶
type CompareFacility struct {
// FacID is the facility's PeeringDB ID for cross-linking.
FacID int
// FacName is the facility display name.
FacName string
// City is the facility's city.
City string
// Country is the facility's country code.
Country string
// Latitude is the facility's geographic latitude. Zero means no data.
Latitude float64
// Longitude is the facility's geographic longitude. Zero means no data.
Longitude float64
Shared bool
// NetA holds network A's presence info (nil if not present).
NetA *CompareFacPresence
// NetB holds network B's presence info (nil if not present).
NetB *CompareFacPresence
}
CompareFacility holds comparison data for a single facility.
type CompareIXP ¶
type CompareIXP struct {
// IXID is the exchange's PeeringDB ID for cross-linking.
IXID int
// IXName is the exchange display name.
IXName string
Shared bool
// NetA holds network A's presence details (nil if not present).
NetA *CompareIXPresence
// NetB holds network B's presence details (nil if not present).
NetB *CompareIXPresence
}
CompareIXP holds comparison data for a single IXP showing both networks' presence info.
type CompareIXPresence ¶
type CompareIXPresence struct {
// Speed is the port speed in Mbps.
Speed int
// IPAddr4 is the IPv4 peering address.
IPAddr4 string
// IPAddr6 is the IPv6 peering address.
IPAddr6 string
// IsRSPeer indicates route server peering.
IsRSPeer bool
// Operational indicates whether the connection is operational.
Operational bool
}
CompareIXPresence holds one network's presence details at an IXP.
type CompareNetwork ¶
type CompareNetwork struct {
// ASN is the Autonomous System Number.
ASN int
// Name is the network's display name.
Name string
// ID is the network's PeeringDB internal identifier.
ID int
}
CompareNetwork holds summary info for one side of the comparison.
type ContactRow ¶
type ContactRow struct {
// Name is the contact's name.
Name string
// Role is the contact's role (e.g. "NOC", "Policy").
Role string
// Email is the contact's email address.
Email string
// Phone is the contact's phone number.
Phone string
// URL is the contact's URL.
URL string
}
ContactRow holds display data for a network contact (poc) row.
type DataFreshness ¶
DataFreshness holds sync status information for the About page display.
type FacCarrierRow ¶
type FacCarrierRow struct {
// CarrierName is the carrier name.
CarrierName string
// CarrierID is the carrier's PeeringDB ID for cross-linking.
CarrierID int
}
FacCarrierRow holds display data for a facility's carrier row.
type FacIXRow ¶
type FacIXRow struct {
// IXName is the exchange name.
IXName string
// IXID is the exchange's PeeringDB ID for cross-linking.
IXID int
}
FacIXRow holds display data for a facility's IXP row.
type FacNetworkRow ¶
type FacNetworkRow struct {
// NetName is the network's name.
NetName string
// ASN is the network's Autonomous System Number.
ASN int
// City is the facility network's city (from NetworkFacility computed field).
City string
// Country is the facility network's country code (from NetworkFacility computed field).
Country string
}
FacNetworkRow holds display data for a facility's network row.
type FacilityDetail ¶
type FacilityDetail struct {
// ID is the facility's PeeringDB identifier.
ID int
// Name is the facility's display name.
Name string
// NameLong is the facility's long-form name.
NameLong string
// AKA is the "also known as" alias.
AKA string
// Website is the facility's website URL.
Website string
// OrgName is the name of the parent organization.
OrgName string
// OrgID is the parent organization's PeeringDB ID.
OrgID int
// CampusName is the name of the parent campus, if any.
CampusName string
// CampusID is the parent campus's PeeringDB ID.
CampusID int
// Address1 is the primary street address.
Address1 string
// Address2 is the secondary address line.
Address2 string
// City is the facility's city.
City string
// State is the facility's state or province.
State string
// Country is the facility's country code.
Country string
// Zipcode is the postal code.
Zipcode string
// RegionContinent is the facility's region/continent.
RegionContinent string
// CLLI is the CLLI code.
CLLI string
// Notes contains freeform notes.
Notes string
// Status is the record status.
Status string
// NetCount is the pre-computed count of networks present.
NetCount int
// IXCount is the pre-computed count of IXPs present.
IXCount int
// CarrierCount is the pre-computed count of carriers.
CarrierCount int
// Latitude is the facility's geographic latitude. Zero means no data.
Latitude float64
// Longitude is the facility's geographic longitude. Zero means no data.
Longitude float64
// Networks holds eager-loaded network rows for terminal/JSON rendering. Nil for web UI requests.
Networks []FacNetworkRow `json:"networks,omitempty"`
// IXPs holds eager-loaded IXP rows for terminal/JSON rendering. Nil for web UI requests.
IXPs []FacIXRow `json:"ixps,omitempty"`
// Carriers holds eager-loaded carrier rows for terminal/JSON rendering. Nil for web UI requests.
Carriers []FacCarrierRow `json:"carriers,omitempty"`
}
FacilityDetail holds display data for a facility detail page.
type IXDetail ¶
type IXDetail struct {
// ID is the IXP's PeeringDB identifier.
ID int
// Name is the IXP's display name.
Name string
// NameLong is the IXP's long-form name.
NameLong string
// AKA is the "also known as" alias.
AKA string
// Website is the IXP's website URL.
Website string
// OrgName is the name of the parent organization.
OrgName string
// OrgID is the parent organization's PeeringDB ID.
OrgID int
// City is the IXP's city.
City string
// Country is the IXP's country code.
Country string
// RegionContinent is the IXP's region/continent.
RegionContinent string
// Media is the exchange media type.
Media string
// ProtoUnicast indicates unicast support.
ProtoUnicast bool
// ProtoMulticast indicates multicast support.
ProtoMulticast bool
// ProtoIPv6 indicates IPv6 support.
ProtoIPv6 bool
// Notes contains freeform notes.
Notes string
// Status is the record status.
Status string
// NetCount is the pre-computed count of network participants.
NetCount int
// FacCount is the pre-computed count of facilities.
FacCount int
// PrefixCount is the count of peering LAN prefixes (requires IxLan traversal).
PrefixCount int
// AggregateBW is the total bandwidth in Mbps across all participants (for header display).
AggregateBW int
// Participants holds eager-loaded participant rows for terminal/JSON rendering. Nil for web UI requests.
Participants []IXParticipantRow `json:"participants,omitempty"`
// Facilities holds eager-loaded facility rows for terminal/JSON rendering. Nil for web UI requests.
Facilities []IXFacilityRow `json:"facilities,omitempty"`
// Prefixes holds eager-loaded prefix rows for terminal/JSON rendering. Nil for web UI requests.
Prefixes []IXPrefixRow `json:"prefixes,omitempty"`
}
IXDetail holds display data for an IXP detail page.
type IXFacilityRow ¶
type IXFacilityRow struct {
// FacName is the facility name.
FacName string
// FacID is the facility's PeeringDB ID for cross-linking.
FacID int
// City is the facility's city.
City string
// Country is the facility's country code.
Country string
// Latitude is the facility's geographic latitude. Zero means no data.
Latitude float64
// Longitude is the facility's geographic longitude. Zero means no data.
Longitude float64
}
IXFacilityRow holds display data for an IXP facility row.
type IXParticipantRow ¶
type IXParticipantRow struct {
// NetName is the participant network's name.
NetName string
// ASN is the participant's Autonomous System Number.
ASN int
// Speed is the port speed in Mbps.
Speed int
// IPAddr4 is the IPv4 peering address.
IPAddr4 string
// IPAddr6 is the IPv6 peering address.
IPAddr6 string
// IsRSPeer indicates route server peering.
IsRSPeer bool
}
IXParticipantRow holds display data for an IXP participant row.
type IXPrefixRow ¶
type IXPrefixRow struct {
// Prefix is the peering LAN prefix.
Prefix string
// Protocol is the address family ("IPv4" or "IPv6").
Protocol string
// InDFZ indicates whether the prefix is in the default-free zone.
InDFZ bool
}
IXPrefixRow holds display data for an IXP prefix row.
type MapMarker ¶ added in v1.11.0
type MapMarker struct {
// Lat is the marker's latitude.
Lat float64
// Lng is the marker's longitude.
Lng float64
// Name is the display name in the popup.
Name string
// Location is the city/country text in the popup.
Location string
// NetCount is the network count shown in the popup.
NetCount int
// IXCount is the IX count shown in the popup.
IXCount int
// DetailURL is the link to the entity detail page.
DetailURL string
// Color is the circleMarker fillColor hex (e.g. "#10b981"). Empty for single-pin maps.
Color string
// Stroke is the circleMarker stroke hex (e.g. "#059669"). Empty for single-pin maps.
Stroke string
// Extra is an additional popup line (e.g. network names for compare maps). Empty if not needed.
Extra string
}
MapMarker holds data for a single map pin.
type NetworkDetail ¶
type NetworkDetail struct {
// ID is the network's PeeringDB internal identifier.
ID int
// ASN is the Autonomous System Number.
ASN int
// Name is the network's display name.
Name string
// NameLong is the network's long-form name.
NameLong string
// AKA is the "also known as" alias.
AKA string
// Website is the network's website URL.
Website string
// OrgName is the name of the parent organization.
OrgName string
// OrgID is the parent organization's PeeringDB ID.
OrgID int
// IRRAsSet is the IRR AS-SET identifier.
IRRAsSet string
// InfoType is the network type classification.
InfoType string
// InfoScope is the geographic scope.
InfoScope string
// InfoTraffic is the traffic level.
InfoTraffic string
// InfoRatio is the traffic ratio.
InfoRatio string
// InfoUnicast indicates unicast support.
InfoUnicast bool
// InfoMulticast indicates multicast support.
InfoMulticast bool
// InfoIPv6 indicates IPv6 support.
InfoIPv6 bool
// InfoPrefixes4 is the IPv4 prefix count.
InfoPrefixes4 int
// InfoPrefixes6 is the IPv6 prefix count.
InfoPrefixes6 int
// LookingGlass is the looking glass URL.
LookingGlass string
// RouteServer is the route server URL.
RouteServer string
// PolicyGeneral is the general peering policy.
PolicyGeneral string
// PolicyURL is the peering policy URL.
PolicyURL string
// Notes contains freeform notes.
Notes string
// Status is the record status.
Status string
// IXCount is the pre-computed count of IX presences.
IXCount int
// FacCount is the pre-computed count of facility presences.
FacCount int
// PocCount is the count of contacts (requires query).
PocCount int
// AggregateBW is the total bandwidth in Mbps across all IX presences (for header display).
AggregateBW int
// IXPresences holds eager-loaded IX presence rows for terminal/JSON rendering.
// Nil for web UI requests that lazy-load via htmx fragments.
IXPresences []NetworkIXLanRow `json:"ixPresences,omitempty"`
// FacPresences holds eager-loaded facility presence rows for terminal/JSON rendering.
// Nil for web UI requests that lazy-load via htmx fragments.
FacPresences []NetworkFacRow `json:"facPresences,omitempty"`
}
NetworkDetail holds display data for a network detail page.
type NetworkFacRow ¶
type NetworkFacRow struct {
// FacName is the facility name.
FacName string
// FacID is the facility's PeeringDB ID for cross-linking.
FacID int
// LocalASN is the local ASN at this facility.
LocalASN int
// City is the facility's city.
City string
// Country is the facility's country code.
Country string
// Latitude is the facility's geographic latitude. Zero means no data.
Latitude float64
// Longitude is the facility's geographic longitude. Zero means no data.
Longitude float64
}
NetworkFacRow holds display data for a network's facility presence row.
type NetworkIXLanRow ¶
type NetworkIXLanRow struct {
// IXName is the exchange name.
IXName string
// IXID is the exchange's PeeringDB ID for cross-linking.
IXID int
// Speed is the port speed in Mbps.
Speed int
// IPAddr4 is the IPv4 peering address.
IPAddr4 string
// IPAddr6 is the IPv6 peering address.
IPAddr6 string
// IsRSPeer indicates route server peering.
IsRSPeer bool
}
NetworkIXLanRow holds display data for a network's IX presence row.
type OrgCampusRow ¶
type OrgCampusRow struct {
// CampusName is the campus name.
CampusName string
// CampusID is the campus's PeeringDB ID for cross-linking.
CampusID int
}
OrgCampusRow holds display data for an org's campus row.
type OrgCarrierRow ¶
type OrgCarrierRow struct {
// CarrierName is the carrier name.
CarrierName string
// CarrierID is the carrier's PeeringDB ID for cross-linking.
CarrierID int
}
OrgCarrierRow holds display data for an org's carrier row.
type OrgDetail ¶
type OrgDetail struct {
// ID is the organization's PeeringDB identifier.
ID int
// Name is the organization's display name.
Name string
// NameLong is the organization's long-form name.
NameLong string
// AKA is the "also known as" alias.
AKA string
// Website is the organization's website URL.
Website string
// Address1 is the primary street address.
Address1 string
// Address2 is the secondary address line.
Address2 string
// City is the organization's city.
City string
// State is the organization's state or province.
State string
// Country is the organization's country code.
Country string
// Zipcode is the postal code.
Zipcode string
// Notes contains freeform notes.
Notes string
// Status is the record status.
Status string
// NetCount is the pre-computed count of networks.
NetCount int
// FacCount is the pre-computed count of facilities.
FacCount int
// IXCount is the count of IXPs (requires query).
IXCount int
// CampusCount is the count of campuses (requires query).
CampusCount int
// CarrierCount is the count of carriers (requires query).
CarrierCount int
// Networks holds eager-loaded network rows for terminal/JSON rendering. Nil for web UI requests.
Networks []OrgNetworkRow `json:"networks,omitempty"`
// IXPs holds eager-loaded IXP rows for terminal/JSON rendering. Nil for web UI requests.
IXPs []OrgIXRow `json:"ixps,omitempty"`
// Facs holds eager-loaded facility rows for terminal/JSON rendering. Nil for web UI requests.
Facs []OrgFacilityRow `json:"facilities,omitempty"`
// Campuses holds eager-loaded campus rows for terminal/JSON rendering. Nil for web UI requests.
Campuses []OrgCampusRow `json:"campuses,omitempty"`
// Carriers holds eager-loaded carrier rows for terminal/JSON rendering. Nil for web UI requests.
Carriers []OrgCarrierRow `json:"carriers,omitempty"`
}
OrgDetail holds display data for an organization detail page.
type OrgFacilityRow ¶
type OrgFacilityRow struct {
// FacName is the facility name.
FacName string
// FacID is the facility's PeeringDB ID for cross-linking.
FacID int
// City is the facility's city.
City string
// Country is the facility's country code.
Country string
// Latitude is the facility's geographic latitude. Zero means no data.
Latitude float64
// Longitude is the facility's geographic longitude. Zero means no data.
Longitude float64
}
OrgFacilityRow holds display data for an org's facility row.
type OrgIXRow ¶
type OrgIXRow struct {
// IXName is the exchange name.
IXName string
// IXID is the exchange's PeeringDB ID for cross-linking.
IXID int
}
OrgIXRow holds display data for an org's IXP row.
type OrgNetworkRow ¶
type OrgNetworkRow struct {
// NetName is the network's name.
NetName string
// ASN is the network's Autonomous System Number.
ASN int
}
OrgNetworkRow holds display data for an org's network row.
type PrivacySync ¶ added in v1.14.0
type PrivacySync struct {
// AuthMode is the human-readable label: "Authenticated with PeeringDB
// API key" or "Anonymous (no key)".
AuthMode string
// PublicTier is the lowercase env-var value: "public" or "users".
// Matches PDBPLUS_PUBLIC_TIER so operators can map the UI back to the
// deploy config without translating.
PublicTier string
// PublicTierExplanation is the one-line plain-language gloss of what
// PublicTier means for an anonymous caller's data view. Rendered below
// the PublicTier value on both surfaces.
PublicTierExplanation string
// OverrideActive is true when PublicTier == "users". When true, the
// HTML renders an amber "Override active" badge and the terminal
// prepends a "! " indicator to the Public Tier line.
OverrideActive bool
}
PrivacySync carries the Phase 61 OBS-02 Privacy & Sync section payload for both the HTML (about.templ) and terminal (termrender/about.go) About page renderings. Populated by web.Handler.handleAbout from the handler's captured startup values; the renderers do not read env vars or config at request time.
OverrideActive is true iff PDBPLUS_PUBLIC_TIER=users was in effect at process start — the "never silent escalation" flag (D-06).
type SearchGroup ¶
type SearchGroup struct {
// TypeName is the human-readable plural name (e.g. "Networks", "IXPs").
TypeName string
// TypeSlug is the short identifier used in URLs (e.g. "net", "ix").
TypeSlug string
// AccentColor is the Tailwind color name for visual grouping (e.g. "emerald", "sky").
AccentColor string
// Results holds up to 10 matching entities.
Results []SearchResult
// HasMore indicates whether additional matches exist beyond the displayed results.
HasMore bool
}
SearchGroup represents a group of search results for one entity type. These types mirror web.TypeResult and web.SearchHit, defined in the templates package to avoid circular imports (web imports templates, so templates cannot import web).
type SearchResult ¶
type SearchResult struct {
// Name is the entity's display name.
Name string
// Country is the ISO 3166-1 alpha-2 code; empty if not available.
Country string
// City is the city name; empty if not available.
City string
// ASN is the AS number; 0 if not applicable (non-network entity).
ASN int
// DetailURL is the path to the entity's detail page (e.g. "/ui/asn/13335").
DetailURL string
}
SearchResult represents a single search hit for template rendering.
Source Files
¶
- about_templ.go
- abouttypes.go
- compare_templ.go
- comparetypes.go
- detail_campus_templ.go
- detail_carrier_templ.go
- detail_fac_templ.go
- detail_ix_templ.go
- detail_net_templ.go
- detail_org_templ.go
- detail_shared_templ.go
- detailtypes.go
- error_templ.go
- footer_templ.go
- generate.go
- home_templ.go
- layout_templ.go
- map_templ.go
- nav_templ.go
- search_results_templ.go
- searchtypes.go
- syncing_templ.go