9#include <nlohmann/json_fwd.hpp>
13namespace nix::fetchers {
15typedef std::variant<std::string, uint64_t, Explicit<bool>> Attr;
22typedef std::map<std::string, Attr>
Attrs;
24Attrs jsonToAttrs(
const nlohmann::json & json);
26nlohmann::json attrsToJSON(
const Attrs & attrs);
28std::optional<std::string> maybeGetStrAttr(
const Attrs & attrs,
const std::string &
name);
30std::string getStrAttr(
const Attrs & attrs,
const std::string &
name);
32std::optional<uint64_t> maybeGetIntAttr(
const Attrs & attrs,
const std::string &
name);
34uint64_t getIntAttr(
const Attrs & attrs,
const std::string &
name);
36std::optional<bool> maybeGetBoolAttr(
const Attrs & attrs,
const std::string &
name);
38bool getBoolAttr(
const Attrs & attrs,
const std::string &
name);
40std::map<std::string, std::string> attrsToQuery(
const Attrs & attrs);
42Hash getRevAttr(
const Attrs & attrs,
const std::string &
name);
std::map< std::string, Attr > Attrs
Definition attrs.hh:22
const std::string_view & name
Definition lexer.l:1709