aboutsummaryrefslogtreecommitdiff
path: root/mxlib/registration.go
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2020-02-16 19:30:49 +0100
committerAlex Auvolat <alex@adnab.me>2020-02-16 19:30:49 +0100
commit046ec6380b7bb363e537ade7fd254b5505dde32d (patch)
tree05d8778d02a0c815d75491937e1e41a906450a58 /mxlib/registration.go
parent225fc84f097aa615239df6deece647a19794234a (diff)
downloadeasybridge-046ec6380b7bb363e537ade7fd254b5505dde32d.tar.gz
easybridge-046ec6380b7bb363e537ade7fd254b5505dde32d.zip
Some infrastructure
Diffstat (limited to 'mxlib/registration.go')
-rw-r--r--mxlib/registration.go25
1 files changed, 25 insertions, 0 deletions
diff --git a/mxlib/registration.go b/mxlib/registration.go
new file mode 100644
index 0000000..d4b18dc
--- /dev/null
+++ b/mxlib/registration.go
@@ -0,0 +1,25 @@
+package mxlib
+
+import (
+ _ "gopkg.in/yaml.v2"
+)
+
+type Registration struct {
+ Id string `yaml:"id"`
+ Url string `yaml:"url"`
+ AsToken string `yaml:"as_token"`
+ HsToken string `yaml:"hs_token"`
+ SenderLocalpart string `yaml:"sender_localpart"`
+ Namespaces RegistrationNamespaceSet `yaml:"namespaces"`
+}
+
+type RegistrationNamespaceSet struct {
+ Users []RegistrationNamespace `yaml:"users"`
+ Aliases []RegistrationNamespace `yaml:"aliases"`
+ Rooms []RegistrationNamespace `yaml:"rooms"`
+}
+
+type RegistrationNamespace struct {
+ Exclusive bool `yaml:"exclusive"`
+ Regex string `yaml:"regex"`
+}