Documentation
¶
Overview ¶
Package homer renders dashsync's model into a Homer (github.com/bastienwirtz/homer) config.yml.
Homer's managed content ("services:") lives nested amid otherwise-foreign hand-configured settings (title, theme, colors, ...) — a different shape from Homepage's, but one merge.NewNamedGroupAdapter knows how to walk; see docs/decisions/007-document-adapter.md.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Renderer ¶
type Renderer struct{}
Renderer renders dashsync's model as a Homer config.yml services list.
func (Renderer) Adapter ¶ added in v0.2.0
func (Renderer) Adapter() merge.DocumentAdapter
Adapter implements merge.EntryRenderer: Homer's document shape (see this package's own doc comment) is exactly what merge.NewNamedGroupAdapter knows how to walk.
func (Renderer) DefaultPath ¶
DefaultPath implements render.Renderer.
func (Renderer) NormalizeEntry ¶ added in v0.2.0
NormalizeEntry implements merge.EntryRenderer: it decodes node — an existing entry as read back from a file — into the same generic shape RenderEntry builds, then re-renders it through the exact same encoder call. See homepage.Renderer's own NormalizeEntry doc comment for why this (rather than node.String()) is necessary, and why item is map[string]any rather than a typed struct — the same reasoning applies here unchanged.
func (Renderer) Render ¶
Render implements render.Renderer. See that interface's doc comment for the ordering contract this relies on groups already satisfying.
func (Renderer) RenderEntry ¶ added in v0.2.0
RenderEntry implements merge.EntryRenderer: it renders one service as a standalone Homer item entry, the granularity dashsync's idempotent merge (internal/merge) needs for inserting, updating, and hand-edit-detecting individual entries without touching the rest of an existing file.