configuration

package
v1.0.4-rc.1 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2024 License: GPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FindConfigFlagsInArgsOrFallbackOnEnv added in v1.0.4

func FindConfigFlagsInArgsOrFallbackOnEnv(args []string) string

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 *Settings) BoardManagerAdditionalUrls() []string

func (*Settings) DaemonPort

func (s *Settings) DaemonPort() string

func (*Settings) DataDir

func (settings *Settings) DataDir() *paths.Path

DataDir returns the full path to the data directory

func (*Settings) DownloaderConfig

func (settings *Settings) DownloaderConfig() (downloader.Config, error)

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

func (settings *Settings) ExtraUserAgent() string

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

func (s *Settings) GetBuildCachePath() (*paths.Path, bool)

GetBuildCachePath returns the path to the build cache.

func (*Settings) GetBuildCacheTTL

func (s *Settings) GetBuildCacheTTL() time.Duration

GetBuildCacheTTL returns the time-to-live of the build cache (i.e. the minimum age to wait before purging the cache).

func (*Settings) GetCompilationsBeforeBuildCachePurge

func (s *Settings) GetCompilationsBeforeBuildCachePurge() uint

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 (s *Settings) LibraryEnableUnsafeInstall() bool

func (*Settings) Locale

func (s *Settings) Locale() string

func (*Settings) LoggingFile

func (s *Settings) LoggingFile() *paths.Path

func (*Settings) LoggingFormat

func (s *Settings) LoggingFormat() string

func (*Settings) LoggingLevel

func (s *Settings) LoggingLevel() string

func (*Settings) NetworkProxy

func (settings *Settings) NetworkProxy() (*url.URL, error)

NetworkProxy returns the proxy configuration (mainly used by HTTP clients)

func (*Settings) NewHttpClient

func (settings *Settings) NewHttpClient() (*http.Client, error)

NewHttpClient returns a new http client for use in the arduino-cli

func (*Settings) NoColor

func (s *Settings) NoColor() bool

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

func (settings *Settings) SketchAlwaysExportBinaries() bool

SketchAlwaysExportBinaries returns true if the compile command should export binaries by default.

func (*Settings) UpdaterEnableNotification

func (s *Settings) UpdaterEnableNotification() bool

func (*Settings) UserAgent

func (settings *Settings) UserAgent() string

UserAgent returns the user agent (mainly used by HTTP clients)

func (*Settings) UserDir

func (settings *Settings) UserDir() *paths.Path

UserDir returns the full path to the user directory

Jump to

Keyboard shortcuts

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