2020-07-05 02:45:23 +02:00
|
|
|
package settings
|
|
|
|
|
2020-07-05 03:17:35 +02:00
|
|
|
import (
|
2021-01-30 12:52:50 +01:00
|
|
|
"net/http"
|
|
|
|
|
2020-07-05 15:34:27 +02:00
|
|
|
"github.com/Morganamilo/go-pacmanconf"
|
2020-08-18 01:19:51 +02:00
|
|
|
|
2021-05-13 07:27:24 +02:00
|
|
|
"github.com/Jguer/aur"
|
|
|
|
|
2020-08-21 02:39:52 +02:00
|
|
|
"github.com/Jguer/yay/v10/pkg/settings/exe"
|
|
|
|
"github.com/Jguer/yay/v10/pkg/vcs"
|
2020-07-05 03:17:35 +02:00
|
|
|
)
|
|
|
|
|
2020-07-05 02:45:23 +02:00
|
|
|
type TargetMode int
|
|
|
|
|
|
|
|
const (
|
|
|
|
ModeAny TargetMode = iota
|
|
|
|
ModeAUR
|
|
|
|
ModeRepo
|
|
|
|
)
|
|
|
|
|
|
|
|
type Runtime struct {
|
2020-07-05 03:17:35 +02:00
|
|
|
Mode TargetMode
|
|
|
|
SaveConfig bool
|
|
|
|
CompletionPath string
|
|
|
|
ConfigPath string
|
2020-07-05 15:34:27 +02:00
|
|
|
PacmanConf *pacmanconf.Config
|
2020-08-21 02:39:52 +02:00
|
|
|
VCSStore *vcs.InfoStore
|
|
|
|
CmdBuilder *exe.CmdBuilder
|
|
|
|
CmdRunner exe.Runner
|
2021-01-30 12:52:50 +01:00
|
|
|
HTTPClient *http.Client
|
2021-05-13 07:27:24 +02:00
|
|
|
AURClient *aur.Client
|
2020-07-05 02:45:23 +02:00
|
|
|
}
|