settings

package
v12.4.2 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2024 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var HideMenus = false

HideMenus indicates if pacman's provider menus must be hidden.

View Source
var NoConfirm = false

NoConfirm indicates if user input should be skipped.

Functions

func DefaultMigrations

func DefaultMigrations() []configMigration

func GetConfigPath

func GetConfigPath() string

Types

type Configuration

type Configuration struct {
	AURURL                 string `json:"aururl"`
	AURRPCURL              string `json:"aurrpcurl"`
	BuildDir               string `json:"buildDir"`
	Editor                 string `json:"editor"`
	EditorFlags            string `json:"editorflags"`
	MakepkgBin             string `json:"makepkgbin"`
	MakepkgConf            string `json:"makepkgconf"`
	PacmanBin              string `json:"pacmanbin"`
	PacmanConf             string `json:"pacmanconf"`
	ReDownload             string `json:"redownload"`
	AnswerClean            string `json:"answerclean"`
	AnswerDiff             string `json:"answerdiff"`
	AnswerEdit             string `json:"answeredit"`
	AnswerUpgrade          string `json:"answerupgrade"`
	GitBin                 string `json:"gitbin"`
	GpgBin                 string `json:"gpgbin"`
	GpgFlags               string `json:"gpgflags"`
	MFlags                 string `json:"mflags"`
	SortBy                 string `json:"sortby"`
	SearchBy               string `json:"searchby"`
	GitFlags               string `json:"gitflags"`
	RemoveMake             string `json:"removemake"`
	SudoBin                string `json:"sudobin"`
	SudoFlags              string `json:"sudoflags"`
	Version                string `json:"version"`
	RequestSplitN          int    `json:"requestsplitn"`
	CompletionInterval     int    `json:"completionrefreshtime"`
	MaxConcurrentDownloads int    `json:"maxconcurrentdownloads"`
	BottomUp               bool   `json:"bottomup"`
	SudoLoop               bool   `json:"sudoloop"`
	TimeUpdate             bool   `json:"timeupdate"`
	Devel                  bool   `json:"devel"`
	CleanAfter             bool   `json:"cleanAfter"`
	KeepSrc                bool   `json:"keepSrc"`
	Provides               bool   `json:"provides"`
	PGPFetch               bool   `json:"pgpfetch"`
	CleanMenu              bool   `json:"cleanmenu"`
	DiffMenu               bool   `json:"diffmenu"`
	EditMenu               bool   `json:"editmenu"`
	CombinedUpgrade        bool   `json:"combinedupgrade"`
	UseAsk                 bool   `json:"useask"`
	BatchInstall           bool   `json:"batchinstall"`
	SingleLineResults      bool   `json:"singlelineresults"`
	SeparateSources        bool   `json:"separatesources"`
	Debug                  bool   `json:"debug"`
	UseRPC                 bool   `json:"rpc"`
	DoubleConfirm          bool   `json:"doubleconfirm"` // confirm install before and after build

	CompletionPath string `json:"-"`
	VCSFilePath    string `json:"-"`
	// ConfigPath     string `json:"-"`
	SaveConfig bool               `json:"-"`
	Mode       parser.TargetMode  `json:"-"`
	ReBuild    parser.RebuildMode `json:"rebuild"`
}

Configuration stores yay's config.

func DefaultConfig

func DefaultConfig(version string) *Configuration

func NewConfig

func NewConfig(logger *text.Logger, configPath, version string) (*Configuration, error)

func (*Configuration) ParseCommandLine

func (c *Configuration) ParseCommandLine(a *parser.Arguments) error

func (*Configuration) RunMigrations

func (c *Configuration) RunMigrations(logger *text.Logger, migrations []configMigration,
	configPath, newVersion string,
) error

func (*Configuration) Save

func (c *Configuration) Save(configPath, version string) error

SaveConfig writes yay config to file.

func (*Configuration) String

func (c *Configuration) String() string

type ErrPrivilegeElevatorNotFound

type ErrPrivilegeElevatorNotFound struct {
	// contains filtered or unexported fields
}

func (*ErrPrivilegeElevatorNotFound) Error

type ErrRuntimeDir

type ErrRuntimeDir struct {
	// contains filtered or unexported fields
}

func (*ErrRuntimeDir) Error

func (e *ErrRuntimeDir) Error() string

type ErrUserAbort

type ErrUserAbort struct{}

func (ErrUserAbort) Error

func (e ErrUserAbort) Error() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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