@cryptotaxi247 / kubo / commits / a04a85892

go-ipfs-config: add plugins config section

* Allow users to store plugin specific config options. * Allow users to disable specific plugins. Eventually, we can use this to allow loading plugins from non-standard locations.

Steven Allen committed Aug 29, 2019 at 10:15 UTC a04a858922618fcb0164c5c13f4564aca4de88b0
2 files changed +12
config/config.go
+1
@@ -30,6 +30,7 @@ type Config struct {
30 Provider Provider
31 Reprovider Reprovider
32 Experimental Experiments
33 + Plugins Plugins
34 }
35
36 const (
config/plugins.go new
+11
@@ -0,0 +1,11 @@
1 +package config
2 +
3 +type Plugins struct {
4 + Plugins map[string]Plugin `json:",omitempty"`
5 + // TODO: Loader Path? Leaving that out for now due to security concerns.
6 +}
7 +
8 +type Plugin struct {
9 + Disabled bool
10 + Config interface{}
11 +}