toolkit

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2026 License: Apache-2.0 Imports: 16 Imported by: 0

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