Documentation ¶
Overview ¶
Armaria is a fast, open, and local first bookmarks manager.
Index ¶
- Constants
- Variables
- 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 GetParentNames(ID string, options *getParentNameOptions) ([]string, error)
- func InstallManifestChrome() error
- func InstallManifestChromium() error
- func InstallManifestFirefox() error
- func ListTags(options *listTagsOptions) ([]string, error)
- func RemoveBook(id string, options *removeBookOptions) (err error)
- func RemoveFolder(id string, options *removeFolderOptions) error
- func UpdateConfig(update UpdateConfigCallback) error
- type Book
- func AddBook(url string, options *addBookOptions) (Book, error)
- func AddFolder(name string, options *addFolderOptions) (Book, error)
- func AddTags(id string, tags []string, options *addTagsOptions) (Book, error)
- func GetBook(id string, options *getBookOptions) (book Book, err error)
- func ListBooks(options *listBookOptions) ([]Book, error)
- func RemoveTags(id string, tags []string, options *removeTagsOptions) (Book, error)
- func UpdateBook(id string, options *updateBookOptions) (Book, error)
- func UpdateFolder(id string, options *updateFolderOptions) (Book, error)
- type Config
- type Direction
- type Order
- type UpdateConfigCallback
Constants ¶
const DirectionAsc = db.DirectionAsc
const DirectionDesc = db.DirectionDesc
const OrderManual = db.OrderManual
const OrderModified = db.OrderModified
const OrderName = db.OrderName
Variables ¶
var ( // ErrNoUpdate is returned when an update is requested with no updates. ErrNoUpdate = errors.New("no update") // ErrBookNotFound is returned when a target bookmark was not found. ErrBookNotFound = errors.New("bookmark not found") // ErrFolderNotFound is returned when a target folder was not found. ErrFolderNotFound = errors.New("folder not found") // ErrTagNotFound is returned when a target tag was not found. ErrTagNotFound = errors.New("tag not found") // ErrNotFound is returned when a target bookmark or folder was not found. ErrNotFound = errors.New("bookmark or folder not found") // ErrURLTooShort is returned when a provided URL is too short. ErrURLTooShort = errors.New("URL too short") // ErrURLTooLong is too long when a provided URL is too long. ErrURLTooLong = errors.New("URL too long") // ErrNameTooShort is returned when a provided name is too short. ErrNameTooShort = errors.New("name too short") // ErrNameTooLong is returned when a provided name is too long. ErrNameTooLong = errors.New("name too long") // ErrDescriptionTooShort is returned when a provided description is too short. ErrDescriptionTooShort = errors.New("description too short") // ErrDescriptionTooLong is returned when a provided description is too long. ErrDescriptionTooLong = errors.New("description too long") // ErrTagTooShort is returned when a provided tag is too short. ErrTagTooShort = errors.New("tag too short") // ErrTagTooLong is returned when a provided tag is too long. ErrTagTooLong = errors.New("tag too long") // ErrDuplicateTag is returned when a tag is applied twice to a bookmark. ErrDuplicateTag = errors.New("tags must be unique") // ErrTooManyTags is returned when too many tags have been applied to bookmark. ErrTooManyTags = errors.New("too many tags") // ErrTagInvalidChar is returned when a provided tag has an invalid character. ErrTagInvalidChar = errors.New("tag had invalid chars") // ErrFirstTooSmall is returned when a provided first is too small. ErrFirstTooSmall = errors.New("first too small") // ErrInvalidOrder is returned when a provided order is invalid. ErrInvalidOrder = errors.New("invalid order") // ErrInvalidDirection is returned when a provided direction is invalid. ErrInvalidDirection = errors.New("invalid direction") // ErrQueryTooShort is returned when a provided query is too short. ErrQueryTooShort = errors.New("query too short") // ErrInvalidOrdering is returned previous book >= next book for manual ordering. ErrInvalidOrdering = errors.New("invalid ordering") )
var ErrConfigMissing = config.ErrConfigMissing
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 ¶
func DefaultGetBookOptions() *getBookOptions
DefaultGetBookOptions are the default options for GetBook.
func DefaultGetParentNameOptions ¶
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 GetParentNames ¶
GetParentNames gets the parent names of a bookmark or folder.
func InstallManifestChrome ¶
func InstallManifestChrome() error
InstallManifestChrome installs the app manifest for Firefox.
func InstallManifestChromium ¶
func InstallManifestChromium() error
InstallManifestChromium installs the app manifest for Firefox.
func InstallManifestFirefox ¶
func InstallManifestFirefox() error
InstallManifestFirefox installs the app manifest for Firefox.
func RemoveBook ¶
RemoveBook removes a bookmark from the bookmarks database.
func RemoveFolder ¶
RemoveFolder removes a folder from 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.
Types ¶
type Book ¶
type Book struct { ID string // unique identifier of a bookmark/folder URL *string // address of a bookmark; not used for folders Name string // name of a bookmark/folder Description *string // description of a bookmark/folder ParentID *string // optional ID of the parent folder for a bookmark/folder IsFolder bool // true if folder, and false otherwise ParentName *string // name of parent folder if bookmark/folder has one Tags []string // tags applied to the bookmark Order string // user managed order of the bookmark }
Book is a bookmark or folder.
func RemoveTags ¶
RemoveTags removes tags from a bookmark in the bookmarks database.
func UpdateBook ¶
UpdateBook updates a bookmark in the bookmarks database.
func UpdateFolder ¶
UpdateFolder updates a folder in the bookmarks database.
type UpdateConfigCallback ¶
type UpdateConfigCallback = config.UpdateConfigCallback
Source Files ¶
- add_book.go
- add_folder.go
- add_tags.go
- book.go
- config.go
- direction.go
- doc.go
- errors.go
- get_book.go
- get_config.go
- get_parent_names.go
- install_manfiest.go
- list_books.go
- list_tags.go
- order.go
- remove_book.go
- remove_folder.go
- remove_tags.go
- to_book.go
- update_book.go
- update_config.go
- update_folder.go
- validators.go