GNUnet 0.22.2
httpdomain.autohttp.bottle.AutobottleDirective Class Reference
Inheritance diagram for httpdomain.autohttp.bottle.AutobottleDirective:
[legend]
Collaboration diagram for httpdomain.autohttp.bottle.AutobottleDirective:
[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 59 of file bottle.py.

Member Function Documentation

◆ endpoints() [1/2]

def httpdomain.autohttp.bottle.AutobottleDirective.endpoints (   self)

Definition at line 68 of file bottle.py.

68 def endpoints(self):
69 endpoints = self.options.get('endpoints', None)
70 if not endpoints:
71 return None
72 return frozenset(re.split(r'\s*,\s*', endpoints))
73
static int get
Get DID Documement for DID Flag.
Definition: gnunet-did.c:62

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, PeerPutMessage.options, GNUNET_DHT_GetHandle.options, GetActionContext.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.bottle.AutobottleDirective.undoc_endpoints (   self)

◆ make_rst() [1/2]

def httpdomain.autohttp.bottle.AutobottleDirective.make_rst (   self)

Definition at line 81 of file bottle.py.

81 def make_rst(self):
82 app = import_object(self.arguments[0])
83 for method, path, target in get_routes(app):
84 endpoint = target.name or target.callback.__name__
85 if self.endpoints and endpoint not in self.endpoints:
86 continue
87 if endpoint in self.undoc_endpoints:
88 continue
89 view = target.callback
90 docstring = view.__doc__ or ''
91 if not isinstance(docstring, six.text_type):
92 analyzer = ModuleAnalyzer.for_module(view.__module__)
93 docstring = force_decode(docstring, analyzer.encoding)
94 if not docstring and 'include-empty-docstring' not in self.options:
95 continue
96 docstring = prepare_docstring(docstring)
97 for line in http_directive(method, path, docstring):
98 yield line
99
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.bottle.get_routes(), httpdomain.autohttp.common.http_directive(), httpdomain.autohttp.common.import_object(), 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, PeerPutMessage.options, GNUNET_DHT_GetHandle.options, GetActionContext.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.bottle.AutobottleDirective.run (   self)

Definition at line 100 of file bottle.py.

100 def run(self):
101 node = nodes.section()
102 node.document = self.state.document
103 result = ViewList()
104 for line in self.make_rst():
105 result.append(line, '<autobottle>')
106 nested_parse_with_titles(self.state, result, node)
107 return node.children
108
109
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:918

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.bottle.AutobottleDirective.endpoints (   self)

◆ undoc_endpoints() [2/2]

def httpdomain.autohttp.bottle.AutobottleDirective.undoc_endpoints (   self)

◆ make_rst() [2/2]

def httpdomain.autohttp.bottle.AutobottleDirective.make_rst (   self)

Definition at line 81 of file bottle.py.

81 def make_rst(self):
82 app = import_object(self.arguments[0])
83 for method, path, target in get_routes(app):
84 endpoint = target.name or target.callback.__name__
85 if self.endpoints and endpoint not in self.endpoints:
86 continue
87 if endpoint in self.undoc_endpoints:
88 continue
89 view = target.callback
90 docstring = view.__doc__ or ''
91 if not isinstance(docstring, six.text_type):
92 analyzer = ModuleAnalyzer.for_module(view.__module__)
93 docstring = force_decode(docstring, analyzer.encoding)
94 if not docstring and 'include-empty-docstring' not in self.options:
95 continue
96 docstring = prepare_docstring(docstring)
97 for line in http_directive(method, path, docstring):
98 yield line
99

References httpdomain.autohttp.bottle.AutobottleDirective.endpoints(), httpdomain.autohttp.flask_base.AutoflaskBase.endpoints(), httpdomain.autohttp.tornado.AutoTornadoDirective.endpoints(), httpdomain.autohttp.bottle.get_routes(), httpdomain.autohttp.common.http_directive(), httpdomain.autohttp.common.import_object(), 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, PeerPutMessage.options, GNUNET_DHT_GetHandle.options, GetActionContext.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.bottle.AutobottleDirective.run (   self)

Definition at line 100 of file bottle.py.

100 def run(self):
101 node = nodes.section()
102 node.document = self.state.document
103 result = ViewList()
104 for line in self.make_rst():
105 result.append(line, '<autobottle>')
106 nested_parse_with_titles(self.state, result, node)
107 return node.children
108
109

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.bottle.AutobottleDirective.has_content = True
static

Definition at line 61 of file bottle.py.

◆ required_arguments

int httpdomain.autohttp.bottle.AutobottleDirective.required_arguments = 1
static

Definition at line 62 of file bottle.py.

◆ option_spec

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

Definition at line 63 of file bottle.py.


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