GNUnet  0.20.0
httpdomain.httpdomain.HTTPDomain Class Reference
Inheritance diagram for httpdomain.httpdomain.HTTPDomain:
[legend]
Collaboration diagram for httpdomain.httpdomain.HTTPDomain:
[legend]

Public Member Functions

def routes (self)
 
def clear_doc (self, docname)
 
def resolve_xref (self, env, fromdocname, builder, typ, target, node, contnode)
 
def resolve_any_xref (self, env, fromdocname, builder, target, node, contnode)
 
def get_objects (self)
 

Static Public Attributes

string name = 'http'
 
string label = 'HTTP'
 
dictionary object_types
 
dictionary directives
 
dictionary roles
 
dictionary initial_data
 
list indices = []
 

Detailed Description

HTTP domain.

Definition at line 571 of file httpdomain.py.

Member Function Documentation

◆ routes()

def httpdomain.httpdomain.HTTPDomain.routes (   self)

Definition at line 639 of file httpdomain.py.

639  def routes(self):
640  return dict((key, self.data[key]) for key in self.object_types)
641 
static struct GNUNET_CONTAINER_MultiShortmap * routes
Routes on which this peer is an intermediate.

References Value.data, UpdateContext.data, RemoveContext.data, GNUNET_FS_Uri.data, GNUNET_FS_FileInformation.data, GetFullDataClosure.data, ProcessResultClosure.data, MetaCounter.data, HandleReplyClosure.data, ProcessReplyClosure.data, MetaItem.data, DnsResult.data, userdata.data, HostSet.data, RequestHandle.data, ego_sign_data_cls.data, GNUNET_DATACACHE_Block.data, GNUNET_DNSPARSER_RawRecord.data, GNUNET_DNSPARSER_Record.data, GNUNET_FS_ProgressInfo.data, GNUNET_FS_ProgressInfo::GNUNET_FS_PublishStatusEvent::GNUNET_FS_PublishProgressEvent.data, GNUNET_FS_ProgressInfo::GNUNET_FS_DownloadStatusEvent::GNUNET_FS_DownloadProgressEvent.data, GNUNET_FS_ProgressInfo::GNUNET_FS_UnindexEvent::GNUNET_FS_UnindexProgressEvent.data, GNUNET_GNSRECORD_Data.data, GNUNET_MESSENGER_MessagePrivate.data, GNUNET_PQ_QueryParam.data, GNUNET_RECLAIM_Attribute.data, GNUNET_RECLAIM_Credential.data, GNUNET_RECLAIM_Presentation.data, GNUNET_REST_RequestHandle.data, GNUNET_SET_Element.data, GNUNET_SETI_Element.data, GNUNET_SETU_Element.data, GNUNET_SQ_QueryParam.data, Buffer.data, GNUNET_NAT_Test.data, TcpContext.data, GNUNET_NAT_AUTO_TestMessage.data, GNUNET_NAT_AUTO_Test.data, GNUNET_NAT_TestMessage.data, TicketRecordsEntry.data, Result.data, WriteContext.data, GNUNET_TESTBED_BarrierStatusMsg.data, OperationContext.data, PrismValue.data, and httpdomain.httpdomain.HTTPDomain.object_types.

Referenced by httpdomain.httpdomain.HTTPDomain.clear_doc(), and httpdomain.httpdomain.HTTPDomain.get_objects().

Here is the caller graph for this function:

◆ clear_doc()

def httpdomain.httpdomain.HTTPDomain.clear_doc (   self,
  docname 
)

Definition at line 642 of file httpdomain.py.

642  def clear_doc(self, docname):
643  for typ, routes in self.routes.items():
644  for path, info in list(routes.items()):
645  if info[0] == docname:
646  del routes[path]
647 
static int list
Set if we should print a list of currently running services.
Definition: gnunet-arm.c:69

References list, and httpdomain.httpdomain.HTTPDomain.routes().

Here is the call graph for this function:

◆ resolve_xref()

def httpdomain.httpdomain.HTTPDomain.resolve_xref (   self,
  env,
  fromdocname,
  builder,
  typ,
  target,
  node,
  contnode 
)

Definition at line 648 of file httpdomain.py.

649  node, contnode):
650  try:
651  info = self.data[str(typ)][target]
652  except KeyError:
653  text = contnode.rawsource
654  role = self.roles.get(typ)
655  if role is None:
656  return None
657 
658  if fromdocname not in _doctree_cache:
659  _doctree_cache[fromdocname] = env.get_doctree(fromdocname)
660  doctree = _doctree_cache[fromdocname]
661 
662  resnode = role.result_nodes(doctree, env, node, None)[0][0]
663  if isinstance(resnode, addnodes.pending_xref):
664  text = node[0][0]
665  reporter = doctree.reporter
666  reporter.warning('Cannot resolve reference to %r' % text,
667  line=node.line)
668  return None
669  return resnode
670  else:
671  anchor = http_resource_anchor(typ, target)
672  title = typ.upper() + ' ' + target
673  return make_refnode(builder, fromdocname, info[0], anchor,
674  contnode, title)
675 
static int get
Get DID Documement for DID Flag.
Definition: gnunet-did.c:66
def http_resource_anchor(method, path)
Definition: httpdomain.py:254

References Value.data, UpdateContext.data, RemoveContext.data, GNUNET_FS_Uri.data, GNUNET_FS_FileInformation.data, GetFullDataClosure.data, ProcessResultClosure.data, MetaCounter.data, HandleReplyClosure.data, ProcessReplyClosure.data, MetaItem.data, DnsResult.data, userdata.data, HostSet.data, RequestHandle.data, ego_sign_data_cls.data, GNUNET_DATACACHE_Block.data, GNUNET_DNSPARSER_RawRecord.data, GNUNET_DNSPARSER_Record.data, GNUNET_FS_ProgressInfo.data, GNUNET_FS_ProgressInfo::GNUNET_FS_PublishStatusEvent::GNUNET_FS_PublishProgressEvent.data, GNUNET_FS_ProgressInfo::GNUNET_FS_DownloadStatusEvent::GNUNET_FS_DownloadProgressEvent.data, GNUNET_FS_ProgressInfo::GNUNET_FS_UnindexEvent::GNUNET_FS_UnindexProgressEvent.data, GNUNET_GNSRECORD_Data.data, GNUNET_MESSENGER_MessagePrivate.data, GNUNET_PQ_QueryParam.data, GNUNET_RECLAIM_Attribute.data, GNUNET_RECLAIM_Credential.data, GNUNET_RECLAIM_Presentation.data, GNUNET_REST_RequestHandle.data, GNUNET_SET_Element.data, GNUNET_SETI_Element.data, GNUNET_SETU_Element.data, GNUNET_SQ_QueryParam.data, Buffer.data, GNUNET_NAT_Test.data, TcpContext.data, GNUNET_NAT_AUTO_TestMessage.data, GNUNET_NAT_AUTO_Test.data, GNUNET_NAT_TestMessage.data, TicketRecordsEntry.data, Result.data, WriteContext.data, GNUNET_TESTBED_BarrierStatusMsg.data, OperationContext.data, PrismValue.data, get, httpdomain.httpdomain.http_resource_anchor(), httpdomain.httpdomain.HTTPDomain.roles, and typescriptdomain.TypeScriptDomain.roles.

Here is the call graph for this function:

◆ resolve_any_xref()

def httpdomain.httpdomain.HTTPDomain.resolve_any_xref (   self,
  env,
  fromdocname,
  builder,
  target,
  node,
  contnode 
)
Resolve the pending_xref *node* with the given *target*.

The reference comes from an "any" or similar role, which means that Sphinx
don't know the type.

For now sphinxcontrib-httpdomain doesn't resolve any xref nodes.

:return:
   list of tuples ``('domain:role', newnode)``, where ``'domain:role'``
   is the name of a role that could have created the same reference,

Definition at line 676 of file httpdomain.py.

676  def resolve_any_xref(self, env, fromdocname, builder, target, node, contnode):
677  """Resolve the pending_xref *node* with the given *target*.
678 
679  The reference comes from an "any" or similar role, which means that Sphinx
680  don't know the type.
681 
682  For now sphinxcontrib-httpdomain doesn't resolve any xref nodes.
683 
684  :return:
685  list of tuples ``('domain:role', newnode)``, where ``'domain:role'``
686  is the name of a role that could have created the same reference,
687  """
688  return []
689 

◆ get_objects()

def httpdomain.httpdomain.HTTPDomain.get_objects (   self)

Definition at line 690 of file httpdomain.py.

690  def get_objects(self):
691  for method, routes in self.routes.items():
692  for path, info in routes.items():
693  anchor = http_resource_anchor(method, path)
694  yield (path, path, method, info[0], anchor, 1)
695 
696 

References httpdomain.httpdomain.http_resource_anchor(), and httpdomain.httpdomain.HTTPDomain.routes().

Here is the call graph for this function:

Field Documentation

◆ name

◆ label

string httpdomain.httpdomain.HTTPDomain.label = 'HTTP'
static

Definition at line 575 of file httpdomain.py.

◆ object_types

dictionary httpdomain.httpdomain.HTTPDomain.object_types
static
Initial value:
= {
'options': ObjType('options', 'options', 'obj'),
'head': ObjType('head', 'head', 'obj'),
'post': ObjType('post', 'post', 'obj'),
'get': ObjType('get', 'get', 'obj'),
'put': ObjType('put', 'put', 'obj'),
'patch': ObjType('patch', 'patch', 'obj'),
'delete': ObjType('delete', 'delete', 'obj'),
'trace': ObjType('trace', 'trace', 'obj'),
'connect': ObjType('connect', 'connect', 'obj'),
'copy': ObjType('copy', 'copy', 'obj'),
'any': ObjType('any', 'any', 'obj')
}

Definition at line 577 of file httpdomain.py.

Referenced by httpdomain.httpdomain.HTTPDomain.routes().

◆ directives

dictionary httpdomain.httpdomain.HTTPDomain.directives
static
Initial value:
= {
'options': HTTPOptions,
'head': HTTPHead,
'post': HTTPPost,
'get': HTTPGet,
'put': HTTPPut,
'patch': HTTPPatch,
'delete': HTTPDelete,
'trace': HTTPTrace,
'connect': HTTPConnect,
'copy': HTTPCopy,
'any': HTTPAny
}

Definition at line 591 of file httpdomain.py.

◆ roles

dictionary httpdomain.httpdomain.HTTPDomain.roles
static
Initial value:
= {
'options': HTTPXRefRole('options'),
'head': HTTPXRefRole('head'),
'post': HTTPXRefRole('post'),
'get': HTTPXRefRole('get'),
'put': HTTPXRefRole('put'),
'patch': HTTPXRefRole('patch'),
'delete': HTTPXRefRole('delete'),
'trace': HTTPXRefRole('trace'),
'connect': HTTPXRefRole('connect'),
'copy': HTTPXRefRole('copy'),
'any': HTTPXRefRole('any'),
'statuscode': HTTPXRefStatusRole(),
'method': HTTPXRefMethodRole(),
'header': HTTPXRefHeaderRole()
}

Definition at line 605 of file httpdomain.py.

Referenced by httpdomain.httpdomain.HTTPDomain.resolve_xref().

◆ initial_data

dictionary httpdomain.httpdomain.HTTPDomain.initial_data
static
Initial value:
= {
'options': {}, # path: (docname, synopsis)
'head': {},
'post': {},
'get': {},
'put': {},
'patch': {},
'delete': {},
'trace': {},
'connect': {},
'copy': {},
'any': {}
}

Definition at line 622 of file httpdomain.py.

◆ indices

list httpdomain.httpdomain.HTTPDomain.indices = []
static

Definition at line 636 of file httpdomain.py.


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