chrbm

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WalkEdge

func WalkEdge(n Node, visitor Visitor) error

WalkEdge walk edge nodes that has url type.

Types

type Bookmark

type Bookmark struct {
	Name string
	Path string
	URL  string
}

Bookmark contains bookmark data that have url type

func ListBookmarks

func ListBookmarks(byteJSON []byte) ([]Bookmark, error)

ListBookmarks return Chrome Bookmark List that has no hierarchy. byteJSON needs Chrome Bookmark JSON format.

type BookmarkTree

type BookmarkTree struct {
	Roots Roots `json:"roots"`
}

BookmarkTree is organaized by nodes that has bookmark data.

type Node

type Node struct {
	Name     string `json:"name"`
	Type     string `json:"type"`
	URL      string `json:"url"`
	Children []Node `json:"children"`
}

Node has Bookmark info. folder type Node has children Node.

type Roots

type Roots struct {
	BookmarkBar Node `json:"bookmark_bar"`
	Other       Node `json:"other"`
	Synced      Node `json:"synced"`
}

Roots has kind of Chrome Bbookmarks.

type Visitor

type Visitor interface {
	Visit(n Node, path string) error
}

Visitor visits Nodes.

Jump to

Keyboard shortcuts

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