wiki

package
v1.0.1-0...-579fab2 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BodyChopper

type BodyChopper interface {
	MoveToNextBodyPart(body string, currentPosition int, currentPositionWithinSectionBody int) (newPosition int, newPositionWithinSectionBody int)
	FetchBodyPart(body string, currentPositionWithinSectionBody int) string
}

type Page

type Page Section

func (Page) TextAndPositionFromSectionName

func (p Page) TextAndPositionFromSectionName(sectionName string, localizer *locale.Localizer) (text string, position int)

func (Page) TextAndPositionFromSectionNumber

func (p Page) TextAndPositionFromSectionNumber(sectionNumber string, localizer *locale.Localizer) (text string, position int)

func (Page) TextForPosition

func (p Page) TextForPosition(position int) string

func (Page) Toc

func (p Page) Toc(localizer *locale.Localizer) string

type Section

type Section struct {
	Number      string
	Title       string
	Body        string
	Subsections []Section
}

type Wiki

type Wiki interface {
	GetPage(url string, localizer *locale.Localizer) (Page, error)
	SearchPage(url string, localizer *locale.Localizer) (Page, error)
}