Documentation ¶
Index ¶
- func FindConfigFlagsInArgsOrFallbackOnEnv(args []string) string
- func InjectEnvVars(settings *Settings)
- func SetDefaults(settings *Settings)
- type Settings
- func (settings *Settings) BoardManagerAdditionalUrls() []string
- func (s *Settings) DaemonPort() string
- func (settings *Settings) DataDir() *paths.Path
- func (settings *Settings) DownloaderConfig() (downloader.Config, error)
- func (settings *Settings) DownloadsDir() *paths.Path
- func (settings *Settings) ExtraUserAgent() string
- func (s *Settings) GetBuildCacheExtraPaths() paths.PathList
- func (s *Settings) GetBuildCachePath() (*paths.Path, bool)
- func (s *Settings) GetBuildCacheTTL() time.Duration
- func (s *Settings) GetCompilationsBeforeBuildCachePurge() uint
- func (settings *Settings) HardwareDirectories() paths.PathList
- func (settings *Settings) IDEBuiltinLibrariesDir() *paths.Path
- func (settings *Settings) LibrariesDir() *paths.Path
- func (s *Settings) LibraryEnableUnsafeInstall() bool
- func (s *Settings) Locale() string
- func (s *Settings) LoggingFile() *paths.Path
- func (s *Settings) LoggingFormat() string
- func (s *Settings) LoggingLevel() string
- func (settings *Settings) NetworkProxy() (*url.URL, error)
- func (settings *Settings) NewHttpClient() (*http.Client, error)
- func (s *Settings) NoColor() bool
- func (settings *Settings) PackagesDir() *paths.Path
- func (settings *Settings) ProfilesCacheDir() *paths.Path
- func (settings *Settings) SketchAlwaysExportBinaries() bool
- func (s *Settings) UpdaterEnableNotification() bool
- func (settings *Settings) UserAgent() string
- func (settings *Settings) UserDir() *paths.Path
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FindConfigFlagsInArgsOrFallbackOnEnv ¶ added in v1.0.4
FindConfigFlagsInArgsOrFallbackOnEnv returns the config file path using the argument '--config-file' (if specified), if empty looks for the ARDUINO_CONFIG_FILE env, or looking in the current working dir
func InjectEnvVars ¶
func InjectEnvVars(settings *Settings)
InjectEnvVars change settings based on the environment variables values
func SetDefaults ¶
func SetDefaults(settings *Settings)
SetDefaults sets the default values for certain keys
Types ¶
type Settings ¶
type Settings struct { *configmap.Map Defaults *configmap.Map }
Settings contains the configuration of the Arduino CLI core service
func NewSettings ¶
func NewSettings() *Settings
NewSettings creates a new instance of Settings with the default values set
func (*Settings) BoardManagerAdditionalUrls ¶
func (*Settings) DaemonPort ¶
func (*Settings) DataDir ¶
func (settings *Settings) DataDir() *paths.Path
DataDir returns the full path to the data directory
func (*Settings) DownloaderConfig ¶
DownloaderConfig returns the downloader configuration based on current settings.
func (*Settings) DownloadsDir ¶
func (settings *Settings) DownloadsDir() *paths.Path
DownloadsDir returns the full path to the download cache directory
func (*Settings) ExtraUserAgent ¶
ExtraUserAgent returns the extended user-agent section provided via configuration settings
func (*Settings) GetBuildCacheExtraPaths ¶
func (s *Settings) GetBuildCacheExtraPaths() paths.PathList
GetBuildCacheExtraPaths returns the extra paths to the build cache. Those paths are visited to look for precompiled items if not found elsewhere.
func (*Settings) GetBuildCachePath ¶
GetBuildCachePath returns the path to the build cache.
func (*Settings) GetBuildCacheTTL ¶
GetBuildCacheTTL returns the time-to-live of the build cache (i.e. the minimum age to wait before purging the cache).
func (*Settings) GetCompilationsBeforeBuildCachePurge ¶
GetCompilationsBeforeBuildCachePurge returns the number of compilations before the build cache is purged.
func (*Settings) HardwareDirectories ¶
func (settings *Settings) HardwareDirectories() paths.PathList
HardwareDirectories returns all paths that may contains hardware packages.
func (*Settings) IDEBuiltinLibrariesDir ¶
func (settings *Settings) IDEBuiltinLibrariesDir() *paths.Path
IDEBuiltinLibrariesDir returns the IDE-bundled libraries path. Usually this directory is present in the Arduino IDE.
func (*Settings) LibrariesDir ¶
func (settings *Settings) LibrariesDir() *paths.Path
LibrariesDir returns the full path to the user directory containing custom libraries
func (*Settings) LibraryEnableUnsafeInstall ¶
func (*Settings) LoggingFile ¶
func (s *Settings) LoggingFile() *paths.Path
func (*Settings) LoggingFormat ¶
func (*Settings) LoggingLevel ¶
func (*Settings) NetworkProxy ¶
NetworkProxy returns the proxy configuration (mainly used by HTTP clients)
func (*Settings) NewHttpClient ¶
NewHttpClient returns a new http client for use in the arduino-cli
func (*Settings) PackagesDir ¶
func (settings *Settings) PackagesDir() *paths.Path
PackagesDir returns the full path to the packages folder
func (*Settings) ProfilesCacheDir ¶
func (settings *Settings) ProfilesCacheDir() *paths.Path
ProfilesCacheDir returns the full path to the profiles cache directory (it contains all the platforms and libraries used to compile a sketch using profiles)
func (*Settings) SketchAlwaysExportBinaries ¶
SketchAlwaysExportBinaries returns true if the compile command should export binaries by default.