iceberg-cpp
Loading...
Searching...
No Matches
resource_paths.h
Go to the documentation of this file.
1/*
2 * Licensed to the Apache Software Foundation (ASF) under one
3 * or more contributor license agreements. See the NOTICE file
4 * distributed with this work for additional information
5 * regarding copyright ownership. The ASF licenses this file
6 * to you under the Apache License, Version 2.0 (the
7 * "License"); you may not use this file except in compliance
8 * with the License. You may obtain a copy of the License at
9 *
10 * http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing,
13 * software distributed under the License is distributed on an
14 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 * KIND, either express or implied. See the License for the
16 * specific language governing permissions and limitations
17 * under the License.
18 */
19
20#pragma once
21
22#include <memory>
23#include <optional>
24#include <string>
25
26#include "iceberg/catalog/rest/iceberg_rest_export.h"
27#include "iceberg/result.h"
28#include "iceberg/type_fwd.h"
29
32
33namespace iceberg::rest {
34
38class ICEBERG_REST_EXPORT ResourcePaths {
39 public:
45 static Result<std::unique_ptr<ResourcePaths>> Make(
46 std::string base_uri, const std::string& prefix,
47 const std::string& namespace_separator);
48
50 Result<std::string> Config() const;
51
53 Result<std::string> OAuth2Tokens() const;
54
56 Result<std::string> Namespaces() const;
57
59 Result<std::string> Namespace_(const Namespace& ns) const;
60
62 Result<std::string> NamespaceProperties(const Namespace& ns) const;
63
65 Result<std::string> Tables(const Namespace& ns) const;
66
68 Result<std::string> Table(const TableIdentifier& ident) const;
69
71 Result<std::string> Register(const Namespace& ns) const;
72
74 Result<std::string> Rename() const;
75
78 Result<std::string> Metrics(const TableIdentifier& ident) const;
79
82 Result<std::string> Credentials(const TableIdentifier& ident) const;
83
85 Result<std::string> CommitTransaction() const;
86
89 Result<std::string> Plan(const TableIdentifier& ident,
90 std::optional<std::string> plan_id = std::nullopt) const;
91
94 Result<std::string> FetchScanTasks(const TableIdentifier& ident) const;
95
96 private:
97 ResourcePaths(std::string base_uri, const std::string& prefix,
98 std::string namespace_separator);
99
100 std::string base_uri_; // required
101 const std::string prefix_; // optional
102 const std::string namespace_separator_;
103};
104
105} // namespace iceberg::rest
Represents an Iceberg table.
Definition table.h:38
Resource path builder for Iceberg REST catalog endpoints.
Definition resource_paths.h:38
Iceberg file format metrics.
Definition metrics.h:63
A namespace in a catalog.
Definition table_identifier.h:35
Identifies a table in iceberg catalog.
Definition table_identifier.h:46