tool

package
v0.18.4 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type License added in v0.17.0

type License struct {
	Name string `json:"name" yaml:"name"`
	Link string `json:"link" yaml:"link"`
}

type Messages

type Messages struct {
	Internals string `json:"internals" yaml:"internals"`
	Usage     string `json:"usage" yaml:"usage"`
	Update    string `json:"update" yaml:"update"`
}

type PathRewrite added in v0.15.0

type PathRewrite struct {
	Source    string
	Target    string
	Operation string
	Abort     bool
}

type Renovate

type Renovate struct {
	Datasource     string `json:"datasource" yaml:"datasource"`
	Package        string `json:"package" yaml:"package"`
	ExtractVersion string `json:"extractVersion,omitempty" yaml:"extractVersion,omitempty"`
	Versioning     string `json:"versioning,omitempty" yaml:"versioning,omitempty"`
}

type Tool

type Tool struct {
	SchemaVersion       string     `json:"schema_version,omitempty" yaml:"schema_version,omitempty"`
	Name                string     `json:"name" yaml:"name"`
	License             License    `json:"license" yaml:"license"`
	Version             string     `json:"version" yaml:"version"`
	Binary              string     `json:"binary,omitempty" yaml:"binary,omitempty"`
	Check               string     `json:"check,omitempty" yaml:"check"`
	Tags                []string   `json:"tags" yaml:"tags"`
	BuildDependencies   []string   `json:"build_dependencies,omitempty" yaml:"build_dependencies,omitempty"`
	RuntimeDependencies []string   `json:"runtime_dependencies,omitempty" yaml:"runtime_dependencies,omitempty"`
	Platforms           []string   `json:"platforms,omitempty" yaml:"platforms,omitempty"`
	ConflictsWith       []string   `json:"conflicts_with,omitempty" yaml:"conflicts_with,omitempty"`
	Homepage            string     `json:"homepage,omitempty" yaml:"homepage,omitempty"`
	Repository          string     `json:"repository" yaml:"repository"`
	Description         string     `json:"description" yaml:"description"`
	Messages            Messages   `json:"messages,omitempty" yaml:"messages,omitempty"`
	Renovate            Renovate   `json:"renovate,omitempty" yaml:"renovate,omitempty"`
	Status              ToolStatus `json:"status,omitempty" yaml:"status,omitempty"`
}

func (*Tool) CreateMarkerFile

func (tool *Tool) CreateMarkerFile(markerFileDirectory string) error

func (*Tool) GetBinaryStatus

func (tool *Tool) GetBinaryStatus() error

func (*Tool) GetMarkerFileStatus

func (tool *Tool) GetMarkerFileStatus(markerFileDirectory string) error

func (*Tool) GetVersionStatus

func (tool *Tool) GetVersionStatus() error

func (*Tool) HasBuildDependency

func (tool *Tool) HasBuildDependency(term string) bool

func (*Tool) HasRuntimeDependency

func (tool *Tool) HasRuntimeDependency(term string) bool

func (*Tool) HasTag

func (tool *Tool) HasTag(term string) bool

func (*Tool) Inspect

func (tool *Tool) Inspect(w io.Writer, layer []byte, rules []PathRewrite) error

func (*Tool) Install

func (tool *Tool) Install(w io.Writer, layer []byte, rules []PathRewrite, patchFile func(path string) string) ([]string, error)

func (*Tool) List

func (tool *Tool) List(w io.Writer)

func (*Tool) MatchesBuildDependency

func (tool *Tool) MatchesBuildDependency(term string) bool

func (*Tool) MatchesName

func (tool *Tool) MatchesName(term string) bool

func (*Tool) MatchesRuntimeDependency

func (tool *Tool) MatchesRuntimeDependency(term string) bool

func (*Tool) MatchesTag

func (tool *Tool) MatchesTag(term string) bool

func (*Tool) Print

func (tool *Tool) Print(w io.Writer)

func (*Tool) RemoveMarkerFile

func (tool *Tool) RemoveMarkerFile(markerFileDirectory string) error

func (*Tool) ReplaceVariables

func (tool *Tool) ReplaceVariables(target string, arch string, altArch string)

func (*Tool) RunVersionCheck

func (tool *Tool) RunVersionCheck() (string, error)

func (*Tool) ShowInternals

func (tool *Tool) ShowInternals(indentation int) string

func (*Tool) ShowUpdate

func (tool *Tool) ShowUpdate(indentation int) string

func (*Tool) ShowUsage

func (tool *Tool) ShowUsage(indentation int) string

type ToolStatus

type ToolStatus struct {
	BinaryPresent      bool
	Version            string
	VersionMatches     bool
	MarkerFilePresent  bool
	MarkerFileVersion  string
	SkipDueToConflicts bool
	IsRequested        bool
}

type Tools

type Tools struct {
	Tools []Tool `json:"tools" yaml:"tools"`
}

func LoadFromBytes

func LoadFromBytes(data []byte) (Tools, error)

func LoadFromFile

func LoadFromFile(filename string) (Tools, error)

func (*Tools) AddIfMissing

func (tools *Tools) AddIfMissing(newTool *Tool)

func (*Tools) Contains

func (tools *Tools) Contains(name string) bool

func (*Tools) Describe

func (tools *Tools) Describe(w io.Writer, name string) error

func (*Tools) Find

func (tools *Tools) Find(term string, searchInName bool, searchInTags bool, searchInDeps bool) Tools

func (*Tools) GetByName

func (tools *Tools) GetByName(name string) (*Tool, error)

func (*Tools) GetByNames

func (tools *Tools) GetByNames(names []string) Tools

func (*Tools) GetByTag

func (tools *Tools) GetByTag(tagName string) *Tools

func (*Tools) GetByTags

func (tools *Tools) GetByTags(tagNames []string) Tools

func (*Tools) GetNames

func (tools *Tools) GetNames() []string

func (*Tools) List

func (tools *Tools) List(w io.Writer)

func (*Tools) ListWithStatus

func (tools *Tools) ListWithStatus(w io.Writer)

func (*Tools) ResolveDependencies

func (tools *Tools) ResolveDependencies(queue *Tools, toolName string) error

Jump to

Keyboard shortcuts

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