profiles

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2025 License: AGPL-3.0 Imports: 4 Imported by: 0

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

TEST: DEAD: Returns flavour of browser given a normalized browser base dir

Types

type BrowserDef

type BrowserDef = browsers.BrowserDef

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

type PathResolver interface {
	GetPath() string
	SetBaseDir(string)
}

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
}

func (Profile) AbsolutePath

func (p Profile) AbsolutePath() (string, error)

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.

Jump to

Keyboard shortcuts

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