Documentation ¶
Overview ¶
armariaapi is the public API for armaria. Armaria is a fast, open, and local first bookmarks manager. The API makes heavy use of the options pattern: https://www.sohamkamani.com/golang/options-pattern/ Many of the types used by this API can be found in the armaria package.
Index ¶
- func AddBook(url string, options *addBookOptions) (armaria.Book, error)
- func AddFolder(name string, options *addFolderOptions) (armaria.Book, error)
- func AddTags(id string, tags []string, options *addTagsOptions) (armaria.Book, error)
- func DefaultAddBookOptions() *addBookOptions
- func DefaultAddFolderOptions() *addFolderOptions
- func DefaultAddTagsOptions() *addTagsOptions
- func DefaultGetBookOptions() *getBookOptions
- func DefaultGetParentNameOptions() *getParentNameOptions
- func DefaultListBooksOptions() *listBookOptions
- func DefaultListTagsOptions() *listTagsOptions
- func DefaultRemoveBookOptions() *removeBookOptions
- func DefaultRemoveFolderOptions() *removeFolderOptions
- func DefaultRemoveTagsOptions() *removeTagsOptions
- func DefaultUpdateBookOptions() *updateBookOptions
- func DefaultUpdateFolderOptions() *updateFolderOptions
- func GetBook(id string, options *getBookOptions) (book armaria.Book, err error)
- func GetConfig() (armaria.Config, error)
- func GetParentNames(ID string, options *getParentNameOptions) ([]string, error)
- func InstallManifestChrome() error
- func InstallManifestChromium() error
- func InstallManifestFirefox() error
- func ListBooks(options *listBookOptions) ([]armaria.Book, error)
- func ListTags(options *listTagsOptions) ([]string, error)
- func RemoveBook(id string, options *removeBookOptions) (err error)
- func RemoveFolder(id string, options *removeFolderOptions) error
- func RemoveTags(id string, tags []string, options *removeTagsOptions) (armaria.Book, error)
- func UpdateBook(id string, options *updateBookOptions) (armaria.Book, error)
- func UpdateConfig(update UpdateConfigCallback) error
- func UpdateFolder(id string, options *updateFolderOptions) (armaria.Book, error)
- type UpdateConfigCallback
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultAddBookOptions ¶
func DefaultAddBookOptions() *addBookOptions
DefaultAddBookOptions are the default options for AddBook.
func DefaultAddFolderOptions ¶
func DefaultAddFolderOptions() *addFolderOptions
DefaultAddFolderOptions are the default options for AddFolder.
func DefaultAddTagsOptions ¶
func DefaultAddTagsOptions() *addTagsOptions
DefaultAddTagsOptions are the default options for AddTags.
func DefaultGetBookOptions ¶ added in v0.0.17
func DefaultGetBookOptions() *getBookOptions
DefaultGetBookOptions are the default options for GetBook.
func DefaultGetParentNameOptions ¶ added in v0.0.17
func DefaultGetParentNameOptions() *getParentNameOptions
DefaultGetParentNameOptions are the default options for GetParentNames.
func DefaultListBooksOptions ¶
func DefaultListBooksOptions() *listBookOptions
DefaultListBooksOptions are the default options for ListBooks.
func DefaultListTagsOptions ¶
func DefaultListTagsOptions() *listTagsOptions
DefaultListTagsOptions are the default options for ListTags.
func DefaultRemoveBookOptions ¶
func DefaultRemoveBookOptions() *removeBookOptions
DefaultRemoveBookOptions are the default options for RemoveBook.
func DefaultRemoveFolderOptions ¶
func DefaultRemoveFolderOptions() *removeFolderOptions
DefaultRemoveFolderOptions are the default options for RemoveFolder.
func DefaultRemoveTagsOptions ¶
func DefaultRemoveTagsOptions() *removeTagsOptions
DefaultRemoveTagsOptions are the default options for RemoveTags.
func DefaultUpdateBookOptions ¶
func DefaultUpdateBookOptions() *updateBookOptions
DefaultUpdateBookOptions are the default options for UpdateBook.
func DefaultUpdateFolderOptions ¶
func DefaultUpdateFolderOptions() *updateFolderOptions
DefaultUpdateFolderOptions are the default options for UpdateFolder.
func GetConfig ¶
func GetConfig() (armaria.Config, error)
GetConfig gets the current config. If the sentinel error ErrConfigMissing then it doesn't exist.
func GetParentNames ¶ added in v0.0.17
GetParentNames gets the parent names of a bookmark or folder.
func InstallManifestChrome ¶
func InstallManifestChrome() error
InstallManifestChrome installs the app manifest for Firefox.
func InstallManifestChromium ¶ added in v0.0.7
func InstallManifestChromium() error
InstallManifestChromium installs the app manifest for Firefox.
func InstallManifestFirefox ¶
func InstallManifestFirefox() error
InstallManifestFirefox installs the app manifest for Firefox.
func ListBooks ¶
func ListBooks(options *listBookOptions) ([]armaria.Book, error)
ListBooks lists bookmarks and folders in the bookmarks database.
func RemoveBook ¶
RemoveBook removes a bookmark from the bookmarks database.
func RemoveFolder ¶
RemoveFolder removes a folder from the bookmarks database.
func RemoveTags ¶
RemoveTags removes tags from a bookmark in the bookmarks database.
func UpdateBook ¶
UpdateBook updates a bookmark in the bookmarks database.
func UpdateConfig ¶
func UpdateConfig(update UpdateConfigCallback) error
UpdateConfig updates the current config. It will be created if it hasn't already been created.
func UpdateFolder ¶
UpdateFolder updates a folder in the bookmarks database.
Types ¶
type UpdateConfigCallback ¶
type UpdateConfigCallback func(config *armaria.Config)
UpdateConfigCallback is a callback to update the current config