4#include "lix/libutil/json-fwd.hh"
12namespace nix::fetchers {
14typedef std::variant<std::string, uint64_t, Explicit<bool>> Attr;
15typedef std::map<std::string, Attr> Attrs;
17Attrs jsonToAttrs(
const JSON & json);
19JSON attrsToJSON(
const Attrs & attrs);
21std::optional<std::string> maybeGetStrAttr(
const Attrs & attrs,
const std::string & name);
23std::string getStrAttr(
const Attrs & attrs,
const std::string & name);
25std::optional<uint64_t> maybeGetIntAttr(
const Attrs & attrs,
const std::string & name);
27uint64_t getIntAttr(
const Attrs & attrs,
const std::string & name);
29std::optional<bool> maybeGetBoolAttr(
const Attrs & attrs,
const std::string & name);
31bool getBoolAttr(
const Attrs & attrs,
const std::string & name);
33std::map<std::string, std::string> attrsToQuery(
const Attrs & attrs);