/ examples / plugins / letsencrypt_example_plugins.py
letsencrypt_example_plugins.py
 1  """Example Let's Encrypt plugins.
 2  
 3  For full examples, see `letsencrypt.plugins`.
 4  
 5  """
 6  import zope.interface
 7  
 8  from letsencrypt import interfaces
 9  from letsencrypt.plugins import common
10  
11  
12  class Authenticator(common.Plugin):
13      """Example Authenticator."""
14      zope.interface.implements(interfaces.IAuthenticator)
15      zope.interface.classProvides(interfaces.IPluginFactory)
16  
17      description = "Example Authenticator plugin"
18  
19      # Implement all methods from IAuthenticator, remembering to add
20      # "self" as first argument, e.g. def prepare(self)...
21  
22  
23  class Installer(common.Plugin):
24      """Example Installer."""
25      zope.interface.implements(interfaces.IInstaller)
26      zope.interface.classProvides(interfaces.IPluginFactory)
27  
28      description = "Example Installer plugin"
29  
30      # Implement all methods from IInstaller, remembering to add
31      # "self" as first argument, e.g. def get_all_names(self)...