2020-07-05 02:45:23 +02:00
|
|
|
package settings
|
|
|
|
|
2020-07-05 03:17:35 +02:00
|
|
|
import (
|
2022-12-29 13:34:53 +01:00
|
|
|
"context"
|
2021-01-30 12:52:50 +01:00
|
|
|
"net/http"
|
|
|
|
|
2022-11-13 14:29:00 +01:00
|
|
|
"github.com/Jguer/yay/v11/pkg/db"
|
2022-03-07 00:48:15 +01:00
|
|
|
"github.com/Jguer/yay/v11/pkg/query"
|
2021-09-08 22:28:08 +02:00
|
|
|
"github.com/Jguer/yay/v11/pkg/settings/exe"
|
|
|
|
"github.com/Jguer/yay/v11/pkg/settings/parser"
|
|
|
|
"github.com/Jguer/yay/v11/pkg/vcs"
|
2022-11-16 00:25:17 +01:00
|
|
|
|
|
|
|
"github.com/Jguer/aur"
|
|
|
|
"github.com/Jguer/aur/metadata"
|
|
|
|
"github.com/Jguer/votar/pkg/vote"
|
|
|
|
"github.com/Morganamilo/go-pacmanconf"
|
2020-07-05 03:17:35 +02:00
|
|
|
)
|
|
|
|
|
2022-12-29 13:34:53 +01:00
|
|
|
type AURCache interface {
|
2022-12-29 19:42:43 +01:00
|
|
|
Get(ctx context.Context, query *metadata.AURQuery) ([]aur.Pkg, error)
|
2022-12-29 13:34:53 +01:00
|
|
|
}
|
|
|
|
|
2020-07-05 02:45:23 +02:00
|
|
|
type Runtime struct {
|
2021-08-08 00:08:04 +02:00
|
|
|
Mode parser.TargetMode
|
2022-03-07 00:48:15 +01:00
|
|
|
QueryBuilder query.Builder
|
2022-03-05 00:30:15 +01:00
|
|
|
Version string // current version of yay
|
2020-07-05 03:17:35 +02:00
|
|
|
SaveConfig bool
|
|
|
|
CompletionPath string
|
|
|
|
ConfigPath string
|
2020-07-05 15:34:27 +02:00
|
|
|
PacmanConf *pacmanconf.Config
|
2022-12-29 13:34:53 +01:00
|
|
|
VCSStore vcs.Store
|
2021-08-08 00:57:55 +02:00
|
|
|
CmdBuilder exe.ICmdBuilder
|
2021-01-30 12:52:50 +01:00
|
|
|
HTTPClient *http.Client
|
2021-05-13 07:27:24 +02:00
|
|
|
AURClient *aur.Client
|
2022-06-17 18:55:22 +02:00
|
|
|
VoteClient *vote.Client
|
2022-12-29 13:34:53 +01:00
|
|
|
AURCache AURCache
|
2022-11-13 14:29:00 +01:00
|
|
|
DBExecutor db.Executor
|
2020-07-05 02:45:23 +02:00
|
|
|
}
|