config

package
v0.13.1 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2025 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	AutoUpdate   *time.Duration
	CACerts      []*x509.Certificate
	Color        core.Color
	DNSServer    *url.URL
	Format       core.Format
	Headers      []core.KeyVal
	HTTP         core.HTTPVersion
	IgnoreStatus *bool
	Image        core.ImageSetting
	Insecure     *bool
	NoEncode     *bool
	NoPager      *bool
	Proxy        *url.URL
	QueryParams  []core.KeyVal
	Redirects    *int
	Silent       *bool
	Timeout      *time.Duration
	TLS          *uint16
	Verbosity    *int
	// contains filtered or unexported fields
}

Config represents the configuration options for fetch.

func (*Config) Merge

func (c *Config) Merge(c2 *Config)

Merge merges the two Configs together, with "c" taking priority.

func (*Config) ParseAutoUpdate added in v0.7.3

func (c *Config) ParseAutoUpdate(value string) error

func (*Config) ParseCACerts added in v0.11.0

func (c *Config) ParseCACerts(value string) error

func (*Config) ParseColor

func (c *Config) ParseColor(value string) error

func (*Config) ParseDNSServer

func (c *Config) ParseDNSServer(value string) error

func (*Config) ParseFormat

func (c *Config) ParseFormat(value string) error

func (*Config) ParseHTTP

func (c *Config) ParseHTTP(value string) error

func (*Config) ParseHeader

func (c *Config) ParseHeader(value string) error

func (*Config) ParseIgnoreStatus

func (c *Config) ParseIgnoreStatus(value string) error

func (*Config) ParseImageSetting added in v0.8.0

func (c *Config) ParseImageSetting(value string) error

func (*Config) ParseInsecure

func (c *Config) ParseInsecure(value string) error

func (*Config) ParseNoEncode

func (c *Config) ParseNoEncode(value string) error

func (*Config) ParseNoPager

func (c *Config) ParseNoPager(value string) error

func (*Config) ParseProxy

func (c *Config) ParseProxy(value string) error

func (*Config) ParseQuery

func (c *Config) ParseQuery(value string) error

func (*Config) ParseRedirects

func (c *Config) ParseRedirects(value string) error

func (*Config) ParseSilent

func (c *Config) ParseSilent(value string) error

func (*Config) ParseTLS

func (c *Config) ParseTLS(value string) error

func (*Config) ParseTimeout

func (c *Config) ParseTimeout(value string) error

func (*Config) ParseVerbosity

func (c *Config) ParseVerbosity(value string) error

func (*Config) Set

func (c *Config) Set(key, val string) error

Set sets the provided key and value pair, returning any error encountered.

type File

type File struct {
	Global *Config
	Hosts  map[string]*Config
	Path   string
}

File represents a configuration file.

func GetFile

func GetFile(path string) (*File, error)

GetFile returns a config File, or nil if one cannot be found.

Jump to

Keyboard shortcuts

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