package config
import "github.com/docker/cli/cli/config"
Index ¶
- Constants
- func ContextStoreDir() string
- func Dir() string
- func Load(configDir string) (*configfile.ConfigFile, error)
- func LoadDefaultConfigFile(stderr io.Writer) *configfile.ConfigFile
- func LoadFromReader(configData io.Reader) (*configfile.ConfigFile, error)
- func Path(p ...string) (string, error)
- func SetDir(dir string)
Constants ¶
const ( // ConfigFileName is the name of config file ConfigFileName = "config.json" )
Functions ¶
func ContextStoreDir ¶
func ContextStoreDir() string
ContextStoreDir returns the directory the docker contexts are stored in
func Dir ¶
func Dir() string
Dir returns the directory the configuration file is stored in
func Load ¶
func Load(configDir string) (*configfile.ConfigFile, error)
Load reads the configuration files in the given directory, and sets up the auth config information and returns values. FIXME: use the internal golang config parser
func LoadDefaultConfigFile ¶
func LoadDefaultConfigFile(stderr io.Writer) *configfile.ConfigFile
LoadDefaultConfigFile attempts to load the default config file and returns an initialized ConfigFile struct if none is found.
func LoadFromReader ¶
func LoadFromReader(configData io.Reader) (*configfile.ConfigFile, error)
LoadFromReader is a convenience function that creates a ConfigFile object from a reader
func Path ¶
Path returns the path to a file relative to the config dir
func SetDir ¶
func SetDir(dir string)
SetDir sets the directory the configuration file is stored in
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
cli/config/configfile | |
cli/config/credentials | |
cli/config/types |
- Version
- v24.0.0-rc.1+incompatible
- Published
- Apr 26, 2023
- Platform
- windows/amd64
- Imports
- 11 packages
- Last checked
- 9 minutes ago –
Tools for package owners.