moduleconfig

package
v0.322.0 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

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"`
	// 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"`
}

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 ModuleKotlinConfig

type ModuleKotlinConfig struct{}

ModuleKotlinConfig is language-specific configuration for Kotlin modules.

Jump to

Keyboard shortcuts

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