overlay

package
v1.6.21 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OverlayContext

type OverlayContext interface {
	AddDocument(doc *asciidoc.Document)
	ResolvePath(root string, path string) (asciidoc.Path, error)
	ShouldIncludeFile(path asciidoc.Path) bool
	IncludeFile(path asciidoc.Path, parent asciidoc.Parent) (doc *asciidoc.Document, err error)

	MakeSectionName(reader asciidoc.Reader, section *asciidoc.Section, variables Variables) (string, error)
	SectionName(section *asciidoc.Section) string
	SetSectionName(section *asciidoc.Section, name string)
	SectionLevel(section *asciidoc.Section) int
	SetSectionLevel(section *asciidoc.Section, level int)
	SetParent(parent *asciidoc.Document, child *asciidoc.Document)
}

type OverlayError

type OverlayError struct {
	log.Source
	// contains filtered or unexported fields
}

type Reader

type Reader struct {
	// contains filtered or unexported fields
}

func Build

func Build(cxt OverlayContext, rootDoc *asciidoc.Document, rootPath string, attributes []asciidoc.AttributeName) (reader *Reader, err error)

func (*Reader) Children

func (r *Reader) Children(parent asciidoc.ParentElement) asciidoc.Elements

func (*Reader) Iterate

func (r *Reader) Iterate(parent asciidoc.Parent, elements asciidoc.Elements) asciidoc.ElementIterator

func (*Reader) Parent

func (r *Reader) Parent(child asciidoc.ChildElement) asciidoc.Element

func (*Reader) StringValue

func (r *Reader) StringValue(parent asciidoc.Parent, elements asciidoc.Elements) (string, error)

type Variables

type Variables interface {
	IsSet(name string) bool
	Get(name string) any
	Set(name string, value any)
	Unset(name string)
}

Jump to

Keyboard shortcuts

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