paths

package
v0.0.47 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

paths manages the paths to the various files Armaria cares about. Armaria stores its bookmarks in a SQLite DB and its config in a TOML file. Both of these files need to be stored somewhere. This file contains the logic to figure out where to store those files. It also keeps track of where manifest files need to be installed for browser extensions.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ChromeManifest

func ChromeManifest() (string, error)

ChromeManifest gets the path to the Chrome app manifest. The path is different per platform and maps to the following: - Linux: ~/.config/google-chrome/NativeMessagingHosts - Windows: ~/AppData/Local/Armaria - Mac: ~/Library/Application Support/Google/Chrome

func ChromiumManifest added in v0.0.7

func ChromiumManifest() (string, error)

Chromium Manifest gets the path to the Chromium app manifest. The path is different per platform and maps to the following: - Linux: ~/.config/chromium/NativeMessagingHosts - Windows: ~/AppData/Local/Armaria - Mac: ~/Library/Application Support/Chromium

func Config

func Config() (string, error)

Config gets the path to the config file. The config file is a TOML file located at getFolderPath() + "bookmarks.db".

func Database

func Database(inputPath null.NullString, configPath string) (string, error)

Database gets the path to the bookmarks database. The path will be (in order of precedence): 1) The inputted path 2) The path in the config file 3) The default path (getFolderPath() + "bookmarks.db")

func FirefoxManifest

func FirefoxManifest() (string, error)

FirefoxManifest gets the path to the Firefox app manifest. The path is different per platform and maps to the following: - Linux: ~/.mozilla/native-messaging-hosts - Windows: ~/AppData/Local/Armaria - Mac: ~/Library/Application Support/Mozilla/NativeMessagingHosts

func Folder

func Folder() (string, error)

Folder gets the path to the folder the config (and by default) the database are stored. The folder is different per platform and maps to the following: - Linux: ~/.armaria - Windows: ~/AppData/Local/Armaria - Mac: ~/Library/Application Support/Armaria

func Host

func Host() (string, error)

Host will get the path to the native messaging host. The extensions need an absolute path to it in order to work.

Types

This section is empty.

Jump to

Keyboard shortcuts

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