brewformulary

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: May 24, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PreloadedFormulary

type PreloadedFormulary interface {
	formula.Formulary
	ListNames() []string
}

PreloadedFormulary defines the formulary's capabilities.

type V1Cache

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

V1Cache represents formula data cached from the Homebrew API.

func FetchV1

func FetchV1(ctx context.Context, apiclient *brewapi.Client, dir string, autoUpdate *hopsv1.AutoUpdateConfig) (*V1Cache, error)

FetchV1 fetches the v1 index either from the cache or from the API according to its existence and the auto-update configuration.

func LoadV1

func LoadV1(dir string) (*V1Cache, error)

LoadV1 loads the v1 index from a cache directory.

func (*V1Cache) Aliases

func (index *V1Cache) Aliases() map[string]string

Aliases returns the map of aliases.

func (*V1Cache) FetchFormula

func (index *V1Cache) FetchFormula(_ context.Context, name string) (formula.MultiPlatformFormula, error)

FetchFormula implements formula.Formulary.

func (*V1Cache) Find

func (index *V1Cache) Find(name string) *brewv1.Info

Find finds a formula.

func (*V1Cache) List

func (index *V1Cache) List() brewv1.Index

List produces the contents of the index.

func (*V1Cache) ListNames

func (index *V1Cache) ListNames() []string

ListNames produces the names in the index.

func (*V1Cache) SearchFunc

func (index *V1Cache) SearchFunc(match func(*brewv1.Info) bool) []*brewv1.Info

SearchFunc searches the index and returns all formulae hits from the match function.

Jump to

Keyboard shortcuts

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