Make builtin the default pluginType

This commit is contained in:
Jeffrey Regan
2019-03-18 10:17:55 -07:00
parent 449b1b68e0
commit 3a7c8a03f4
3 changed files with 70 additions and 29 deletions

View File

@@ -271,9 +271,15 @@ type GeneratorOptions struct {
DisableNameSuffixHash bool `json:"disableNameSuffixHash,omitempty" yaml:"disableNameSuffixHash,omitempty"`
}
type PluginType string
func (p PluginType) IsUndefined() bool {
return p == PluginType("")
}
// KVSource represents a KV plugin backend.
type KVSource struct {
PluginType string `json:"pluginType,omitempty" yaml:"pluginType,omitempty"`
Name string `json:"name,omitempty" yaml:"name,omitempty"`
Args []string `json:"args,omitempty" yaml:"args,omitempty"`
PluginType PluginType `json:"pluginType,omitempty" yaml:"pluginType,omitempty"`
Name string `json:"name,omitempty" yaml:"name,omitempty"`
Args []string `json:"args,omitempty" yaml:"args,omitempty"`
}