Documentation
¶
Overview ¶
Package contract 定义浏览器和桌面阅读器共用的网页数据字段。
Index ¶
- func CustomTags(trees []reader.CustomTagTree) []map[string]any
- func Fonts(values []reader.FontInfo) []reader.FontInfo
- func Outline(tree reader.OutlineTree) reader.OutlineTree
- func Permissions(values []reader.DocumentPermissions) []reader.DocumentPermissions
- func Search(report reader.SearchReport) reader.SearchReport
- func Signatures(infos []reader.SignatureInfo) []map[string]any
- func Versions(infos []reader.VersionInfo) []map[string]any
- type PageLink
- type TextRun
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CustomTags ¶
func CustomTags(trees []reader.CustomTagTree) []map[string]any
CustomTags 将只读标签快照映射为共用界面的字段,不把 XML 当作 HTML。
func Outline ¶
func Outline(tree reader.OutlineTree) reader.OutlineTree
Outline 复制大纲列表并规范化空数组,不修改阅读器的快照。
func Permissions ¶
func Permissions(values []reader.DocumentPermissions) []reader.DocumentPermissions
Permissions 返回非 nil 数组,保证空结果在两种传输中一致。
func Search ¶
func Search(report reader.SearchReport) reader.SearchReport
Search 复制搜索结果并规范化空数组,不修改阅读器的快照。
func Signatures ¶
func Signatures(infos []reader.SignatureInfo) []map[string]any
Signatures 将阅读器的签名信息归一为浏览器和桌面共用的字段契约。