Enhance wasm plugins
Co-authored-by: Michael <[michael.matur@gmail.com](mailto:michael.matur@gmail.com)>
This commit is contained in:
parent
983940ae60
commit
e7d1a98c5e
14 changed files with 329 additions and 26 deletions
|
@ -10,6 +10,11 @@ const (
|
|||
typeProvider = "provider"
|
||||
)
|
||||
|
||||
type Settings struct {
|
||||
Envs []string `description:"Environment variables to forward to the wasm guest." json:"envs,omitempty" toml:"envs,omitempty" yaml:"envs,omitempty"`
|
||||
Mounts []string `description:"Directory to mount to the wasm guest." json:"mounts,omitempty" toml:"mounts,omitempty" yaml:"mounts,omitempty"`
|
||||
}
|
||||
|
||||
// Descriptor The static part of a plugin configuration.
|
||||
type Descriptor struct {
|
||||
// ModuleName (required)
|
||||
|
@ -17,12 +22,18 @@ type Descriptor struct {
|
|||
|
||||
// Version (required)
|
||||
Version string `description:"plugin's version." json:"version,omitempty" toml:"version,omitempty" yaml:"version,omitempty" export:"true"`
|
||||
|
||||
// Settings (optional)
|
||||
Settings Settings `description:"Plugin's settings (works only for wasm plugins)." json:"settings,omitempty" toml:"settings,omitempty" yaml:"settings,omitempty" export:"true"`
|
||||
}
|
||||
|
||||
// LocalDescriptor The static part of a local plugin configuration.
|
||||
type LocalDescriptor struct {
|
||||
// ModuleName (required)
|
||||
ModuleName string `description:"plugin's module name." json:"moduleName,omitempty" toml:"moduleName,omitempty" yaml:"moduleName,omitempty" export:"true"`
|
||||
ModuleName string `description:"Plugin's module name." json:"moduleName,omitempty" toml:"moduleName,omitempty" yaml:"moduleName,omitempty" export:"true"`
|
||||
|
||||
// Settings (optional)
|
||||
Settings Settings `description:"Plugin's settings (works only for wasm plugins)." json:"settings,omitempty" toml:"settings,omitempty" yaml:"settings,omitempty" export:"true"`
|
||||
}
|
||||
|
||||
// Manifest The plugin manifest.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue