Documentation
¶
Overview ¶
Package profiles ...
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetFlavour ¶
func GetFlavour(pm ProfileManager, baseDir string) string
GetFlavour Returns flavour of browser given a normalized browser base dir TEST: DEAD:
Types ¶
type BrowserDef ¶
type BrowserDef = browsers.BrowserDef
type CustomProfile ¶ added in v1.2.0
type INIProfileLoader ¶
type INIProfileLoader struct {
// The absolute path to the directory where profiles.ini is located
BasePath string
ProfilesFile string
}
func (*INIProfileLoader) GetPath ¶
func (pg *INIProfileLoader) GetPath() string
func (*INIProfileLoader) SetBaseDir ¶
func (pg *INIProfileLoader) SetBaseDir(dir string)
type PathResolver ¶
PathResolver allows custom path resolution for profiles
type Profile ¶
type Profile struct {
// Unique identifier for the profile
ID string
// Name of the profile
// This is usually the name of the directory where the profile is stored
Name string
// path to profile
// relative when IsRelative is true
Path string
IsRelative bool
// Base dir of the profile
BaseDir string
IsCustom bool
}
func FromCustom ¶ added in v1.2.0
func FromCustom(list []CustomProfile, flavour string) []*Profile
func (Profile) AbsolutePath ¶
func (Profile) ShortBaseDir ¶ added in v1.2.0
returns shortcut for path
type ProfileManager ¶
type ProfileManager interface {
// Returns all profiles for a given flavour
GetProfiles(flavour string) ([]*Profile, error)
// If should watch all profiles
WatchAllProfiles() bool
// Notifies the module to use a custom profile and flavour
UseProfile(p *Profile, f *BrowserDef) error
// Get current active profile
GetProfile() *Profile
// Returns all flavours supported by this module
ListFlavours() []BrowserDef
// Get current active flavour
GetCurFlavour() *BrowserDef
}
ProfileManager is any module that can detect or list profiles, usually a browser module. One profile manager should be created for each browser flavour.
Click to show internal directories.
Click to hide internal directories.