forked from lix-project/lix
9f4d8c6170
Flakes are now fetched using an extensible mechanism. Also lots of other flake cleanups.
29 lines
554 B
C++
29 lines
554 B
C++
#pragma once
|
|
|
|
#include "types.hh"
|
|
|
|
namespace nix::fetchers {
|
|
|
|
struct ParsedURL
|
|
{
|
|
std::string url;
|
|
std::string base; // URL without query/fragment
|
|
std::string scheme;
|
|
std::optional<std::string> authority;
|
|
std::string path;
|
|
std::map<std::string, std::string> query;
|
|
std::string fragment;
|
|
|
|
std::string to_string() const;
|
|
};
|
|
|
|
MakeError(BadURL, Error);
|
|
|
|
std::string percentDecode(std::string_view in);
|
|
|
|
std::map<std::string, std::string> decodeQuery(const std::string & query);
|
|
|
|
ParsedURL parseURL(const std::string & url);
|
|
|
|
}
|