fs

package
v0.2.4 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2021 License: Apache-2.0, BSD-2-Clause, BSD-3-Clause, + 2 more Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Entity

type Entity interface {
	Kind() EntityKind
	Section() *Section
	Group() *Group
	Meta() *frontmatter.Meta
	CompoundID() string
	ParentEntity() Entity
}

func Walk

func Walk(root string) ([]Entity, error)

type EntityKind

type EntityKind int
const (
	EntityKindSection EntityKind = iota + 1
	EntityKindGroup
)

type Group

type Group struct {
	Metadata *frontmatter.Meta
	Children []Entity
	Parent   *Group
	Content  *Section
}

func (*Group) CompoundID

func (g *Group) CompoundID() string

func (*Group) Group

func (g *Group) Group() *Group

func (*Group) Kind

func (g *Group) Kind() EntityKind

func (*Group) Meta

func (g *Group) Meta() *frontmatter.Meta

func (*Group) ParentEntity

func (g *Group) ParentEntity() Entity

func (*Group) Section

func (g *Group) Section() *Section

type Section

type Section struct {
	Metadata           *frontmatter.Meta
	Content, SideNotes []string
	HasSideNotes       bool
	Parent             *Group
}

func (*Section) CompoundID

func (s *Section) CompoundID() string

func (*Section) Group

func (s *Section) Group() *Group

func (*Section) Kind

func (s *Section) Kind() EntityKind

func (*Section) Meta

func (s *Section) Meta() *frontmatter.Meta

func (*Section) ParentEntity

func (s *Section) ParentEntity() Entity

func (*Section) Section

func (s *Section) Section() *Section

Jump to

Keyboard shortcuts

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