internal

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2026 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SortBookmarks

func SortBookmarks(bookmarks []Bookmark, mode SortMode)

func WriteBookmarks

func WriteBookmarks(bookmarks *[]Bookmark) error

func WriteGroups added in v0.3.0

func WriteGroups(groups *[]Group) error

Types

type Bookmark

type Bookmark struct {
	Name         string   `json:"name"`
	Target       string   `json:"target"`
	Type         string   `json:"type"`
	Tags         []string `json:"tags"`
	Args         []string `json:"args,omitempty"`
	CreatedAt    string   `json:"created_at"`
	Note         string   `json:"note,omitempty"`
	Pinned       bool     `json:"pinned,omitempty"`
	LastAccessed string   `json:"last_accessed,omitempty"`
	AccessCount  int      `json:"access_count,omitempty"`
}

func ReadBookmarks

func ReadBookmarks() ([]Bookmark, error)

func SearchByTag

func SearchByTag(bookmarks []Bookmark, tag string) []Bookmark

func SelectCandidate

func SelectCandidate(candidates []*Bookmark) *Bookmark

type Group added in v0.3.0

type Group struct {
	Name      string   `json:"name"`
	Bookmarks []string `json:"bookmarks"`
	CreatedAt string   `json:"created_at"`
}

func ReadGroups added in v0.3.0

func ReadGroups() ([]Group, error)

type MatchKind

type MatchKind int
const (
	MatchNone MatchKind = iota
	MatchExact
	MatchPrefix
	MatchFuzzy
)

type MatchResult

type MatchResult struct {
	Kind       MatchKind
	BM         *Bookmark
	Candidates []*Bookmark
}

func GetClosestMatch

func GetClosestMatch(bookmarks []Bookmark, query string) MatchResult

type SortMode

type SortMode int
const (
	SortByName SortMode = iota
	SortByCreated
	SortByTarget
	SortByType
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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