Help us shape the future of Go! Take the 2026 Go Developer Survey

config

package
v0.35.2 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package config provides shared configuration types that are used across multiple packages. This package should have no dependencies on other vacuum packages to avoid import cycles.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateCustomHTTPClient added in v0.35.0

func CreateCustomHTTPClient(config HTTPClientConfig) (*http.Client, error)

CreateCustomHTTPClient creates an HTTP client with custom TLS configuration for certificate-based authentication and custom CA certificates.

func ShouldUseCustomHTTPClient added in v0.35.0

func ShouldUseCustomHTTPClient(config HTTPClientConfig) bool

ShouldUseCustomHTTPClient returns true if any TLS-related configuration is provided

Types

type FetchConfig

type FetchConfig struct {
	HTTPClientConfig                   // TLS configuration reused for fetch() requests
	AllowPrivateNetworks bool          // Allow localhost, 10.x, 192.168.x
	AllowHTTP            bool          // Allow HTTP (non-HTTPS) requests (separate from TLS skip)
	Timeout              time.Duration // Request timeout (default 30s)
}

FetchConfig contains configuration for JavaScript fetch() requests. Defined in config package to avoid import cycles between model and plugin packages.

func DefaultFetchConfig

func DefaultFetchConfig() *FetchConfig

DefaultFetchConfig returns secure defaults.

type HTTPClientConfig

type HTTPClientConfig struct {
	CertFile string
	KeyFile  string
	CAFile   string
	Insecure bool
}

HTTPClientConfig holds configuration for creating a custom HTTP client. This is used for TLS/certificate authentication with remote URLs.

Jump to

Keyboard shortcuts

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