config

package
v0.3.11 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2023 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EditConfig

func EditConfig() error

func GetConfigDir

func GetConfigDir() string

func InitConfig

func InitConfig() error

func SaveConfig added in v0.2.0

func SaveConfig(conf *Config) error

Types

type Config

type Config struct {
	CurrentContext string    `yaml:"current_context"`
	Contexts       []Context `yaml:"contexts"`
	Proxy          Proxy     `yaml:"proxy"`
	NoProxy        NoProxy   `yaml:"no_proxy"`
}

func LoadConfig

func LoadConfig() (*Config, error)

func (Config) GetWay added in v0.2.0

func (c Config) GetWay() []config.Node

type Context added in v0.2.0

type Context struct {
	Name string        `yaml:"name"`
	Way  []config.Node `yaml:"way"`
}

type NoProxy added in v0.2.0

type NoProxy struct {
	List     []string `yaml:"list"`
	FromEnv  []string `yaml:"from_env"`
	FromFile []string `yaml:"from_file"`
}

func (*NoProxy) GetList added in v0.2.0

func (n *NoProxy) GetList() []string

type Proxy

type Proxy struct {
	Host string `yaml:"host"`
	Port uint32 `yaml:"port"`
}

Jump to

Keyboard shortcuts

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