templates

package
v1.10.0 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2026 License: BSD-3-Clause Imports: 4 Imported by: 0

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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AboutPage

func AboutPage(freshness DataFreshness) templ.Component

AboutPage renders the about page with project information and data freshness.

func Breadcrumb(typePlural string, entityName string) templ.Component

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 clickable rows 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 clickable rows linking to the respective facility detail page.

func CollapsibleSection

func CollapsibleSection(title string, count int, loadURL string) templ.Component

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

func CompareFormPage(asn1 string, asn2 string) templ.Component

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

func CopyableIP(label string, addr string) templ.Component

CopyableIP renders an IP address with click-to-copy and a hover clipboard icon.

func DetailField

func DetailField(label string, value string) templ.Component

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(label string, url string) templ.Component

DetailLink renders a clickable URL field. Only renders if url is non-empty.

func FacCarriersList

func FacCarriersList(rows []FacCarrierRow) templ.Component

FacCarriersList renders the list of carriers at a facility as clickable rows linking to the respective carrier detail page.

func FacIXPsList

func FacIXPsList(rows []FacIXRow) templ.Component

FacIXPsList renders the list of IXPs present at a facility as clickable rows linking to the respective IX detail page.

func FacNetworksList

func FacNetworksList(rows []FacNetworkRow) templ.Component

FacNetworksList renders the list of networks present at a facility as clickable rows linking to the respective network detail page by ASN.

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 Footer() templ.Component

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

func IXDetailPage(data IXDetail) templ.Component

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 the list of IX facilities as clickable rows linking to the respective facility detail page.

func IXParticipantsList

func IXParticipantsList(rows []IXParticipantRow) templ.Component

IXParticipantsList renders the list of IX participants with labeled fields, speed color tiers, inline RS badge, and copyable IP addresses.

func IXPrefixesList

func IXPrefixesList(rows []IXPrefixRow) templ.Component

IXPrefixesList renders the list of IX prefixes (no cross-links for prefixes).

func Layout

func Layout(title string, contents templ.Component) templ.Component
func Nav() templ.Component

func NetworkContactsList

func NetworkContactsList(rows []ContactRow) templ.Component

NetworkContactsList renders the list of contacts grouped by role.

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 the list of facility presences as clickable rows linking to the respective facility detail page.

func NetworkIXLansList

func NetworkIXLansList(rows []NetworkIXLanRow) templ.Component

NetworkIXLansList renders the list of IX presences with labeled fields, speed color tiers, inline RS badge, and copyable IP addresses.

func NotFoundPage

func NotFoundPage() templ.Component

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 clickable rows linking to the respective campus detail page.

func OrgCarriersList

func OrgCarriersList(rows []OrgCarrierRow) templ.Component

OrgCarriersList renders the list of org carriers as clickable rows linking to the respective carrier detail page.

func OrgDetailPage

func OrgDetailPage(data OrgDetail) templ.Component

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 clickable rows linking to the respective facility detail page.

func OrgIXPsList

func OrgIXPsList(rows []OrgIXRow) templ.Component

OrgIXPsList renders the list of org IXPs as clickable rows linking to the respective IX detail page.

func OrgNetworksList

func OrgNetworksList(rows []OrgNetworkRow) templ.Component

OrgNetworksList renders the list of org networks as clickable rows 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 clickable result links. Returns empty output when groups is nil or empty.

func ServerErrorPage

func ServerErrorPage() templ.Component

ServerErrorPage renders a styled 500 page with a link back to the homepage.

func StatBadge

func StatBadge(label string, count int) templ.Component

StatBadge renders a small stat indicator for the header area.

func SyncingPage

func SyncingPage() templ.Component

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 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
}

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
}

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 lists facilities within this campus where both networks are present.
	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 lists IXPs where both networks are present.
	SharedIXPs []CompareIXP
	// SharedFacilities lists facilities where both networks are present.
	SharedFacilities []CompareFacility
	// SharedCampuses lists campuses where both networks have facility presence.
	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
	// Shared indicates both networks are present at this facility.
	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 indicates both networks are present at this IXP.
	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

type DataFreshness struct {
	Available  bool
	LastSyncAt time.Time
	Age        time.Duration
}

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
}

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
	// 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
}

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 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
}

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
}

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 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
	// Subtitle provides context: ASN for networks, city/country for facilities/IXPs/campuses.
	Subtitle string
	// 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.

Jump to

Keyboard shortcuts

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