aboutsummaryrefslogtreecommitdiff
path: root/connector/config.go
diff options
context:
space:
mode:
Diffstat (limited to 'connector/config.go')
-rw-r--r--connector/config.go21
1 files changed, 21 insertions, 0 deletions
diff --git a/connector/config.go b/connector/config.go
index e0fcf17..97e4556 100644
--- a/connector/config.go
+++ b/connector/config.go
@@ -43,3 +43,24 @@ func (c Configuration) GetBool(k string, deflt ...bool) (bool, error) {
}
return false, fmt.Errorf("Missing configuration key: %s", k)
}
+
+// ----
+
+type ConfigSchema []*ConfigEntry
+
+type ConfigEntry struct {
+ Name string
+ Description string
+ Default string
+ FixedValue string
+ Required bool
+ IsPassword bool
+ IsNumeric bool
+ IsBoolean bool
+}
+
+var Protocols = map[string]ConfigSchema{}
+
+func Register(name string, schema ConfigSchema) {
+ Protocols[name] = schema
+}