types

package
v0.0.0-...-763581e Latest Latest
Warning

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

Go to latest
Published: May 7, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParsePageID

func ParsePageID(s string) string

Types

type Annotation

type Annotation struct {
	ENETag        ENETag        `json:"ENE"`
	AttributeName AttributeName `json:"attribute"`
	HTMLOffset    OffsetPair    `json:"html_offset"`
	TextOffset    OffsetPair    `json:"text_offset"`
	PageID        string        `json:"page_id"`
	Title         string        `json:"title"`
	LinkPageID    string        `json:"link_page_id"`
}

type AttributeName

type AttributeName string

type ENETag

type ENETag string

type Offset

type Offset struct {
	LineID int `json:"line_id"`
	Offset int `json:"offset"`
}

type OffsetPair

type OffsetPair struct {
	Start Offset `json:"start"`
	End   Offset `json:"end"`
	Text  string `json:"text"`
}

type Page

type Page struct {
	PageID string
	Lines  map[int]string
}

func LoadPageFromHTML

func LoadPageFromHTML(filepath, p string, lineIDs []int) *Page

type TitlePageID

type TitlePageID struct {
	PageID     json.Number `json:"page_id"`
	Title      string      `json:"title"`
	IsRedirect bool        `json:"is_redirect"`
}

type TitlePageIDWithRedirect

type TitlePageIDWithRedirect struct {
	TitlePageID
	RedirectTo TitlePageID `json:"redirect_to"`
}

func (*TitlePageIDWithRedirect) Resolve

func (t *TitlePageIDWithRedirect) Resolve() json.Number

Jump to

Keyboard shortcuts

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