software_finder

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2024 License: MIT Imports: 4 Imported by: 1

Documentation

Index

Constants

View Source
const (
	RegistryFinder FinderType = "RegistryFinder"
	PathFinder     FinderType = "PathFinder"

	RegistryKeyCurrentUser  = RegistryKey(registry.CURRENT_USER)
	RegistryKeyLocalMachine = RegistryKey(registry.LOCAL_MACHINE)

	PathTypeFile = iota
	PathTypeDir
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	ForType           FinderType
	RegistryKey       RegistryKey
	RegistryPath      string
	RegistryValueName string
	InstallPath       string
	PathType          PathType
}

type FileRepository added in v0.1.10

type FileRepository interface {
	FileExists(path string) (bool, error)
	DirExists(path string) (bool, error)
}

type FinderType added in v0.1.10

type FinderType string

type PathType

type PathType int

type RegistryKey added in v0.1.12

type RegistryKey registry.Key

type RegistryRepository

type RegistryRepository interface {
	GetStringValue(k registry.Key, path string, valueName string) (string, error)
}

type SoftwareFinder

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

func New added in v0.1.10

func New(repository RegistryRepository, fileRepository FileRepository) *SoftwareFinder

func (*SoftwareFinder) GetInstallDir

func (f *SoftwareFinder) GetInstallDir(config Config) (string, error)

func (*SoftwareFinder) GetInstallDirFromSomewhere

func (f *SoftwareFinder) GetInstallDirFromSomewhere(configs []Config) (string, error)

func (*SoftwareFinder) IsInstalled

func (f *SoftwareFinder) IsInstalled(config Config) (bool, error)

func (*SoftwareFinder) IsInstalledAnywhere

func (f *SoftwareFinder) IsInstalledAnywhere(configs []Config) (bool, error)

Jump to

Keyboard shortcuts

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