Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrToolNotInstalled = errors.New("tool not installed")
Functions ¶
This section is empty.
Types ¶
type Include ¶ added in v0.25.0
func (*Include) UnmarshalJSON ¶ added in v0.25.0
type Lock ¶ added in v0.25.0
type Lock struct {
Tools Tools `json:"tools"`
Remotes []RemoteSpec `json:"remotes"`
}
type ModuleInfo ¶
type Pin ¶ added in v0.43.0
type Pin struct {
CommitHash string `json:"commit_hash,omitempty"`
Assets []PinnedAsset `json:"assets,omitempty"`
}
Pin holds the supply-chain verification data for a tool. Exactly one field is populated per runtime:
- go-runtime → CommitHash (from proxy.golang.org Origin.Hash)
- gh-runtime → Assets (per-platform SHA256 archive digests)
type PinnedAsset ¶ added in v0.43.0
type PinnedAsset struct {
OS string `json:"os"`
Arch string `json:"arch"`
Name string `json:"name"`
Digest string `json:"digest"` // "sha256:<hex64>" from asset.GetDigest()
}
PinnedAsset holds the expected SHA256 digest for a single platform binary archive.
type RemoteSpec ¶ added in v0.25.0
type RemoteSpec struct {
Source string `json:"source"`
Spec Spec `json:"spec"`
Tags []string `json:"tags"`
}
func (*RemoteSpec) UnmarshalJSON ¶ added in v0.25.0
func (r *RemoteSpec) UnmarshalJSON(bb []byte) error
type Spec ¶ added in v0.25.0
type Spec struct {
// This dir is store all toolset-related files.
// This directory should be managed by toolset only.
// Deprecated: do not use this field. All tools stored into global cache directory.
Dir string `json:"dir,omitempty"`
Tools Tools `json:"tools"`
Includes []Include `json:"includes"`
}
func (*Spec) AddInclude ¶ added in v0.25.0
type Tool ¶
type Tool struct {
// Name of runtime
Runtime string `json:"runtime"`
// Path to module with version
Module string `json:"module"`
// Alias create a link in tools. Works like exposing some tools
Alias optional.Val[string] `json:"alias"`
Tags []string `json:"tags"`
// Pin holds supply-chain verification data. Empty for unpinned tools.
Pin optional.Val[Pin] `json:"pin"`
}
func (Tool) IsSame ¶
IsSame returns true when it detects that this is the same tools. It does not check tool version.
func (Tool) ModuleName ¶ added in v0.32.0
func (Tool) RuntimeName ¶ added in v0.33.0
type Tools ¶
type Tools []Tool
func (*Tools) Add ¶
Add will add tool to list if that tool not exists yet. Returns true when tool was added.
func (*Tools) UpsertTool ¶ added in v0.25.0
UpsertTool adds the tool if it does not exist, or replaces it if it does. Returns true if the tool was newly added, false if an existing entry was updated.
Click to show internal directories.
Click to hide internal directories.