Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultConfigPath ¶ added in v0.242.0
DefaultConfigPath returns the absolute default path for the project config file, if possible.
The default path is determined by the FTL_CONFIG environment variable, if set, or by the presence of a Git repository. If the Git repository is found, the default path is the root of the repository with the filename "ftl-project.toml".
func MaybeCreateDefault ¶ added in v0.255.0
MaybeCreateDefault creates the ftl-project.toml file in the Git root if it does not already exist.
Types ¶
type Config ¶
type Config struct { // Path to the config file. Path string `toml:"-"` Global ConfigAndSecrets `toml:"global"` Modules map[string]ConfigAndSecrets `toml:"modules"` ModuleDirs []string `toml:"module-dirs"` ExternalDirs []string `toml:"external-dirs"` Commands Commands `toml:"commands"` FTLMinVersion string `toml:"ftl-min-version"` }
func LoadOrCreate ¶ added in v0.255.0
LoadOrCreate loads or creates the given configuration file.
func (Config) AbsModuleDirs ¶ added in v0.255.0
AbsModuleDirs returns the absolute path for the module-dirs field from the ftl-project.toml, unless that is not defined, in which case it defaults to the root directory.
type ConfigAndSecrets ¶
type URL ¶
A URL that supports marshalling and unmarshalling which is, very frustratingly, not possible with the stdlib url.URL.