easybridge/mxlib/registration.go

27 lines
798 B
Go
Raw Normal View History

2020-02-16 19:30:49 +01:00
package mxlib
import (
_ "gopkg.in/yaml.v2"
)
type Registration struct {
2020-02-17 19:02:26 +01:00
Id string `yaml:"id"`
Url string `yaml:"url"`
AsToken string `yaml:"as_token"`
HsToken string `yaml:"hs_token"`
SenderLocalpart string `yaml:"sender_localpart"`
2020-02-23 20:24:50 +01:00
RateLimited bool `yaml:"rate_limited"`
2020-02-17 19:02:26 +01:00
Namespaces RegistrationNamespaceSet `yaml:"namespaces"`
2020-02-16 19:30:49 +01:00
}
type RegistrationNamespaceSet struct {
2020-02-17 19:02:26 +01:00
Users []RegistrationNamespace `yaml:"users"`
2020-02-16 19:30:49 +01:00
Aliases []RegistrationNamespace `yaml:"aliases"`
2020-02-17 19:02:26 +01:00
Rooms []RegistrationNamespace `yaml:"rooms"`
2020-02-16 19:30:49 +01:00
}
type RegistrationNamespace struct {
2020-02-17 19:02:26 +01:00
Exclusive bool `yaml:"exclusive"`
Regex string `yaml:"regex"`
2020-02-16 19:30:49 +01:00
}