added docs
This commit is contained in:
248
docs/RESP.html
Normal file
248
docs/RESP.html
Normal file
@@ -0,0 +1,248 @@
|
||||
<!DOCTYPE HTML>
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
|
||||
<link rel="stylesheet" href="style.css">
|
||||
</head>
|
||||
<body>
|
||||
<div class="content">
|
||||
<div class="logo">
|
||||
<a href="http://github.com/carp-lang/Carp">
|
||||
<img src="logo.png">
|
||||
</a>
|
||||
<div class="title">
|
||||
redis
|
||||
</div>
|
||||
<div class="index">
|
||||
<ul>
|
||||
<li>
|
||||
<a href="RESP.html">
|
||||
RESP
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="Redis.html">
|
||||
Redis
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<h1>
|
||||
RESP
|
||||
</h1>
|
||||
<div class="module-description">
|
||||
<p>is a wrapper around the <a href="https://redis.io/topics/protocol">Redis Serialization
|
||||
Protocol</a>. You can create all types—though
|
||||
creating arrays is a little unsightly due to the absence of recursive types—,
|
||||
stringify the built types into strings using <a href="#str"><code>str</code></a>, and decoding from
|
||||
the string protocol using <a href="#from-string"><code>from-string</code></a>.</p>
|
||||
<p>If you want your types to be supported when encoding, you’ll have to implement
|
||||
the interface <code>to-redis</code>, the signature of which is <code>(Fn [a] RESP))</code>.</p>
|
||||
|
||||
</div>
|
||||
<div class="binder">
|
||||
<a class="anchor" href="#Arr">
|
||||
<h3 id="Arr">
|
||||
Arr
|
||||
</h3>
|
||||
</a>
|
||||
<div class="description">
|
||||
instantiate
|
||||
</div>
|
||||
<p class="sig">
|
||||
(λ [(Array String)] RESP)
|
||||
</p>
|
||||
<span>
|
||||
|
||||
</span>
|
||||
<p class="doc">
|
||||
<p>creates a <code>Arr</code>.</p>
|
||||
|
||||
</p>
|
||||
</div>
|
||||
<div class="binder">
|
||||
<a class="anchor" href="#Err">
|
||||
<h3 id="Err">
|
||||
Err
|
||||
</h3>
|
||||
</a>
|
||||
<div class="description">
|
||||
instantiate
|
||||
</div>
|
||||
<p class="sig">
|
||||
(λ [String] RESP)
|
||||
</p>
|
||||
<span>
|
||||
|
||||
</span>
|
||||
<p class="doc">
|
||||
<p>creates a <code>Err</code>.</p>
|
||||
|
||||
</p>
|
||||
</div>
|
||||
<div class="binder">
|
||||
<a class="anchor" href="#Integer">
|
||||
<h3 id="Integer">
|
||||
Integer
|
||||
</h3>
|
||||
</a>
|
||||
<div class="description">
|
||||
instantiate
|
||||
</div>
|
||||
<p class="sig">
|
||||
(λ [Int] RESP)
|
||||
</p>
|
||||
<span>
|
||||
|
||||
</span>
|
||||
<p class="doc">
|
||||
<p>creates a <code>Integer</code>.</p>
|
||||
|
||||
</p>
|
||||
</div>
|
||||
<div class="binder">
|
||||
<a class="anchor" href="#Null">
|
||||
<h3 id="Null">
|
||||
Null
|
||||
</h3>
|
||||
</a>
|
||||
<div class="description">
|
||||
instantiate
|
||||
</div>
|
||||
<p class="sig">
|
||||
(λ [] RESP)
|
||||
</p>
|
||||
<span>
|
||||
|
||||
</span>
|
||||
<p class="doc">
|
||||
<p>creates a <code>Null</code>.</p>
|
||||
|
||||
</p>
|
||||
</div>
|
||||
<div class="binder">
|
||||
<a class="anchor" href="#Str">
|
||||
<h3 id="Str">
|
||||
Str
|
||||
</h3>
|
||||
</a>
|
||||
<div class="description">
|
||||
instantiate
|
||||
</div>
|
||||
<p class="sig">
|
||||
(λ [String] RESP)
|
||||
</p>
|
||||
<span>
|
||||
|
||||
</span>
|
||||
<p class="doc">
|
||||
<p>creates a <code>Str</code>.</p>
|
||||
|
||||
</p>
|
||||
</div>
|
||||
<div class="binder">
|
||||
<a class="anchor" href="#copy">
|
||||
<h3 id="copy">
|
||||
copy
|
||||
</h3>
|
||||
</a>
|
||||
<div class="description">
|
||||
instantiate
|
||||
</div>
|
||||
<p class="sig">
|
||||
(λ [(Ref RESP a)] RESP)
|
||||
</p>
|
||||
<span>
|
||||
|
||||
</span>
|
||||
<p class="doc">
|
||||
<p>copies a <code>RESP</code>.</p>
|
||||
|
||||
</p>
|
||||
</div>
|
||||
<div class="binder">
|
||||
<a class="anchor" href="#from-string">
|
||||
<h3 id="from-string">
|
||||
from-string
|
||||
</h3>
|
||||
</a>
|
||||
<div class="description">
|
||||
defn
|
||||
</div>
|
||||
<p class="sig">
|
||||
(λ [(Ref String a)] (Result RESP String))
|
||||
</p>
|
||||
<pre class="args">
|
||||
(from-string s)
|
||||
</pre>
|
||||
<p class="doc">
|
||||
<p>converts a RESP string into a <code>RESP</code> data structure.</p>
|
||||
|
||||
</p>
|
||||
</div>
|
||||
<div class="binder">
|
||||
<a class="anchor" href="#get-tag">
|
||||
<h3 id="get-tag">
|
||||
get-tag
|
||||
</h3>
|
||||
</a>
|
||||
<div class="description">
|
||||
instantiate
|
||||
</div>
|
||||
<p class="sig">
|
||||
(λ [(Ref RESP a)] Int)
|
||||
</p>
|
||||
<span>
|
||||
|
||||
</span>
|
||||
<p class="doc">
|
||||
<p>Gets the tag from a <code>RESP</code>.</p>
|
||||
|
||||
</p>
|
||||
</div>
|
||||
<div class="binder">
|
||||
<a class="anchor" href="#prn">
|
||||
<h3 id="prn">
|
||||
prn
|
||||
</h3>
|
||||
</a>
|
||||
<div class="description">
|
||||
instantiate
|
||||
</div>
|
||||
<p class="sig">
|
||||
(λ [(Ref RESP a)] String)
|
||||
</p>
|
||||
<span>
|
||||
|
||||
</span>
|
||||
<p class="doc">
|
||||
<p>converts a <code>RESP</code> to a string.</p>
|
||||
|
||||
</p>
|
||||
</div>
|
||||
<div class="binder">
|
||||
<a class="anchor" href="#str">
|
||||
<h3 id="str">
|
||||
str
|
||||
</h3>
|
||||
</a>
|
||||
<div class="description">
|
||||
defn
|
||||
</div>
|
||||
<p class="sig">
|
||||
(λ [(Ref RESP a)] String)
|
||||
</p>
|
||||
<pre class="args">
|
||||
(str r)
|
||||
</pre>
|
||||
<p class="doc">
|
||||
<p>converts a <code>RESP</code> to a string.</p>
|
||||
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
5368
docs/Redis.html
Normal file
5368
docs/Redis.html
Normal file
File diff suppressed because it is too large
Load Diff
42
docs/redis_index.html
Normal file
42
docs/redis_index.html
Normal file
@@ -0,0 +1,42 @@
|
||||
<!DOCTYPE HTML>
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
|
||||
<link rel="stylesheet" href="style.css">
|
||||
</head>
|
||||
<body>
|
||||
<div class="content">
|
||||
<a href="https://veitheller/git/carpentry/redis">
|
||||
<div class="logo">
|
||||
<img src="" alt="Logo">
|
||||
<div class="index">
|
||||
<ul>
|
||||
<li>
|
||||
<a href="RESP.html">
|
||||
RESP
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="Redis.html">
|
||||
Redis
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<h1>
|
||||
redis
|
||||
</h1>
|
||||
<p>is a collection of modules for talking
|
||||
to Redis.</p>
|
||||
<pre><code>(load "https://veitheller/git/carpentry/redis@master")
|
||||
</code></pre>
|
||||
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
120
docs/style.css
Normal file
120
docs/style.css
Normal file
@@ -0,0 +1,120 @@
|
||||
html {
|
||||
font-family: "Hasklig", "Lucida Console", monospace;
|
||||
font-size: 1.0em;
|
||||
}
|
||||
|
||||
p {
|
||||
margin: 0em 0em 0.5em 0em;
|
||||
}
|
||||
|
||||
a {
|
||||
color: #000;
|
||||
}
|
||||
|
||||
pre {
|
||||
background: #f1f1f1;
|
||||
padding: 10px;
|
||||
overflow-x: scroll;
|
||||
}
|
||||
|
||||
.logo img {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.logo {
|
||||
padding: 1em;
|
||||
position: fixed;
|
||||
top: 1em;
|
||||
right: 1em;
|
||||
}
|
||||
|
||||
.args {
|
||||
background-color: #f1f1f1;
|
||||
padding: 3px;
|
||||
display: inline-block;
|
||||
margin-top: 0.3em;
|
||||
margin-bottom: 0.3em;
|
||||
white-space: normal;
|
||||
}
|
||||
|
||||
ul {
|
||||
list-style-type: none;
|
||||
line-height: 1.6em;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-size: 1.5em;
|
||||
}
|
||||
|
||||
.content {
|
||||
margin: 3em auto auto auto;
|
||||
width: 70%;
|
||||
max-width: 650px;
|
||||
}
|
||||
|
||||
.module-description {
|
||||
padding-bottom: 0.5em;
|
||||
margin-bottom: 3.5em;
|
||||
border-bottom: 5px solid #aaa;
|
||||
}
|
||||
|
||||
h1 {
|
||||
margin-bottom: 1.5em;
|
||||
}
|
||||
|
||||
h3 {
|
||||
margin: 0em;
|
||||
}
|
||||
|
||||
.anchor {
|
||||
color: #000;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.anchor:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.binder {
|
||||
margin: 0em 0em 3.5em 0em;
|
||||
}
|
||||
|
||||
.sig {
|
||||
font-family: "Hasklig", "Lucida Console", monospace;
|
||||
background-color: #f1f1f1;
|
||||
}
|
||||
|
||||
code {
|
||||
font-family: "Hasklig", "Lucida Console", monospace;
|
||||
background-color: #f1f1f1;
|
||||
}
|
||||
|
||||
.description {
|
||||
margin-top: 0.5em;
|
||||
margin-bottom: 0.5em;
|
||||
font-size: 0.8em;
|
||||
color: #aaa;
|
||||
}
|
||||
|
||||
/* Smaller screens */
|
||||
@media only screen and (max-width: 1000px) {
|
||||
.logo {
|
||||
margin: 1em;
|
||||
text-align: left;
|
||||
float: left;
|
||||
width: 100%;
|
||||
position: inherit;
|
||||
}
|
||||
.content {
|
||||
margin: 0.5em;
|
||||
}
|
||||
.binder {
|
||||
margin: 0em 0em 1.5em 0em;
|
||||
}
|
||||
.sig {
|
||||
font-size: 0.9em;
|
||||
}
|
||||
ul {
|
||||
padding: 0px;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user