gosuki/profiles/profiles.go
2023-09-09 13:33:37 +02:00

45 lines
808 B
Go

// Package profiles ...
package profiles
// go:build linux
const (
XDGHome = "XDG_CONFIG_HOME"
)
// ProfileManager is any module that can detect or list profiles, usually a browser module.
type ProfileManager interface {
// Get all profile details
GetProfiles() ([]*Profile, error)
// Returns the default profile if no profile is selected
GetDefaultProfile() (*Profile, error)
// Return that absolute path to a profile and follow symlinks
GetProfilePath(Profile) (string)
// If should watch all profiles
WatchAllProfiles() bool
// Use custom profile
UseProfile(p Profile) error
}
type Profile struct {
// Unique identifier for the profile
Id string
// Name of the profile
Name string
// relative path to profile
Path string
}
type PathGetter interface {
GetPath() string
}