easybridge/mxlib/registration.go
2020-02-16 19:30:49 +01:00

26 lines
588 B
Go

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"`
}