aboutsummaryrefslogtreecommitdiff
path: root/shard/lib/shard_uri.ex
diff options
context:
space:
mode:
Diffstat (limited to 'shard/lib/shard_uri.ex')
-rw-r--r--shard/lib/shard_uri.ex9
1 files changed, 8 insertions, 1 deletions
diff --git a/shard/lib/shard_uri.ex b/shard/lib/shard_uri.ex
index 1b186d2..81b4ab1 100644
--- a/shard/lib/shard_uri.ex
+++ b/shard/lib/shard_uri.ex
@@ -1,8 +1,12 @@
defmodule ShardURI do
@moduledoc"""
- Convert Shard manifests to and from text strings.
+ Convert Shard manifests to and from text strings. Not used by the shard library
+ internally, only provided for convenience.
"""
+ @doc"""
+ Get URI corresponding to shard manifest.
+ """
def from_manifest(m) do
case m do
%SApp.Chat.Manifest{channel: chan} -> "shard:chat:#{chan}"
@@ -19,6 +23,9 @@ defmodule ShardURI do
end
end
+ @doc"""
+ Parse URI and return corresponding manifest.
+ """
def to_manifest(p) do
case p do
"shard:chat:" <> chan ->