diff options
author | Chris <ccbrown112@gmail.com> | 2017-11-30 18:20:29 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-11-30 18:20:29 -0600 |
commit | d879a7621f5a441beea0eef8fd436e868b8fccfd (patch) | |
tree | 6cda838a18c9207b77634a7b2979592ed305f9f1 /model/manifest.go | |
parent | 422292eea08c21e5cbd85d4d22524a7caea5ecdc (diff) | |
download | chat-d879a7621f5a441beea0eef8fd436e868b8fccfd.tar.gz chat-d879a7621f5a441beea0eef8fd436e868b8fccfd.tar.bz2 chat-d879a7621f5a441beea0eef8fd436e868b8fccfd.zip |
recommit: ordered plugin settings (#7919) (#7926)
Diffstat (limited to 'model/manifest.go')
-rw-r--r-- | model/manifest.go | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/model/manifest.go b/model/manifest.go index 12f105aaa..121d3e0d2 100644 --- a/model/manifest.go +++ b/model/manifest.go @@ -31,6 +31,9 @@ type PluginOption struct { } type PluginSetting struct { + // The key that the setting will be assigned to in the configuration file. + Key string `json:"key" yaml:"key"` + // The display name for the setting. DisplayName string `json:"display_name" yaml:"display_name"` @@ -76,8 +79,8 @@ type PluginSettingsSchema struct { // Optional text to display below the settings. Footer string `json:"footer" yaml:"footer"` - // A mapping of setting keys to schema definitions. - Settings map[string]*PluginSetting `json:"settings" yaml:"settings"` + // A list of setting definitions. + Settings []*PluginSetting `json:"settings" yaml:"settings"` } // The plugin manifest defines the metadata required to load and present your plugin. The manifest @@ -93,11 +96,11 @@ type PluginSettingsSchema struct { // executable: myplugin // settings_schema: // settings: -// enable_extra_thing: -// type: bool -// display_name: Enable Extra Thing -// help_text: When true, an extra thing will be enabled! -// default: false +// - key: enable_extra_thing +// type: bool +// display_name: Enable Extra Thing +// help_text: When true, an extra thing will be enabled! +// default: false type Manifest struct { // The id is a globally unique identifier that represents your plugin. Reverse-DNS notation // using a name you control is a good option. For example, "com.mycompany.myplugin". @@ -126,6 +129,8 @@ type Manifest struct { type ManifestBackend struct { // The path to your executable binary. This should be relative to the root of your bundle and the // location of the manifest file. + // + // On Windows, this file must have a ".exe" extension. Executable string `json:"executable" yaml:"executable"` } |