errbot.core_plugins.webserver module¶
-
class
errbot.core_plugins.webserver.
Webserver
(*args, **kwargs)[source]¶ Bases:
errbot.botplugin.BotPlugin
-
activate
()[source]¶ Triggered on plugin activation.
Override this method if you want to do something at initialization phase (don’t forget to super().activate()).
-
check_configuration
(configuration)[source]¶ By default, this method will do only a BASIC check. You need to override it if you want to do more complex checks. It will be called before the configure callback. Note if the config_template is None, it will never be called.
It means recusively:
- in case of a dictionary, it will check if all the entries and from the same type are there and not more.
- in case of an array or tuple, it will assume array members of the same type of first element of the template (no mix typed is supported)
In case of validation error it should raise a errbot.utils.ValidationException
Parameters: configuration – the configuration to be checked.
-
deactivate
()[source]¶ Triggered on plugin deactivation.
Override this method if you want to do something at tear-down phase (don’t forget to super().deactivate()).
-
get_configuration_template
()[source]¶ If your plugin needs a configuration, override this method and return a configuration template.
For example a dictionary like: return {‘LOGIN’ : ‘example@example.com’, ‘PASSWORD’ : ‘password’}
Note: if this method returns None, the plugin won’t be configured
-
-
errbot.core_plugins.webserver.
make_ssl_certificate
(key_path, cert_path)[source]¶ Generate a self-signed certificate
The generated key will be written out to key_path, with the corresponding certificate itself being written to cert_path. :param cert_path: path where to write the certificate. :param key_path: path where to write the key.