Documentation
¶
Index ¶
- type BrowserIconLoader
- type BrowserService
- func (b *BrowserService) AreWeTheDefaultBrowser() bool
- func (b *BrowserService) GetAvailableBrowsers() ([]linkquisition.Browser, error)
- func (b *BrowserService) GetDefaultBrowser() (linkquisition.Browser, error)
- func (b *BrowserService) GetIconForBrowser(browser linkquisition.Browser) ([]byte, error)
- func (b *BrowserService) MakeUsTheDefaultBrowser() error
- func (b *BrowserService) NewBrowser(command string) linkquisition.Browser
- func (b *BrowserService) OpenUrlWithBrowser(u string, browser *linkquisition.Browser) error
- func (b *BrowserService) OpenUrlWithDefaultBrowser(url string) error
- func (b *BrowserService) SetDefaultBrowser(browser linkquisition.Browser) error
- type DefaultBrowserIconLoader
- type DesktopEntry
- type DesktopEntryService
- type SettingsService
- func (s *SettingsService) GetConfigFilePath() string
- func (s *SettingsService) GetConfigFolderPath() string
- func (s *SettingsService) GetLogFilePath() string
- func (s *SettingsService) GetLogFolderPath() string
- func (s *SettingsService) GetPluginFolderPath() string
- func (s *SettingsService) GetSettings() *linkquisition.Settings
- func (s *SettingsService) IsConfigured() (bool, error)
- func (s *SettingsService) ReadSettings() (*linkquisition.Settings, error)
- func (s *SettingsService) ScanBrowsers() error
- func (s *SettingsService) WriteSettings(settings *linkquisition.Settings) error
- type XdgService
- func (x *XdgService) GetApplicationPaths() []string
- func (x *XdgService) GetDesktopEntryPathForBinary(binary string) (string, error)
- func (x *XdgService) GetDesktopEntryPathForFilename(name string) (string, error)
- func (x *XdgService) SettingsCheck(property, subProperty string) (string, error)
- func (x *XdgService) SettingsGet(property string) (string, error)
- func (x *XdgService) SettingsSet(property, value string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BrowserIconLoader ¶ added in v1.6.0
type BrowserIconLoader interface {
LoadIcon(browser linkquisition.Browser) ([]byte, error)
}
type BrowserService ¶
type BrowserService struct {
XdgService *XdgService
DesktopEntryService *DesktopEntryService
BrowserIconLoader BrowserIconLoader
}
func (*BrowserService) AreWeTheDefaultBrowser ¶
func (b *BrowserService) AreWeTheDefaultBrowser() bool
func (*BrowserService) GetAvailableBrowsers ¶
func (b *BrowserService) GetAvailableBrowsers() ([]linkquisition.Browser, error)
func (*BrowserService) GetDefaultBrowser ¶
func (b *BrowserService) GetDefaultBrowser() (linkquisition.Browser, error)
func (*BrowserService) GetIconForBrowser ¶ added in v1.6.0
func (b *BrowserService) GetIconForBrowser(browser linkquisition.Browser) ([]byte, error)
GetIconForBrowser returns the icon for the given browser
func (*BrowserService) MakeUsTheDefaultBrowser ¶
func (b *BrowserService) MakeUsTheDefaultBrowser() error
func (*BrowserService) NewBrowser ¶
func (b *BrowserService) NewBrowser(command string) linkquisition.Browser
func (*BrowserService) OpenUrlWithBrowser ¶
func (b *BrowserService) OpenUrlWithBrowser(u string, browser *linkquisition.Browser) error
func (*BrowserService) OpenUrlWithDefaultBrowser ¶
func (b *BrowserService) OpenUrlWithDefaultBrowser(url string) error
func (*BrowserService) SetDefaultBrowser ¶
func (b *BrowserService) SetDefaultBrowser(browser linkquisition.Browser) error
type DefaultBrowserIconLoader ¶ added in v1.6.0
type DefaultBrowserIconLoader struct {
XdgService *XdgService
DesktopEntryService *DesktopEntryService
}
func (*DefaultBrowserIconLoader) LoadIcon ¶ added in v1.6.0
func (l *DefaultBrowserIconLoader) LoadIcon(browser linkquisition.Browser) ([]byte, error)
type DesktopEntry ¶
type DesktopEntry struct {
Version string
Type string
Exec string
Terminal bool
XMultipleArgs bool
Icon string
StartupWMClass string
Categories string
MimeType string
StartupNotify bool
Actions string
Name string
}
DesktopEntry represents the "Desktop Entry" -section of a .desktop file.
See https://specifications.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html#desktop-entry-file @todo add support for translations
type DesktopEntryService ¶
type DesktopEntryService struct {
}
func (*DesktopEntryService) CreateFromPath ¶
func (d *DesktopEntryService) CreateFromPath(path string) (*DesktopEntry, error)
type SettingsService ¶
type SettingsService struct {
BrowserService linkquisition.BrowserService
}
func (*SettingsService) GetConfigFilePath ¶
func (s *SettingsService) GetConfigFilePath() string
func (*SettingsService) GetConfigFolderPath ¶
func (s *SettingsService) GetConfigFolderPath() string
func (*SettingsService) GetLogFilePath ¶
func (s *SettingsService) GetLogFilePath() string
func (*SettingsService) GetLogFolderPath ¶
func (s *SettingsService) GetLogFolderPath() string
func (*SettingsService) GetPluginFolderPath ¶
func (s *SettingsService) GetPluginFolderPath() string
func (*SettingsService) GetSettings ¶
func (s *SettingsService) GetSettings() *linkquisition.Settings
func (*SettingsService) IsConfigured ¶
func (s *SettingsService) IsConfigured() (bool, error)
func (*SettingsService) ReadSettings ¶
func (s *SettingsService) ReadSettings() (*linkquisition.Settings, error)
func (*SettingsService) ScanBrowsers ¶
func (s *SettingsService) ScanBrowsers() error
func (*SettingsService) WriteSettings ¶ added in v1.4.6
func (s *SettingsService) WriteSettings(settings *linkquisition.Settings) error
type XdgService ¶
type XdgService struct {
}
func (*XdgService) GetApplicationPaths ¶
func (x *XdgService) GetApplicationPaths() []string
func (*XdgService) GetDesktopEntryPathForBinary ¶
func (x *XdgService) GetDesktopEntryPathForBinary(binary string) (string, error)
func (*XdgService) GetDesktopEntryPathForFilename ¶
func (x *XdgService) GetDesktopEntryPathForFilename(name string) (string, error)
func (*XdgService) SettingsCheck ¶
func (x *XdgService) SettingsCheck(property, subProperty string) (string, error)
func (*XdgService) SettingsGet ¶
func (x *XdgService) SettingsGet(property string) (string, error)
func (*XdgService) SettingsSet ¶
func (x *XdgService) SettingsSet(property, value string) error
Click to show internal directories.
Click to hide internal directories.