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 <string>
24
25#include "iceberg/catalog/rest/iceberg_rest_export.h"
26#include "iceberg/result.h"
27#include "iceberg/type_fwd.h"
28
31
32namespace iceberg::rest {
33
37class ICEBERG_REST_EXPORT ResourcePaths {
38 public:
44 static Result<std::unique_ptr<ResourcePaths>> Make(
45 std::string base_uri, const std::string& prefix,
46 const std::string& namespace_separator);
47
49 Result<std::string> Config() const;
50
52 Result<std::string> OAuth2Tokens() const;
53
55 Result<std::string> Namespaces() const;
56
58 Result<std::string> Namespace_(const Namespace& ns) const;
59
61 Result<std::string> NamespaceProperties(const Namespace& ns) const;
62
64 Result<std::string> Tables(const Namespace& ns) const;
65
67 Result<std::string> Table(const TableIdentifier& ident) const;
68
70 Result<std::string> Register(const Namespace& ns) const;
71
73 Result<std::string> Rename() const;
74
77 Result<std::string> Metrics(const TableIdentifier& ident) const;
78
81 Result<std::string> Credentials(const TableIdentifier& ident) const;
82
84 Result<std::string> CommitTransaction() const;
85
86 private:
87 ResourcePaths(std::string base_uri, const std::string& prefix,
88 std::string namespace_separator);
89
90 std::string base_uri_; // required
91 const std::string prefix_; // optional
92 const std::string namespace_separator_;
93};
94
95} // namespace iceberg::rest
Represents an Iceberg table.
Definition table.h:38
Resource path builder for Iceberg REST catalog endpoints.
Definition resource_paths.h:37
Iceberg file format metrics.
Definition metrics.h:34
A namespace in a catalog.
Definition table_identifier.h:35
Identifies a table in iceberg catalog.
Definition table_identifier.h:46