diff options
Diffstat (limited to 'connector/external/config.go')
-rw-r--r-- | connector/external/config.go | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/connector/external/config.go b/connector/external/config.go new file mode 100644 index 0000000..caa2b7e --- /dev/null +++ b/connector/external/config.go @@ -0,0 +1,50 @@ +package external + +import ( + . "git.deuxfleurs.fr/Deuxfleurs/easybridge/connector" +) + +const DUMMYEXT_PROTOCOL = "DummyExt" +const MESSENGER_PROTOCOL = "Messenger" + +func init() { + Register(DUMMYEXT_PROTOCOL, Protocol{ + NewConnector: func() Connector { + return &External{ + protocol: DUMMYEXT_PROTOCOL, + command: "./external/dummy.py", + debug: true, + } + }, + Schema: ConfigSchema{ + &ConfigEntry{ + Name: "user", + Description: "Username", + Required: true, + }, + }, + }) + + Register(MESSENGER_PROTOCOL, Protocol{ + NewConnector: func() Connector { + return &External{ + protocol: MESSENGER_PROTOCOL, + command: "./external/messenger.py", + debug: true, + } + }, + Schema: ConfigSchema{ + &ConfigEntry{ + Name: "email", + Description: "Email address", + Required: true, + }, + &ConfigEntry{ + Name: "password", + Description: "Password", + IsPassword: true, + Required: true, + }, + }, + }) +} |