Nix 2.93.3
Lix: A modern, delicious implementation of the Nix package manager; unstable internal interfaces
Loading...
Searching...
No Matches
url.hh
Go to the documentation of this file.
1#pragma once
3
5#include <map>
6
7namespace nix {
8
10{
11 std::string url;
13 std::string base;
14 std::string scheme;
15 std::optional<std::string> authority;
16 std::string path;
17 std::map<std::string, std::string> query;
18 std::string fragment;
19
20 std::string to_string() const;
21
22 bool operator ==(const ParsedURL & other) const;
23};
24
25MakeError(BadURL, Error);
26
27std::string percentDecode(std::string_view in);
28std::string percentEncode(std::string_view s, std::string_view keep="");
29
30std::map<std::string, std::string> decodeQuery(const std::string & query);
31
32ParsedURL parseURL(const std::string & url);
33
43 std::optional<std::string_view> application;
44 std::string_view transport;
45};
46
47ParsedUrlScheme parseUrlScheme(std::string_view scheme);
48
49}
This file defines two main structs/classes used in nix error handling.
Definition url.hh:10
std::string base
URL without query/fragment.
Definition url.hh:13
Definition url.hh:42