packagefirewall

package
v3.17.0 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2026 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConfigPaths added in v3.17.0

func ConfigPaths(eco Ecosystem, home string) []string

ConfigPaths returns the candidate config files inspected for an ecosystem. (Go is detected separately via netrc + the GOPROXY environment.)

func ProxyURL

func ProxyURL(base string, eco Ecosystem) string

func ProxyURLWithSlash

func ProxyURLWithSlash(base string, eco Ecosystem) string

func RequireWriter

func RequireWriter(eco Ecosystem) error

Types

type ConfigFile

type ConfigFile struct {
	Path       string
	Content    string
	Structured bool
}

func ConfigFiles

func ConfigFiles(eco Ecosystem, opts ConfigOptions) ([]ConfigFile, error)

type ConfigOptions

type ConfigOptions struct {
	HomeDir  string
	ProxyURL string
	OrgID    string
	APIKey   string
}

type Detected added in v3.17.0

type Detected struct {
	Ecosystem  Ecosystem
	Configured bool
	Path       string // the config file that matched, when Configured
}

Detected reports whether a package manager's config points at the firewall.

func Detect added in v3.17.0

func Detect(home, proxyHost string) []Detected

Detect scans each ecosystem's config files for the firewall host and returns the per-ecosystem result. Ecosystems without an automatic writer are skipped.

type Ecosystem

type Ecosystem struct {
	ID          string
	Command     string
	DisplayName string
	Prefix      string
	Tier        Tier
	LiveWriter  bool
}

func All

func All() []Ecosystem

func ByCommand

func ByCommand(command string) (Ecosystem, bool)

type Tier

type Tier string
const (
	TierCommunity  Tier = "community"
	TierPro        Tier = "pro"
	TierEnterprise Tier = "enterprise"
)

Jump to

Keyboard shortcuts

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