iceberg_catalog_rest/lib.rs
1// Licensed to the Apache Software Foundation (ASF) under one
2// or more contributor license agreements. See the NOTICE file
3// distributed with this work for additional information
4// regarding copyright ownership. The ASF licenses this file
5// to you under the Apache License, Version 2.0 (the
6// "License"); you may not use this file except in compliance
7// with the License. You may obtain a copy of the License at
8//
9// http://www.apache.org/licenses/LICENSE-2.0
10//
11// Unless required by applicable law or agreed to in writing,
12// software distributed under the License is distributed on an
13// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14// KIND, either express or implied. See the License for the
15// specific language governing permissions and limitations
16// under the License.
17
18//! Iceberg REST API implementation.
19//!
20//! To build a rest catalog with configurations
21//! # Example
22//!
23//! ```rust, no_run
24//! use std::collections::HashMap;
25//!
26//! use iceberg::CatalogBuilder;
27//! use iceberg_catalog_rest::{
28//! REST_CATALOG_PROP_URI, REST_CATALOG_PROP_WAREHOUSE, RestCatalogBuilder,
29//! };
30//!
31//! #[tokio::main]
32//! async fn main() {
33//! let catalog = RestCatalogBuilder::default()
34//! .load(
35//! "rest",
36//! HashMap::from([
37//! (
38//! REST_CATALOG_PROP_URI.to_string(),
39//! "http://localhost:8181".to_string(),
40//! ),
41//! (
42//! REST_CATALOG_PROP_WAREHOUSE.to_string(),
43//! "s3://warehouse".to_string(),
44//! ),
45//! ]),
46//! )
47//! .await
48//! .unwrap();
49//! }
50//! ```
51
52#![deny(missing_docs)]
53
54mod catalog;
55mod client;
56mod types;
57
58pub use catalog::*;