-module(gledis). -compile(no_auto_import). -export([connect/0, 'query'/2, close/1, set/3, get/2]). -export_type([client/0]). -type client() :: any(). -spec connect() -> client(). connect() -> gledis_ffi:connect(). -spec 'query'(client(), list(binary())) -> {ok, any()} | {error, binary()}. 'query'(Field@0, Field@1) -> gledis_ffi:'query'(Field@0, Field@1). -spec close(client()) -> nil. close(Field@0) -> gledis_ffi:close(Field@0). -spec set(client(), binary(), binary()) -> {ok, any()} | {error, binary()}. set(Client, Key, Value) -> gledis_ffi:'query'(Client, [<<"SET"/utf8>>, Key, Value]). -spec get(client(), binary()) -> {ok, any()} | {error, binary()}. get(Client, Key) -> gledis_ffi:'query'(Client, [<<"GET"/utf8>>, Key]).