Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Page ¶
type Page struct {
// contains filtered or unexported fields
}
Page represents a single page in a wiki. Pages form a tree via children, and are identified by slug.
type RewrittenContent ¶
type RewrittenContent struct {
// contains filtered or unexported fields
}
RewrittenContent is a value object that holds markdown content with internal wiki links rewritten to use full hierarchical API paths.
func NewRewrittenContent ¶
func NewRewrittenContent(content string, pathIndex map[string]string, urlPrefix string, suffix string) RewrittenContent
NewRewrittenContent rewrites markdown links in content. Links whose target is a known slug are replaced with urlPrefix + "/" + fullPath + suffix. Absolute URLs and unknown slugs are left unchanged.
func (RewrittenContent) String ¶
func (r RewrittenContent) String() string
String returns the rewritten markdown content.
type Wiki ¶
type Wiki struct {
// contains filtered or unexported fields
}
Wiki represents a complete wiki generated from a repository. It is a value object constructed by deserializing an enrichment's content.
func (Wiki) Page ¶
Page finds a single page by slug, searching the entire tree. Returns the page and true if found, or an empty page and false otherwise.
func (Wiki) PageByPath ¶
PageByPath resolves a page by its hierarchical path (e.g. "architecture/database-layer"). It walks the tree level by level, splitting on "/".