generate

package
v1.6.1 Latest Latest
Warning

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

Go to latest
Published: May 22, 2022 License: MIT Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Controller

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

func New

func New(configFinder finder.ConfigFinder, configReader reader.ConfigReader, registInstaller registry.Installer, gh githubSvc.RepositoryService, fs afero.Fs, fuzzyFinder FuzzyFinder) *Controller

func (*Controller) Generate

func (ctrl *Controller) Generate(ctx context.Context, logE *logrus.Entry, param *config.Param, args ...string) error

Generate searches packages in registries and outputs the configuration to standard output. If no package is specified, the interactive fuzzy finder is launched. If the package supports, the latest version is gotten by GitHub API.

type FindingPackage

type FindingPackage struct {
	PackageInfo  *config.PackageInfo
	RegistryName string
}

type FuzzyFinder added in v1.6.1

type FuzzyFinder interface {
	Find(pkgs []*FindingPackage) ([]int, error)
}

func NewFuzzyFinder added in v1.6.1

func NewFuzzyFinder() FuzzyFinder

func NewMockFuzzyFinder added in v1.6.1

func NewMockFuzzyFinder(idxs []int, err error) FuzzyFinder

Jump to

Keyboard shortcuts

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