toolkit

package
v0.9.9 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2026 License: Apache-2.0 Imports: 16 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package toolkit downloads and deploys diagnostic tools (rg, jq, yq) to remote servers.

Index

Constants

View Source
const (
	RemoteBinDir = ".shellguard/bin"
)

Variables

View Source
var ToolkitTools = []string{"rg", "jq", "yq"}

Functions

func BuildProbeCommand

func BuildProbeCommand() string

func DeployTools

func DeployTools(ctx context.Context, sftpClient ssh.SFTPClient, missing []string, arch string) (string, error)

func DownloadURL

func DownloadURL(tool, arch string) (url string, sha256Hex string, err error)

func EnsureLocal

func EnsureLocal(ctx context.Context, tool, arch string) (string, error)

func FormatMissingToolsMessage

func FormatMissingToolsMessage(missing []string, arch string) string

func NormalizeArch

func NormalizeArch(arch string) (string, error)

func ParseProbeOutput

func ParseProbeOutput(stdout string) (missing []string, arch string)

Types

type DownloadSpec

type DownloadSpec struct {
	URL     string
	SHA256  string
	Archive bool
}

Jump to

Keyboard shortcuts

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