Beispiel #1
0
def make_plugin(config):
    smtp_config = SmtpConfig(config)

    p = Plugin()
    p.username = smtp_config.username
    p.sendmail = SmtpSender(smtp_config)
    return p
Beispiel #2
0
def make_plugin(config):
    ident_config = IdentConfig(config)

    p = Plugin()
    factory = Factory()
    factory.protocol = IdentProtocol
    factory.user = ident_config.user

    p.add_service(internet.TCPServer(ident_config.port, factory))

    return p
Beispiel #3
0
def make_plugin(config):
    http_config = HttpConfig(config)

    root = resource.Resource()
    harold = resource.Resource()
    root.putChild('harold', harold)
    site = server.Site(root)
    site.displayTracebacks = False

    plugin = Plugin()
    plugin.root = harold
    plugin.secret = http_config.secret
    plugin.add_service(internet.TCPServer(http_config.port, site))
    return plugin
Beispiel #4
0
def make_plugin(config):
    http_config = HttpConfig(config)

    root = resource.Resource()
    harold = resource.Resource()
    root.putChild('harold', harold)
    site = server.Site(root)
    site.displayTracebacks = False

    endpoint = serverFromString(reactor, http_config.endpoint)
    service = internet.StreamServerEndpointService(endpoint, site)

    plugin = Plugin()
    plugin.root = harold
    plugin.secret = http_config.secret
    plugin.add_service(service)

    return plugin
Beispiel #5
0
def make_plugin(config):
    http_config = HttpConfig(config)

    root = resource.Resource()
    harold = resource.Resource()
    root.putChild('harold', harold)
    site = server.Site(root)
    site.displayTracebacks = False

    endpoint = serverFromString(reactor, http_config.endpoint)
    service = internet.StreamServerEndpointService(endpoint, site)

    plugin = Plugin()
    plugin.root = harold
    plugin.hmac_secret = http_config.hmac_secret
    plugin.add_service(service)

    return plugin
Beispiel #6
0
 def __init__(self, database):
     Plugin.__init__(self)
     self.database = database
Beispiel #7
0
 def __init__(self, database):
     Plugin.__init__(self)
     self.database = database
Beispiel #8
0
 def __init__(self, db_config):
     Plugin.__init__(self)
     self.module, kwargs = db_config.get_module_and_params()
     ConnectionPool.__init__(self, self.module.__name__, **kwargs)
Beispiel #9
0
 def __init__(self, db_config):
     Plugin.__init__(self)
     self.module, kwargs = db_config.get_module_and_params()
     ConnectionPool.__init__(self, self.module.__name__, **kwargs)