query

package
v12.0.5 Latest Latest
Warning

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

Go to latest
Published: May 22, 2023 License: GPL-3.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetVersionDiff added in v12.0.5

func GetVersionDiff(oldVersion, newVersion string) (left, right string)

func RemoveInvalidTargets

func RemoveInvalidTargets(targets []string, mode parser.TargetMode) []string

Types

type AURWarnings

type AURWarnings struct {
	Orphans    []string
	OutOfDate  []string
	Missing    []string
	LocalNewer []string
	Ignore     stringset.StringSet
	// contains filtered or unexported fields
}

func NewWarnings

func NewWarnings(logger *text.Logger) *AURWarnings

func (*AURWarnings) AddToWarnings added in v12.0.4

func (warnings *AURWarnings) AddToWarnings(remote map[string]alpm.IPackage, aurPkg *aur.Pkg)

func (*AURWarnings) CalculateMissing added in v12.0.4

func (warnings *AURWarnings) CalculateMissing(remoteNames []string, remote map[string]alpm.IPackage, aurData map[string]*aur.Pkg)

func (*AURWarnings) Print

func (warnings *AURWarnings) Print()

type Builder

type Builder interface {
	Len() int
	Execute(ctx context.Context, dbExecutor db.Executor, pkgS []string)
	Results(dbExecutor db.Executor, verboseSearch SearchVerbosity) error
	GetTargets(include, exclude intrange.IntRanges, otherExclude stringset.StringSet) ([]string, error)
}

type ErrAURSearch

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

ErrAURSearch means that it was not possible to connect to the AUR.

func (ErrAURSearch) Error

func (e ErrAURSearch) Error() string

type ErrNoQuery

type ErrNoQuery struct{}

ErrNoQuery means that query was not executed.

func (ErrNoQuery) Error

func (e ErrNoQuery) Error() string

type Pkg

type Pkg = aur.Pkg

func AURInfo

func AURInfo(ctx context.Context, aurClient rpc.ClientInterface, names []string, warnings *AURWarnings, splitN int) ([]Pkg, error)

Queries the aur for information about specified packages. All packages should be queried in a single aur request except when the number of packages exceeds the number set in config.RequestSplitN. If the number does exceed config.RequestSplitN multiple aur requests will be performed concurrently.

func AURInfoPrint

func AURInfoPrint(ctx context.Context, aurClient rpc.ClientInterface, names []string, splitN int) ([]Pkg, error)

type SearchVerbosity

type SearchVerbosity int
const (
	NumberMenu SearchVerbosity = iota
	Detailed
	Minimal
)

Verbosity settings for search.

type SourceQueryBuilder

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

func NewSourceQueryBuilder

func NewSourceQueryBuilder(
	aurClient aur.QueryClient,
	logger *text.Logger,
	sortBy string,
	targetMode parser.TargetMode,
	searchBy string,
	bottomUp,
	singleLineResults bool,
	separateSources bool,
) *SourceQueryBuilder

func (*SourceQueryBuilder) Execute

func (s *SourceQueryBuilder) Execute(ctx context.Context, dbExecutor db.Executor, pkgS []string)

func (*SourceQueryBuilder) GetTargets

func (s *SourceQueryBuilder) GetTargets(include, exclude intrange.IntRanges,
	otherExclude stringset.StringSet,
) ([]string, error)

func (*SourceQueryBuilder) Len

func (s *SourceQueryBuilder) Len() int

func (*SourceQueryBuilder) Results

func (s *SourceQueryBuilder) Results(dbExecutor db.Executor, verboseSearch SearchVerbosity) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳