diff options
Diffstat (limited to 'connector/xmpp/config.go')
-rw-r--r-- | connector/xmpp/config.go | 59 |
1 files changed, 31 insertions, 28 deletions
diff --git a/connector/xmpp/config.go b/connector/xmpp/config.go index a5306b4..a6abfac 100644 --- a/connector/xmpp/config.go +++ b/connector/xmpp/config.go @@ -5,34 +5,37 @@ import ( ) func init() { - Register("xmpp", ConfigSchema{ - &ConfigEntry{ - Name: "jid", - Description: "JID", - Required: true, - }, - &ConfigEntry{ - Name: "password", - Description: "Password", - Required: true, - IsPassword: true, - }, - &ConfigEntry{ - Name: "nickname", - Description: "Nickname in MUCs", - Required: true, - }, - &ConfigEntry{ - Name: "port", - Description: "Port", - IsNumeric: true, - Default: "5222", - }, - &ConfigEntry{ - Name: "ssl", - Description: "Use SSL", - IsBoolean: true, - Default: "true", + Register("xmpp", Protocol{ + NewConnector: func() Connector { return &XMPP{} }, + Schema: ConfigSchema{ + &ConfigEntry{ + Name: "jid", + Description: "JID", + Required: true, + }, + &ConfigEntry{ + Name: "password", + Description: "Password", + Required: true, + IsPassword: true, + }, + &ConfigEntry{ + Name: "nickname", + Description: "Nickname in MUCs", + Required: true, + }, + &ConfigEntry{ + Name: "port", + Description: "Port", + IsNumeric: true, + Default: "5222", + }, + &ConfigEntry{ + Name: "ssl", + Description: "Use SSL", + IsBoolean: true, + Default: "true", + }, }, }) } |