_site/cover/resp.COVER.html

1 %% Copyright (c) 2023 Peter Morgan <peter.james.morgan@gmail.com>
2 %%
3 %% Licensed under the Apache License, Version 2.0 (the "License");
4 %% you may not use this file except in compliance with the License.
5 %% You may obtain a copy of the License at
6 %%
7 %% http://www.apache.org/licenses/LICENSE-2.0
8 %%
9 %% Unless required by applicable law or agreed to in writing, software
10 %% distributed under the License is distributed on an "AS IS" BASIS,
11 %% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 %% See the License for the specific language governing permissions and
13 %% limitations under the License.
14
15
16 -module(resp).
17
18
19 -export([priv_dir/0]).
20 -export([start/0]).
21 -export([version/0]).
22 -export_type([int64/0]).
23 -export_type([resp2/0]).
24 -export_type([resp3/0]).
25 -export_type([tv/0]).
26
27 -type int64() :: -9_223_372_036_854_775_808..9_223_372_036_854_775_807.
28
29 -type resp2() :: {array, [tv()] | null}
30 | {bulk, iodata() | null}
31 | {string, iodata()}
32 | {error, iodata()}
33 | {integer, int64()}.
34
35 -type resp3() :: null
36 | {double, float()}
37 | {boolean, boolean()}
38 | {verbatim_string, iodata()}
39 | {map, [tv()]}
40 | {set, [tv()]}
41 | {attribute, [tv()]}
42 | {push, iodata()}
43 | {big_number, integer()}.
44
45 -type tv() :: resp2()
46 | resp3().
47
48 version() ->
49
:-(
{ok, Version} = application:get_key(resp, vsn),
50
:-(
Version.
51
52
53 start() ->
54
:-(
application:ensure_all_started(?MODULE).
55
56
57 priv_dir() ->
58 2 code:priv_dir(?MODULE).
Line Hits Source