Skip to content

Commit

Permalink
feat: update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
cowan-macady committed Jun 27, 2023
1 parent 0452cad commit 02caa75
Show file tree
Hide file tree
Showing 62 changed files with 7,328 additions and 3,185 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -140,3 +140,5 @@ dmypy.json

# Sphinx documentation
docs/_build/
prepare_docs
docstmp
80 changes: 44 additions & 36 deletions docs/_modules/authorization.html

Large diffs are not rendered by default.

16 changes: 11 additions & 5 deletions docs/_modules/authorization/helper.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,9 @@
<script src="../../_static/js/html5shiv.min.js"></script>
<![endif]-->

<script data-url_root="../../" id="documentation_options" src="../../_static/documentation_options.js"></script>
<script src="../../_static/jquery.js"></script>
<script src="../../_static/underscore.js"></script>
<script src="../../_static/_sphinx_javascript_frameworks_compat.js"></script>
<script data-url_root="../../" id="documentation_options" src="../../_static/documentation_options.js"></script>
<script src="../../_static/doctools.js"></script>
<script src="../../_static/sphinx_highlight.js"></script>
<script src="../../_static/js/theme.js"></script>
Expand All @@ -26,19 +25,26 @@
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" >
<a href="../../index.html" class="icon icon-home"> docs



<a href="../../index.html" class="icon icon-home">
docs
</a>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../../search.html" method="get">
<input type="text" name="q" placeholder="Search docs" />
<input type="text" name="q" placeholder="Search docs" aria-label="Search docs" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../identity.html">identity package</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../config.html">config package</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../authorization.html">authorization package</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../ingest.html">ingest package</a></li>
</ul>

</div>
Expand All @@ -54,7 +60,7 @@
<div class="rst-content">
<div role="navigation" aria-label="Page navigation">
<ul class="wy-breadcrumbs">
<li><a href="../../index.html" class="icon icon-home"></a></li>
<li><a href="../../index.html" class="icon icon-home" aria-label="Home"></a></li>
<li class="breadcrumb-item"><a href="../index.html">Module code</a></li>
<li class="breadcrumb-item"><a href="../authorization.html">authorization</a></li>
<li class="breadcrumb-item active">authorization.helper</li>
Expand Down
126 changes: 68 additions & 58 deletions docs/_modules/authorization/is_authorized.html

Large diffs are not rendered by default.

186 changes: 186 additions & 0 deletions docs/_modules/authorization/what_authorized.html

Large diffs are not rendered by default.

137 changes: 137 additions & 0 deletions docs/_modules/authorization/who_authorized.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,137 @@
<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>authorization.who_authorized &mdash; docs - documentation</title>
<link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../../_static/css/theme.css" type="text/css" />
<!--[if lt IE 9]>
<script src="../../_static/js/html5shiv.min.js"></script>
<![endif]-->

<script src="../../_static/jquery.js"></script>
<script src="../../_static/_sphinx_javascript_frameworks_compat.js"></script>
<script data-url_root="../../" id="documentation_options" src="../../_static/documentation_options.js"></script>
<script src="../../_static/doctools.js"></script>
<script src="../../_static/sphinx_highlight.js"></script>
<script src="../../_static/js/theme.js"></script>
<link rel="index" title="Index" href="../../genindex.html" />
<link rel="search" title="Search" href="../../search.html" />
</head>

<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" >



<a href="../../index.html" class="icon icon-home">
docs
</a>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../../search.html" method="get">
<input type="text" name="q" placeholder="Search docs" aria-label="Search docs" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../identity.html">identity package</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../config.html">config package</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../authorization.html">authorization package</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../ingest.html">ingest package</a></li>
</ul>

</div>
</div>
</nav>

<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" >
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="../../index.html">docs</a>
</nav>

<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="Page navigation">
<ul class="wy-breadcrumbs">
<li><a href="../../index.html" class="icon icon-home" aria-label="Home"></a></li>
<li class="breadcrumb-item"><a href="../index.html">Module code</a></li>
<li class="breadcrumb-item"><a href="../authorization.html">authorization</a></li>
<li class="breadcrumb-item active">authorization.who_authorized</li>
<li class="wy-breadcrumbs-aside">
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">

<h1>Source code for authorization.who_authorized</h1><div class="highlight"><pre>
<span></span><span class="kn">from</span> <span class="nn">prepare_docs.indykite.authorization.v1beta1</span> <span class="kn">import</span> <span class="n">authorization_service_pb2</span> <span class="k">as</span> <span class="n">pb2</span>
<span class="kn">from</span> <span class="nn">prepare_docs.indykite.authorization.v1beta1</span> <span class="kn">import</span> <span class="n">model_pb2</span> <span class="k">as</span> <span class="n">pb2_model</span>
<span class="kn">from</span> <span class="nn">prepare_docs.model.who_authorized</span> <span class="kn">import</span> <span class="n">WhoAuthorizedResponse</span>


<div class="viewcode-block" id="who_authorized"><a class="viewcode-back" href="../../authorization.html#authorization.who_authorized.who_authorized">[docs]</a><span class="k">def</span> <span class="nf">who_authorized</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">resources</span><span class="o">=</span><span class="p">[],</span> <span class="n">input_params</span><span class="o">=</span><span class="p">{},</span> <span class="n">policy_tags</span><span class="o">=</span><span class="p">[]):</span>
<span class="n">response</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">stub</span><span class="o">.</span><span class="n">WhoAuthorized</span><span class="p">(</span>
<span class="n">pb2</span><span class="o">.</span><span class="n">WhoAuthorizedRequest</span><span class="p">(</span>
<span class="n">resources</span><span class="o">=</span><span class="n">request_resource</span><span class="p">(</span><span class="n">resources</span><span class="p">),</span>
<span class="n">input_params</span><span class="o">=</span><span class="n">request_input_params</span><span class="p">(</span><span class="n">input_params</span><span class="p">),</span>
<span class="n">policy_tags</span><span class="o">=</span><span class="n">policy_tags</span>
<span class="p">)</span>
<span class="p">)</span>
<span class="k">if</span> <span class="ow">not</span> <span class="n">response</span><span class="p">:</span>
<span class="k">return</span> <span class="kc">None</span>

<span class="k">return</span> <span class="n">WhoAuthorizedResponse</span><span class="o">.</span><span class="n">deserialize</span><span class="p">(</span><span class="n">response</span><span class="p">)</span></div>


<div class="viewcode-block" id="request_resource"><a class="viewcode-back" href="../../authorization.html#authorization.who_authorized.request_resource">[docs]</a><span class="k">def</span> <span class="nf">request_resource</span><span class="p">(</span><span class="n">resources</span><span class="p">):</span>
<span class="k">return</span> <span class="p">[</span>
<span class="n">pb2</span><span class="o">.</span><span class="n">WhoAuthorizedRequest</span><span class="o">.</span><span class="n">Resource</span><span class="p">(</span><span class="nb">id</span><span class="o">=</span><span class="n">r</span><span class="o">.</span><span class="n">id</span><span class="p">,</span> <span class="nb">type</span><span class="o">=</span><span class="n">r</span><span class="o">.</span><span class="n">type</span><span class="p">,</span> <span class="n">actions</span><span class="o">=</span><span class="nb">list</span><span class="p">(</span><span class="n">r</span><span class="o">.</span><span class="n">actions</span><span class="p">))</span>
<span class="k">for</span> <span class="n">r</span> <span class="ow">in</span> <span class="n">resources</span>
<span class="p">]</span></div>


<div class="viewcode-block" id="request_input_params"><a class="viewcode-back" href="../../authorization.html#authorization.who_authorized.request_input_params">[docs]</a><span class="k">def</span> <span class="nf">request_input_params</span><span class="p">(</span><span class="n">input_params</span><span class="p">):</span>
<span class="n">input_params_dict</span> <span class="o">=</span> <span class="p">{</span>
<span class="n">k</span><span class="p">:</span> <span class="n">pb2_model</span><span class="o">.</span><span class="n">InputParam</span><span class="p">(</span><span class="n">string_value</span><span class="o">=</span><span class="nb">str</span><span class="p">(</span><span class="n">v</span><span class="p">))</span>
<span class="k">for</span> <span class="n">k</span><span class="p">,</span> <span class="n">v</span> <span class="ow">in</span> <span class="n">input_params</span><span class="o">.</span><span class="n">items</span><span class="p">()</span>
<span class="p">}</span>
<span class="k">return</span> <span class="n">input_params_dict</span></div>
</pre></div>

</div>
</div>
<footer>

<hr/>

<div role="contentinfo">
<p>&#169; Copyright 2023, -.</p>
</div>

Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
provided by <a href="https://readthedocs.org">Read the Docs</a>.


</footer>
</div>
</div>
</section>
</div>
<script>
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>

</body>
</html>

0 comments on commit 02caa75

Please sign in to comment.