bookmark

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2022 License: Apache-2.0 Imports: 0 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	TypeBookmark  = 1
	TypeFolder    = 2
	TypeSeparator = 3

	DefaultIndex = -1

	MaxTagLength = 100

	GUIDRoot    = "root________"
	GUIDMenu    = "menu________"
	GUIDToolbar = "toolbar_____"
	GUIDUnfiled = "unfiled_____"
	GUIDMobile  = "mobile______"
	GUIDTag     = "tags________"

	GUIDVirtMenu    = "menu_______v"
	GUIDVirtToolbar = "toolbar____v"
	GUIDVirtUnfiled = "unfiled___v"
	GUIDVirtMobile  = "mobile____v"
)

const refs: https://github.com/mozilla/gecko-dev/blob/599a15d3547d862764048ff62b74252dd41a56d3/toolkit/components/places/Bookmarks.jsm#L95

Variables

This section is empty.

Functions

This section is empty.

Types

type Anno

type Anno struct {
	Name    string `json:"name"`
	Value   string `json:"value"`
	Expires int    `json:"expires"`
	Flags   int    `json:"flags"`
}

Not sure where this is documented at the moment.

type Item

type Item struct {
	// GUID is the globally unique identifer of the item.
	GUID string `json:"guid"`

	// ParentGUID is the globally unique identifier of the folder containing this item.
	// It will be empty for the Places root folder. Places seems to be synonymous with "Bookmarks".
	ParentGUID string `json:"parentGuid"`

	// Title is the item's title, if any.
	Title string `json:"title"`

	// Index is the zero-based position of the item in the parent folder.
	Index int `json:"index"`

	// DateAdded represents the time at which the item was added to the tree.
	DateAdded int64 `json:"dateAdded"`
	// LastModified represents the time of the last modification for this item.
	LastModified int64 `json:"lastModified"`

	// ID is the item's ID. Obviously.
	ID int `json:"id"`

	// TypeCode designates what type of item this is; see Type<X> consts.
	TypeCode int `json:"typeCode"`

	// Type is a human-readable string of some Mozilla bullshit.
	Type string `json:"type"`

	// Root seems to be set on all top-level items, designating them as a parent
	// for the type of items they will contain.
	Root string `json:"root"`

	// Children are the items within a TypeFolder; this won't be set on individual items.
	Children []*Item `json:"children"`

	// The following fields only apply to a subset of items.
	// Future improvements could see these being split into separate structs,
	// but frankly I don't give a damn right now.
	Annos   []Anno `json:"annos"`
	URI     string `json:"uri"`
	IconURI string `json:"iconuri"`
	Keyword string `json:"keyword"`
	Charset string `json:"charset"`
	Tags    string `json:"tags"`
}

Item refs: https://github.com/mozilla/gecko-dev/blob/599a15d3547d862764048ff62b74252dd41a56d3/toolkit/components/places/PlacesBackups.jsm#L398 https://github.com/mozilla/gecko-dev/blob/599a15d3547d862764048ff62b74252dd41a56d3/toolkit/components/places/Bookmarks.jsm#L7

Jump to

Keyboard shortcuts

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