Documentation
¶
Overview ¶
Configuration
Index ¶
- Constants
- Variables
- type AutoIncr
- type Firefox
- func (f Firefox) Config() *modules.BrowserConfig
- func (f *Firefox) GetCurFlavour() *browsers.BrowserDef
- func (f *Firefox) GetProfile() *profiles.Profile
- func (*Firefox) GetProfiles(flavour string) ([]*profiles.Profile, error)
- func (f *Firefox) Init(ctx *modules.Context, p *profiles.Profile) error
- func (firefox *Firefox) ListFlavours() []browsers.BrowserDef
- func (f Firefox) ModInfo() modules.ModInfo
- func (f *Firefox) PreLoad(_ *modules.Context) error
- func (ff *Firefox) Run()
- func (f *Firefox) Shutdown() error
- func (f *Firefox) UseProfile(p *profiles.Profile, flv *browsers.BrowserDef) error
- func (f *Firefox) Watch() *watch.WatchDescriptor
- func (f *Firefox) WatchAllProfiles() bool
- type FirefoxConfig
- type MozBookmark
- type MozFolder
Constants ¶
const ( DefaultProfile = "default" // Default flavour to use BrowserName = "firefox" )
const ( WatchMinJobInterval = 1500 * time.Millisecond TagsBranchName = mozilla.TagsBranchName // name of the `tags` branch in the node tree )
const (
FirefoxProfileFlag = "ff-profile"
)
Variables ¶
Functions ¶
This section is empty.
Types ¶
type Firefox ¶
type Firefox struct {
*FirefoxConfig
// All elements stored in URLIndex
URLIndexList []string
parsing.Counter
// contains filtered or unexported fields
}
func NewFirefox ¶
func NewFirefox() *Firefox
func (Firefox) Config ¶
func (f Firefox) Config() *modules.BrowserConfig
func (*Firefox) GetCurFlavour ¶
func (f *Firefox) GetCurFlavour() *browsers.BrowserDef
GetCurFlavour implements profiles.ProfileManager.
func (*Firefox) GetProfile ¶
func (*Firefox) GetProfiles ¶
GetProfiles implements the profiles.ProfileManager interface
func (*Firefox) ListFlavours ¶
func (firefox *Firefox) ListFlavours() []browsers.BrowserDef
func (*Firefox) PreLoad ¶
Firefox custom logic for preloading the bookmarks when the browser module starts. Implements modules.PreLoader interface.
func (*Firefox) UseProfile ¶
func (*Firefox) Watch ¶
func (f *Firefox) Watch() *watch.WatchDescriptor
func (*Firefox) WatchAllProfiles ¶
type FirefoxConfig ¶
type FirefoxConfig struct {
// Default data source name query options for `places.sqlite` db
PlacesDSN database.DsnOptions `toml:"-"`
modules.ProfilePrefs `toml:"profile-options" mapstructure:"profile-options"`
CustomProfiles []profiles.CustomProfile `toml:"custom-profiles" mapstructure:"custom-profiles"`
//TEST: ignore this field in config.Configurator interface
// Embed base browser config
*modules.BrowserConfig `toml:"-"`
}
FirefoxConfig implements the Configurator interface which allows it to register and set field through the Configurator.
It is also used alongside cmd_flags.go to dynamically register cli flags that can change this config (struct fields) from command line at runtime.
The struct schema defines the parameters to pass on to firefox that can be overriden by users. Options defined here will automatically supported in the config.toml file as well as the command line flags. New command line flags or config file options will only be accepted if they are defined here.
var ( // firefox global config state. FFConfig *FirefoxConfig FirefoxProfileManager = mozilla.NewMozProfileManager( ffProfileLoader, ) )
func NewFirefoxConfig ¶
func NewFirefoxConfig() *FirefoxConfig
type MozBookmark ¶
type MozBookmark = mozilla.MozBookmark