Documentation
¶
Overview ¶
bukudb, for use with https://github.com/jarun/Buku
Index ¶
- Constants
- type Bookmark
- type BukuDB
- func (db *BukuDB) Add(bookmark Bookmark) error
- func (db *BukuDB) AddTags(id uint16, tags []string) error
- func (db *BukuDB) ClearTags(id uint16) error
- func (db *BukuDB) Close() error
- func (db *BukuDB) Get(id uint16) (Bookmark, error)
- func (db *BukuDB) GetAll() ([]Bookmark, error)
- func (db *BukuDB) Len() int
- func (db *BukuDB) Remove(id uint16) error
- func (db *BukuDB) RemoveTags(id uint16, tags []string) error
- func (db *BukuDB) UpdateComment(id uint16, comment string) error
- func (db *BukuDB) UpdateTitle(id uint16, title string) error
- func (db *BukuDB) UpdateURL(id uint16, url string) error
- type DBInterface
Constants ¶
View Source
const MaxBookmarks = 1000
MaxBookmarks defines the maximum number of bookmarks that can be stored.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bookmark ¶
type Bookmark struct { // ID is the unique identifier for the bookmark. ID uint16 // URL of the bookmark. URL string // Title (metadata) of the bookmark. Title string // Tags associated with the bookmark. Tags []string // Comment or description of the bookmark. Comment string }
Bookmark represents a single bookmark entry.
type BukuDB ¶
type BukuDB struct {
// contains filtered or unexported fields
}
BukuDB represents a connection to the buku SQLite database.
func (*BukuDB) RemoveTags ¶
RemoveTags removes tags from the bookmark with the given ID.
func (*BukuDB) UpdateComment ¶
UpdateComment updates the comment of the bookmark with the given ID.
func (*BukuDB) UpdateTitle ¶
UpdateTitle updates the title of the bookmark with the given ID.
type DBInterface ¶ added in v1.0.7
type DBInterface interface { Close() error Len() int GetAll() ([]Bookmark, error) Get(id uint16) (Bookmark, error) Add(bookmark Bookmark) error UpdateTitle(id uint16, title string) error UpdateURL(id uint16, url string) error UpdateComment(id uint16, comment string) error AddTags(id uint16, tags []string) error RemoveTags(id uint16, tags []string) error ClearTags(id uint16) error Remove(id uint16) error }
Click to show internal directories.
Click to hide internal directories.