Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AbsModuleConfig ¶ added in v0.269.0
type AbsModuleConfig ModuleConfig
AbsModuleConfig is a ModuleConfig with all paths made absolute.
This is a type alias to prevent accidental use of the wrong type.
type ModuleConfig ¶
type ModuleConfig struct { // Dir is the absolute path to the root of the module. Dir string `toml:"-"` Language string `toml:"language"` Realm string `toml:"realm"` Module string `toml:"module"` // Build is the command to build the module. Build string `toml:"build"` // Deploy is the list of files to deploy relative to the DeployDir. Deploy []string `toml:"deploy"` // DeployDir is the directory to deploy from, relative to the module directory. DeployDir string `toml:"deploy-dir"` // GeneratedSchemaDir is the directory to generate protobuf schema files into. These can be picked up by language specific build tools GeneratedSchemaDir string `toml:"generated-schema-dir"` // Schema is the name of the schema file relative to the DeployDir. Schema string `toml:"schema"` // Errors is the name of the error file relative to the DeployDir. Errors string `toml:"errors"` // Watch is the list of files to watch for changes. Watch []string `toml:"watch"` Go ModuleGoConfig `toml:"go,optional"` Kotlin ModuleKotlinConfig `toml:"kotlin,optional"` Java ModuleJavaConfig `toml:"java,optional"` }
ModuleConfig is the configuration for an FTL module.
Module config files are currently TOML.
func LoadModuleConfig ¶
func LoadModuleConfig(dir string) (ModuleConfig, error)
LoadModuleConfig from a directory.
func (ModuleConfig) Abs ¶ added in v0.269.0
func (c ModuleConfig) Abs() AbsModuleConfig
Abs creates a clone of ModuleConfig with all paths made absolute.
This function will panic if any paths are not beneath the module directory. This should never happen under normal use, as LoadModuleConfig performs this validation separately. This is just a sanity check.
func (ModuleConfig) String ¶ added in v0.269.0
func (c ModuleConfig) String() string
type ModuleGoConfig ¶
type ModuleGoConfig struct{}
ModuleGoConfig is language-specific configuration for Go modules.
type ModuleJavaConfig ¶ added in v0.330.0
type ModuleJavaConfig struct{}
ModuleJavaConfig is language-specific configuration for Java modules.
type ModuleKotlinConfig ¶
type ModuleKotlinConfig struct{}
ModuleKotlinConfig is language-specific configuration for Kotlin modules.