GNUnet 0.21.2
httpdomain.autohttp.tornado.AutoTornadoDirective Class Reference
Inheritance diagram for httpdomain.autohttp.tornado.AutoTornadoDirective:
[legend]
Collaboration diagram for httpdomain.autohttp.tornado.AutoTornadoDirective:
[legend]

Public Member Functions

def endpoints (self)
 
def undoc_endpoints (self)
 
def make_rst (self)
 
def run (self)
 
def endpoints (self)
 
def undoc_endpoints (self)
 
def make_rst (self)
 
def run (self)
 

Static Public Attributes

bool has_content = True
 
int required_arguments = 1
 
dictionary option_spec
 

Detailed Description

Definition at line 71 of file tornado.py.

Member Function Documentation

◆ endpoints() [1/2]

def httpdomain.autohttp.tornado.AutoTornadoDirective.endpoints (   self)

Definition at line 80 of file tornado.py.

80 def endpoints(self):
81 endpoints = self.options.get('endpoints', None)
82 if not endpoints:
83 return None
84 return frozenset(re.split(r'\s*,\s*', endpoints))
85
static int get
Get DID Documement for DID Flag.
Definition: gnunet-did.c:63

References get, GNUNET_SERVICE_Handle.options, GNUNET_CADET_ConnectionCreateMessage.options, InitMessage.options, GSC_Client.options, GNUNET_DHT_ClientGetMessage.options, GNUNET_DHT_ClientResultMessage.options, GNUNET_DHT_ClientPutMessage.options, GNUNET_DHT_MonitorPutMessage.options, GNUNET_DHT_MonitorGetMessage.options, GNUNET_DHT_MonitorGetRespMessage.options, GNUNET_DHT_GetHandle.options, GetActionContext.options, PeerPutMessage.options, PeerResultMessage.options, PeerGetMessage.options, RecentRequest.options, SearchMessage.options, GNUNET_FS_PublishContext.options, GNUNET_FS_SearchContext.options, GNUNET_FS_DownloadContext.options, GNUNET_FS_PublishKskContext.options, GSF_PendingRequestData.options, LookupMessage.options, GNUNET_GNS_LookupWithTldRequest.options, GNS_ResolverHandle.options, PeerstoreRecordMessage.options, GNUNET_PEERSTORE_StoreContext.options, and StartMessage.options.

Referenced by httpdomain.autohttp.bottle.AutobottleDirective.make_rst(), httpdomain.autohttp.tornado.AutoTornadoDirective.make_rst(), and httpdomain.autohttp.flask_base.AutoflaskBase.make_rst().

Here is the caller graph for this function:

◆ undoc_endpoints() [1/2]

def httpdomain.autohttp.tornado.AutoTornadoDirective.undoc_endpoints (   self)

◆ make_rst() [1/2]

def httpdomain.autohttp.tornado.AutoTornadoDirective.make_rst (   self)

Definition at line 93 of file tornado.py.

93 def make_rst(self):
94 app = import_object(self.arguments[0])
95 for method, path, handler in get_routes(app):
96 class_name = handler.__name__
97 method_name = getattr(handler, method).__name__
98 endpoint = '.'.join((class_name, method_name))
99
100 if self.endpoints and endpoint not in self.endpoints:
101 continue
102 if endpoint in self.undoc_endpoints:
103 continue
104
105 docstring = getattr(handler, method).__doc__ or ''
106 #if not isinstance(docstring, unicode):
107 # analyzer = ModuleAnalyzer.for_module(view.__module__)
108 # docstring = force_decode(docstring, analyzer.encoding)
109 if not docstring and 'include-empty-docstring' not in self.options:
110 continue
111 docstring = prepare_docstring(docstring)
112 for line in http_directive(method, normalize_path(path), docstring):
113 yield line
114
def http_directive(method, path, content)
Definition: common.py:25
def import_object(import_name)
Definition: common.py:15

References httpdomain.autohttp.bottle.AutobottleDirective.endpoints(), httpdomain.autohttp.flask_base.AutoflaskBase.endpoints(), httpdomain.autohttp.tornado.AutoTornadoDirective.endpoints(), httpdomain.autohttp.tornado.get_routes(), httpdomain.autohttp.common.http_directive(), httpdomain.autohttp.common.import_object(), httpdomain.autohttp.tornado.normalize_path(), GNUNET_SERVICE_Handle.options, GNUNET_CADET_ConnectionCreateMessage.options, InitMessage.options, GSC_Client.options, GNUNET_DHT_ClientGetMessage.options, GNUNET_DHT_ClientResultMessage.options, GNUNET_DHT_ClientPutMessage.options, GNUNET_DHT_MonitorPutMessage.options, GNUNET_DHT_MonitorGetMessage.options, GNUNET_DHT_MonitorGetRespMessage.options, GNUNET_DHT_GetHandle.options, GetActionContext.options, PeerPutMessage.options, PeerResultMessage.options, PeerGetMessage.options, RecentRequest.options, SearchMessage.options, GNUNET_FS_PublishContext.options, GNUNET_FS_SearchContext.options, GNUNET_FS_DownloadContext.options, GNUNET_FS_PublishKskContext.options, GSF_PendingRequestData.options, LookupMessage.options, GNUNET_GNS_LookupWithTldRequest.options, GNS_ResolverHandle.options, PeerstoreRecordMessage.options, GNUNET_PEERSTORE_StoreContext.options, StartMessage.options, httpdomain.autohttp.bottle.AutobottleDirective.undoc_endpoints(), httpdomain.autohttp.flask_base.AutoflaskBase.undoc_endpoints(), and httpdomain.autohttp.tornado.AutoTornadoDirective.undoc_endpoints().

Referenced by httpdomain.autohttp.bottle.AutobottleDirective.run(), httpdomain.autohttp.flask.AutoflaskDirective.run(), httpdomain.autohttp.flaskqref.QuickReferenceFlaskDirective.run(), and httpdomain.autohttp.tornado.AutoTornadoDirective.run().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ run() [1/2]

def httpdomain.autohttp.tornado.AutoTornadoDirective.run (   self)

Definition at line 115 of file tornado.py.

115 def run(self):
116 node = nodes.section()
117 node.document = self.state.document
118 result = ViewList()
119 for line in self.make_rst():
120 result.append(line, '<autotornado>')
121 nested_parse_with_titles(self.state, result, node)
122 return node.children
123
124
static void run(void *cls, char *const *args, const char *cfgfile, const struct GNUNET_CONFIGURATION_Handle *c)
Main function that will be run by the scheduler.
Definition: gnunet-arm.c:917

References httpdomain.autohttp.bottle.AutobottleDirective.make_rst(), httpdomain.autohttp.tornado.AutoTornadoDirective.make_rst(), httpdomain.autohttp.flask_base.AutoflaskBase.make_rst(), GNUNET_CONVERSATION_Caller.state, GNUNET_CONVERSATION_Phone.state, GNUNET_CONVERSATION_Call.state, Operation.state, Set.state, CadetChannel.state, CadetConnection.state, MonitorNotifyMessage.state, GNUNET_FS_UnindexContext.state, DownloadRequest.state, Socks5Request.state, GNUNET_MESSENGER_SrvRoom.state, GNUNET_MESSENGER_SrvTunnel.state, MhdConnectionHandle.state, OIDC_Variables.state, MonitoredPeer.state, and PeerResolutionContext.state.

Here is the call graph for this function:

◆ endpoints() [2/2]

def httpdomain.autohttp.tornado.AutoTornadoDirective.endpoints (   self)

◆ undoc_endpoints() [2/2]

def httpdomain.autohttp.tornado.AutoTornadoDirective.undoc_endpoints (   self)

◆ make_rst() [2/2]

def httpdomain.autohttp.tornado.AutoTornadoDirective.make_rst (   self)

Definition at line 93 of file tornado.py.

93 def make_rst(self):
94 app = import_object(self.arguments[0])
95 for method, path, handler in get_routes(app):
96 class_name = handler.__name__
97 method_name = getattr(handler, method).__name__
98 endpoint = '.'.join((class_name, method_name))
99
100 if self.endpoints and endpoint not in self.endpoints:
101 continue
102 if endpoint in self.undoc_endpoints:
103 continue
104
105 docstring = getattr(handler, method).__doc__ or ''
106 #if not isinstance(docstring, unicode):
107 # analyzer = ModuleAnalyzer.for_module(view.__module__)
108 # docstring = force_decode(docstring, analyzer.encoding)
109 if not docstring and 'include-empty-docstring' not in self.options:
110 continue
111 docstring = prepare_docstring(docstring)
112 for line in http_directive(method, normalize_path(path), docstring):
113 yield line
114

References httpdomain.autohttp.bottle.AutobottleDirective.endpoints(), httpdomain.autohttp.flask_base.AutoflaskBase.endpoints(), httpdomain.autohttp.tornado.AutoTornadoDirective.endpoints(), httpdomain.autohttp.tornado.get_routes(), httpdomain.autohttp.common.http_directive(), httpdomain.autohttp.common.import_object(), httpdomain.autohttp.tornado.normalize_path(), GNUNET_SERVICE_Handle.options, GNUNET_CADET_ConnectionCreateMessage.options, InitMessage.options, GSC_Client.options, GNUNET_DHT_ClientGetMessage.options, GNUNET_DHT_ClientResultMessage.options, GNUNET_DHT_ClientPutMessage.options, GNUNET_DHT_MonitorPutMessage.options, GNUNET_DHT_MonitorGetMessage.options, GNUNET_DHT_MonitorGetRespMessage.options, GNUNET_DHT_GetHandle.options, GetActionContext.options, PeerPutMessage.options, PeerResultMessage.options, PeerGetMessage.options, RecentRequest.options, SearchMessage.options, GNUNET_FS_PublishContext.options, GNUNET_FS_SearchContext.options, GNUNET_FS_DownloadContext.options, GNUNET_FS_PublishKskContext.options, GSF_PendingRequestData.options, LookupMessage.options, GNUNET_GNS_LookupWithTldRequest.options, GNS_ResolverHandle.options, PeerstoreRecordMessage.options, GNUNET_PEERSTORE_StoreContext.options, StartMessage.options, httpdomain.autohttp.bottle.AutobottleDirective.undoc_endpoints(), httpdomain.autohttp.flask_base.AutoflaskBase.undoc_endpoints(), and httpdomain.autohttp.tornado.AutoTornadoDirective.undoc_endpoints().

Referenced by httpdomain.autohttp.bottle.AutobottleDirective.run(), httpdomain.autohttp.flask.AutoflaskDirective.run(), httpdomain.autohttp.flaskqref.QuickReferenceFlaskDirective.run(), and httpdomain.autohttp.tornado.AutoTornadoDirective.run().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ run() [2/2]

def httpdomain.autohttp.tornado.AutoTornadoDirective.run (   self)

Definition at line 115 of file tornado.py.

115 def run(self):
116 node = nodes.section()
117 node.document = self.state.document
118 result = ViewList()
119 for line in self.make_rst():
120 result.append(line, '<autotornado>')
121 nested_parse_with_titles(self.state, result, node)
122 return node.children
123
124

References httpdomain.autohttp.bottle.AutobottleDirective.make_rst(), httpdomain.autohttp.tornado.AutoTornadoDirective.make_rst(), httpdomain.autohttp.flask_base.AutoflaskBase.make_rst(), GNUNET_CONVERSATION_Caller.state, GNUNET_CONVERSATION_Phone.state, GNUNET_CONVERSATION_Call.state, Operation.state, Set.state, CadetChannel.state, CadetConnection.state, MonitorNotifyMessage.state, GNUNET_FS_UnindexContext.state, DownloadRequest.state, Socks5Request.state, GNUNET_MESSENGER_SrvRoom.state, GNUNET_MESSENGER_SrvTunnel.state, MhdConnectionHandle.state, OIDC_Variables.state, MonitoredPeer.state, and PeerResolutionContext.state.

Here is the call graph for this function:

Field Documentation

◆ has_content

bool httpdomain.autohttp.tornado.AutoTornadoDirective.has_content = True
static

Definition at line 73 of file tornado.py.

◆ required_arguments

int httpdomain.autohttp.tornado.AutoTornadoDirective.required_arguments = 1
static

Definition at line 74 of file tornado.py.

◆ option_spec

dictionary httpdomain.autohttp.tornado.AutoTornadoDirective.option_spec
static
Initial value:
= {'endpoints': directives.unchanged,
'undoc-endpoints': directives.unchanged,
'include-empty-docstring': directives.unchanged}

Definition at line 75 of file tornado.py.


The documentation for this class was generated from the following files: