frontend

package
v0.2.9 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2026 License: MIT Imports: 44 Imported by: 0

Documentation

Overview

templ: version: v0.3.1070

templ: version: v0.3.1070

templ: version: v0.3.1070

templ: version: v0.3.1070

templ: version: v0.3.1070

templ: version: v0.3.1070

templ: version: v0.3.1070

templ: version: v0.3.1070

templ: version: v0.3.1070

templ: version: v0.3.1070

templ: version: v0.3.1070

templ: version: v0.3.1070

templ: version: v0.3.1070

templ: version: v0.3.1070

templ: version: v0.3.1070

templ: version: v0.3.1070

templ: version: v0.3.1070

templ: version: v0.3.1070

templ: version: v0.3.1070

templ: version: v0.3.1070

templ: version: v0.3.1070

templ: version: v0.3.1070

templ: version: v0.3.1070

templ: version: v0.3.1070

templ: version: v0.3.1070

templ: version: v0.3.1070

templ: version: v0.3.1070

templ: version: v0.3.1070

templ: version: v0.3.1070

templ: version: v0.3.1070

templ: version: v0.3.1070

templ: version: v0.3.1070

templ: version: v0.3.1070

templ: version: v0.3.1070

templ: version: v0.3.1070

templ: version: v0.3.1070

templ: version: v0.3.1070

templ: version: v0.3.1070

templ: version: v0.3.1070

templ: version: v0.3.1070

templ: version: v0.3.1070

templ: version: v0.3.1070

templ: version: v0.3.1070

templ: version: v0.3.1070

templ: version: v0.3.1070

Package frontend renders the site's pages inside the Go process.

templ: version: v0.3.1070

templ: version: v0.3.1070

templ: version: v0.3.1070

templ: version: v0.3.1070

templ: version: v0.3.1070

templ: version: v0.3.1070

templ: version: v0.3.1070

templ: version: v0.3.1070

templ: version: v0.3.1070

templ: version: v0.3.1070

templ: version: v0.3.1070

templ: version: v0.3.1070

templ: version: v0.3.1070

templ: version: v0.3.1070

templ: version: v0.3.1070

templ: version: v0.3.1070

templ: version: v0.3.1070

templ: version: v0.3.1070

templ: version: v0.3.1070

templ: version: v0.3.1070

templ: version: v0.3.1070

templ: version: v0.3.1070

templ: version: v0.3.1070

templ: version: v0.3.1070

templ: version: v0.3.1070

templ: version: v0.3.1070

templ: version: v0.3.1070

templ: version: v0.3.1070

templ: version: v0.3.1070

templ: version: v0.3.1070

templ: version: v0.3.1070

templ: version: v0.3.1070

templ: version: v0.3.1070

templ: version: v0.3.1070

templ: version: v0.3.1070

templ: version: v0.3.1070

templ: version: v0.3.1070

templ: version: v0.3.1070

templ: version: v0.3.1070

templ: version: v0.3.1070

templ: version: v0.3.1070

templ: version: v0.3.1070

templ: version: v0.3.1070

templ: version: v0.3.1070

templ: version: v0.3.1070

templ: version: v0.3.1070

templ: version: v0.3.1070

templ: version: v0.3.1070

templ: version: v0.3.1070

Index

Constants

This section is empty.

Variables

View Source
var ErrNotFound = errors.New("frontend: page not found")

Functions

func New

func New(options Options) http.Handler

New builds the page handler. Ingress owns API, auth, images and WebSockets.

Types

type AdvancedSearchReader

type AdvancedSearchReader interface {
	Labels(context.Context) ([]api.LabelEntry, error)
	AdvancedSearch(context.Context, url.Values) (api.AdvancedSearchResult, error)
}

type BattleGeneratorReader

type BattleGeneratorReader interface {
	BattleGeneratorPreview(context.Context, json.RawMessage) (json.RawMessage, error)
}

type BlogReader

type BlogReader interface {
	PublicBlogPosts(context.Context, *api.BlogCursor, string, int) (api.BlogListPage, error)
	PublicBlogPost(context.Context, string) (api.BlogPost, bool, error)
}

type CoalitionReader

type CoalitionReader interface {
	CoalitionDirectory(context.Context) (api.CoalitionDirectoryData, error)
	CoalitionDirectoryOverview(context.Context) (api.CoalitionDirectoryData, error)
	CoalitionDetail(context.Context, string) (api.CoalitionDetailData, bool, error)
}

type EntityReader

EntityReader shares the public entity-page loader with the API while keeping entity routes independent from the homepage's widget reader.

type FactionWarReader

type FactionWarReader interface {
	FactionWarDashboard(context.Context, string) (api.FactionWarData, error)
	FactionWarOverview(context.Context, string, string) (api.FactionWarOverview, error)
	FactionWarSystems(context.Context, string) (api.FactionWarSystems, error)
	FactionWarMembers(context.Context, string, url.Values) (api.WarMembersData, error)
	FactionWarIntel(context.Context, string) (api.WarIntelData, error)
	FactionWarKilllist(context.Context, string, string, int, int, *int64) (api.KilllistPage, error)
}

type HomepageReader

type HomepageReader interface {
	Top(context.Context, string, int, int) ([]api.TopEntry, error)
	MostValuable(context.Context, string, int, int) ([]api.ValuableKill, error)
	LatestKills(context.Context, int, int) (api.KilllistPage, error)
	LatestKillsFresh(context.Context, int, int) (api.KilllistPage, error)
	Killlist(context.Context, string, int, int) (api.KilllistPage, error)
	KilllistFresh(context.Context, string, int, int) (api.KilllistPage, error)
	TopKills(context.Context, string, string, int, int) ([]api.TopEntry, error)
	TopKillsCached(context.Context, string, string, int, int) ([]api.TopEntry, bool)
	MostValuableKills(context.Context, string, int, int) ([]api.ValuableKill, error)
	FilteredKills(context.Context, string, *int64, int) (api.KilllistPage, error)
	Labels(context.Context) ([]api.LabelEntry, error)
	SavedScan(context.Context, string, string) (json.RawMessage, bool, error)
}

HomepageReader keeps homepage and /kills data access outside templ components.

type KillmailReader

type KillmailReader interface {
	KillmailPage(context.Context, int64) (api.KillmailPageData, bool, error)
}

type LegacyReader

type LegacyReader interface {
	LegacyArchiveStats(context.Context) (api.LegacyArchiveStats, error)
	LegacyArchiveTop(context.Context, string, int) ([]api.TopEntry, error)
	LegacyArchiveKills(context.Context, url.Values) (api.KilllistPage, error)
	LegacyArchiveKill(context.Context, int64) (api.LegacyArchiveKillData, bool, error)
}

type Metadata

type Metadata struct {
	Title         string
	OGTitle       string
	Description   string
	CanonicalPath string
	Image         string
	ImageAlt      string
	// NoSocialImage suppresses the default fallback for preview modes that
	// intentionally emit no Open Graph or Twitter image.
	NoSocialImage bool
	TwitterCard   string
	TwitterTitle  string
	ThemeColor    string
	ImageWidth    int
	ImageHeight   int
	ImageSources  []string
	CommentMedia  bool
	CommentEditor bool
	Kind          string
	// Indexing is opt-in per page, and only enabled on the production apex.
	Indexable bool
	// StructuredData is encoded as JSON, including HTML-safe string escaping.
	StructuredData any
	// Page-specific assets are referenced by logical name and versioned here.
	Stylesheets   []string
	ModuleScripts []string
	NeedsWASM     bool
}

Metadata belongs to the page loader. CanonicalPath is deliberate: include meaningful pagination queries, omit tracking queries, and choose entity tab canonicals in the route that understands their meaning. Never use Host.

type Options

type Options struct {
	Production      bool
	Homepage        HomepageReader
	Entities        EntityReader
	Universe        UniverseReader
	Wallet          WalletReader
	Legacy          LegacyReader
	Rankings        RankingsReader
	Statistics      StatisticsReader
	Scans           ScanReader
	Coalitions      CoalitionReader
	Wars            WarReader
	FactionWars     FactionWarReader
	BattleGenerator BattleGeneratorReader
	Blog            BlogReader
	Killmail        KillmailReader
	// BlogPreviewAPI is the existing authenticated API handler. The admin-only
	// preview route delegates its authorization and post lookup to it in-process.
	BlogPreviewAPI http.Handler
	CommentsAPI    http.Handler
	SitemapAPI     http.Handler
	CampaignsAPI   http.Handler
	Sessions       SessionReader
	AccountAPI     http.Handler
	ConflictsAPI   http.Handler
	FittingsAPI    http.Handler
	RoamReports    RoamReportReader
	AdvancedSearch AdvancedSearchReader
}

Options contains deployment policy, not request-derived site identity.

type Page

type Page struct {
	Metadata Metadata
	Content  templ.Component
	Status   int
	// RedirectPath lets a loader resolve a canonical target inside the same
	// measured request context as ordinary SSR data loading.
	RedirectPath string
	// SharedCacheTTL is an explicit promise that the page contains no personal
	// data. Requests with cookies or Authorization always bypass shared caching.
	SharedCacheTTL time.Duration
}

Page separates fetching and presentation. Loaders call Go services directly; templates receive finished view models and never perform database or HTTP IO.

type RankingsReader

type RankingsReader interface {
	Rankings(context.Context, string, string) ([]api.RankingEntry, error)
}

type RoamReportReader

type RoamReportReader interface {
	RoamReport(context.Context, string) (api.RoamReport, bool, error)
	RoamReportKilllist(context.Context, api.RoamReport, url.Values) (api.KilllistPage, error)
}

type ScanReader

type ScanReader interface {
	SavedScan(context.Context, string, string) (json.RawMessage, bool, error)
}

type SessionReader

type SessionReader interface {
	BrowserSession(context.Context, string) (*api.Principal, error)
}

type UniverseReader

type UniverseReader interface {
	UniverseSystem(context.Context, int64) (api.UniverseSystemData, bool, error)
	UniverseRegion(context.Context, int64) (api.UniverseRegionData, bool, error)
	UniverseConstellation(context.Context, int64) (api.UniverseConstellationData, bool, error)
	UniverseLocationKills(context.Context, string, int64, int, *int64) (api.KilllistPage, error)
	UniverseLocationValuable(context.Context, string, int64, string) ([]api.ValuableKill, error)
	UniverseGroup(context.Context, int64) (api.UniverseGroupData, bool, error)
	UniverseGroupKills(context.Context, int64, int, *int64) (api.KilllistPage, error)
	UniverseItem(context.Context, int64) (api.UniverseItemData, bool, error)
	UniverseItemKills(context.Context, int64, bool, int, *int64) (api.KilllistPage, error)
	UniverseMarketOrders(context.Context, int64, int32, string) (api.UniverseMarketOrders, error)
	UniverseMarketHistory(context.Context, int64, int32, int) (api.UniverseMarketHistory, error)
	UniverseFitFamilies(context.Context, int64, url.Values) (api.UniverseFitFamilies, error)
	UniverseFitMeta(context.Context, int64, url.Values) (api.UniverseFitMeta, error)
	UniverseFitDistributions(context.Context, int64, url.Values) (api.UniverseFitDistributions, error)
	UniverseMarketTree(context.Context) ([]api.UniverseMarketTreeNode, error)
	UniverseMarketGroupItems(context.Context, int64) ([]api.UniverseMarketGroupItem, error)
}

type WalletReader

type WalletReader interface {
	PublicWallet(context.Context, int, int) (api.PublicWalletData, error)
}

Source Files

Jump to

Keyboard shortcuts

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