Skip to content

Commit

Permalink
add display and fromstr to spec entities
Browse files Browse the repository at this point in the history
  • Loading branch information
JanKaul committed May 12, 2024
1 parent acce951 commit 75cdc4e
Show file tree
Hide file tree
Showing 43 changed files with 3,318 additions and 23 deletions.
342 changes: 320 additions & 22 deletions Cargo.lock

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ members = [
"datafusion_iceberg",
"datafusion-iceberg-sql",
"iceberg-sql-catalog",
"iceberg-rest-catalog",
]

resolver = "2"
Expand Down
3 changes: 3 additions & 0 deletions iceberg-rest-catalog/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/target/
**/*.rs.bk
Cargo.lock
20 changes: 20 additions & 0 deletions iceberg-rest-catalog/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
[package]
name = "iceberg-rest-catalog"
version = "0.0.1"
authors = ["OpenAPI Generator team and contributors"]
description = "Defines the specification for the first version of the REST Catalog API. Implementations should ideally support both Iceberg table specs v1 and v2, with priority given to v2."
license = "Apache 2.0"
edition = "2018"

[dependencies]
serde = "^1.0"
serde_derive = "^1.0"
serde_with = { version = "^3", default-features = false, features = ["base64", "std", "macros"] }
serde_json = "^1.0"
url = "^2.2"
uuid = { version = "^1.0", features = ["serde", "v4"] }
reqwest-middleware = "0.2.0"
iceberg-rust = { path = "../iceberg-rust", version = "0.3.0" }
[dependencies.reqwest]
version = "^0.11"
features = ["json", "multipart"]
176 changes: 176 additions & 0 deletions iceberg-rest-catalog/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,176 @@
# Rust API client for iceberg-rest-catalog

Defines the specification for the first version of the REST Catalog API. Implementations should ideally support both Iceberg table specs v1 and v2, with priority given to v2.


## Overview

This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [openapi-spec](https://openapis.org) from a remote server, you can easily generate an API client.

- API version: 0.0.1
- Package version: 0.0.1
- Generator version: 7.6.0-SNAPSHOT
- Build package: `org.openapitools.codegen.languages.RustClientCodegen`

## Installation

Put the package under your project folder in a directory named `iceberg-rest-catalog` and add the following to `Cargo.toml` under `[dependencies]`:

```
iceberg-rest-catalog = { path = "./iceberg-rest-catalog" }
```

## Documentation for API Endpoints

All URIs are relative to *https://localhost*

Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*CatalogApiApi* | [**commit_transaction**](docs/CatalogApiApi.md#commit_transaction) | **POST** /v1/{prefix}/transactions/commit | Commit updates to multiple tables in an atomic operation
*CatalogApiApi* | [**create_namespace**](docs/CatalogApiApi.md#create_namespace) | **POST** /v1/{prefix}/namespaces | Create a namespace
*CatalogApiApi* | [**create_table**](docs/CatalogApiApi.md#create_table) | **POST** /v1/{prefix}/namespaces/{namespace}/tables | Create a table in the given namespace
*CatalogApiApi* | [**create_view**](docs/CatalogApiApi.md#create_view) | **POST** /v1/{prefix}/namespaces/{namespace}/views | Create a view in the given namespace
*CatalogApiApi* | [**drop_namespace**](docs/CatalogApiApi.md#drop_namespace) | **DELETE** /v1/{prefix}/namespaces/{namespace} | Drop a namespace from the catalog. Namespace must be empty.
*CatalogApiApi* | [**drop_table**](docs/CatalogApiApi.md#drop_table) | **DELETE** /v1/{prefix}/namespaces/{namespace}/tables/{table} | Drop a table from the catalog
*CatalogApiApi* | [**drop_view**](docs/CatalogApiApi.md#drop_view) | **DELETE** /v1/{prefix}/namespaces/{namespace}/views/{view} | Drop a view from the catalog
*CatalogApiApi* | [**list_namespaces**](docs/CatalogApiApi.md#list_namespaces) | **GET** /v1/{prefix}/namespaces | List namespaces, optionally providing a parent namespace to list underneath
*CatalogApiApi* | [**list_tables**](docs/CatalogApiApi.md#list_tables) | **GET** /v1/{prefix}/namespaces/{namespace}/tables | List all table identifiers underneath a given namespace
*CatalogApiApi* | [**list_views**](docs/CatalogApiApi.md#list_views) | **GET** /v1/{prefix}/namespaces/{namespace}/views | List all view identifiers underneath a given namespace
*CatalogApiApi* | [**load_namespace_metadata**](docs/CatalogApiApi.md#load_namespace_metadata) | **GET** /v1/{prefix}/namespaces/{namespace} | Load the metadata properties for a namespace
*CatalogApiApi* | [**load_table**](docs/CatalogApiApi.md#load_table) | **GET** /v1/{prefix}/namespaces/{namespace}/tables/{table} | Load a table from the catalog
*CatalogApiApi* | [**load_view**](docs/CatalogApiApi.md#load_view) | **GET** /v1/{prefix}/namespaces/{namespace}/views/{view} | Load a view from the catalog
*CatalogApiApi* | [**namespace_exists**](docs/CatalogApiApi.md#namespace_exists) | **HEAD** /v1/{prefix}/namespaces/{namespace} | Check if a namespace exists
*CatalogApiApi* | [**register_table**](docs/CatalogApiApi.md#register_table) | **POST** /v1/{prefix}/namespaces/{namespace}/register | Register a table in the given namespace using given metadata file location
*CatalogApiApi* | [**rename_table**](docs/CatalogApiApi.md#rename_table) | **POST** /v1/{prefix}/tables/rename | Rename a table from its current name to a new name
*CatalogApiApi* | [**rename_view**](docs/CatalogApiApi.md#rename_view) | **POST** /v1/{prefix}/views/rename | Rename a view from its current name to a new name
*CatalogApiApi* | [**replace_view**](docs/CatalogApiApi.md#replace_view) | **POST** /v1/{prefix}/namespaces/{namespace}/views/{view} | Replace a view
*CatalogApiApi* | [**report_metrics**](docs/CatalogApiApi.md#report_metrics) | **POST** /v1/{prefix}/namespaces/{namespace}/tables/{table}/metrics | Send a metrics report to this endpoint to be processed by the backend
*CatalogApiApi* | [**table_exists**](docs/CatalogApiApi.md#table_exists) | **HEAD** /v1/{prefix}/namespaces/{namespace}/tables/{table} | Check if a table exists
*CatalogApiApi* | [**update_properties**](docs/CatalogApiApi.md#update_properties) | **POST** /v1/{prefix}/namespaces/{namespace}/properties | Set or remove properties on a namespace
*CatalogApiApi* | [**update_table**](docs/CatalogApiApi.md#update_table) | **POST** /v1/{prefix}/namespaces/{namespace}/tables/{table} | Commit updates to a table
*CatalogApiApi* | [**view_exists**](docs/CatalogApiApi.md#view_exists) | **HEAD** /v1/{prefix}/namespaces/{namespace}/views/{view} | Check if a view exists
*ConfigurationApiApi* | [**get_config**](docs/ConfigurationApiApi.md#get_config) | **GET** /v1/config | List all catalog configuration settings
*OAuth2ApiApi* | [**get_token**](docs/OAuth2ApiApi.md#get_token) | **POST** /v1/oauth/tokens | Get a token using an OAuth2 flow


## Documentation For Models

- [AddPartitionSpecUpdate](docs/AddPartitionSpecUpdate.md)
- [AddSchemaUpdate](docs/AddSchemaUpdate.md)
- [AddSnapshotUpdate](docs/AddSnapshotUpdate.md)
- [AddSortOrderUpdate](docs/AddSortOrderUpdate.md)
- [AddViewVersionUpdate](docs/AddViewVersionUpdate.md)
- [AndOrExpression](docs/AndOrExpression.md)
- [AssertCreate](docs/AssertCreate.md)
- [AssertCurrentSchemaId](docs/AssertCurrentSchemaId.md)
- [AssertDefaultSortOrderId](docs/AssertDefaultSortOrderId.md)
- [AssertDefaultSpecId](docs/AssertDefaultSpecId.md)
- [AssertLastAssignedFieldId](docs/AssertLastAssignedFieldId.md)
- [AssertLastAssignedPartitionId](docs/AssertLastAssignedPartitionId.md)
- [AssertRefSnapshotId](docs/AssertRefSnapshotId.md)
- [AssertTableUuid](docs/AssertTableUuid.md)
- [AssertViewUuid](docs/AssertViewUuid.md)
- [AssignUuidUpdate](docs/AssignUuidUpdate.md)
- [BaseUpdate](docs/BaseUpdate.md)
- [BlobMetadata](docs/BlobMetadata.md)
- [CatalogConfig](docs/CatalogConfig.md)
- [CommitReport](docs/CommitReport.md)
- [CommitTableRequest](docs/CommitTableRequest.md)
- [CommitTableResponse](docs/CommitTableResponse.md)
- [CommitTransactionRequest](docs/CommitTransactionRequest.md)
- [CommitViewRequest](docs/CommitViewRequest.md)
- [ContentFile](docs/ContentFile.md)
- [CountMap](docs/CountMap.md)
- [CounterResult](docs/CounterResult.md)
- [CreateNamespaceRequest](docs/CreateNamespaceRequest.md)
- [CreateNamespaceResponse](docs/CreateNamespaceResponse.md)
- [CreateTableRequest](docs/CreateTableRequest.md)
- [CreateViewRequest](docs/CreateViewRequest.md)
- [DataFile](docs/DataFile.md)
- [EqualityDeleteFile](docs/EqualityDeleteFile.md)
- [ErrorModel](docs/ErrorModel.md)
- [Expression](docs/Expression.md)
- [FileFormat](docs/FileFormat.md)
- [GetNamespaceResponse](docs/GetNamespaceResponse.md)
- [IcebergErrorResponse](docs/IcebergErrorResponse.md)
- [ListNamespacesResponse](docs/ListNamespacesResponse.md)
- [ListTablesResponse](docs/ListTablesResponse.md)
- [ListType](docs/ListType.md)
- [LiteralExpression](docs/LiteralExpression.md)
- [LoadTableResult](docs/LoadTableResult.md)
- [LoadViewResult](docs/LoadViewResult.md)
- [MapType](docs/MapType.md)
- [MetadataLogInner](docs/MetadataLogInner.md)
- [MetricResult](docs/MetricResult.md)
- [NotExpression](docs/NotExpression.md)
- [NullOrder](docs/NullOrder.md)
- [OAuthError](docs/OAuthError.md)
- [OAuthTokenResponse](docs/OAuthTokenResponse.md)
- [PartitionField](docs/PartitionField.md)
- [PartitionSpec](docs/PartitionSpec.md)
- [PartitionStatisticsFile](docs/PartitionStatisticsFile.md)
- [PositionDeleteFile](docs/PositionDeleteFile.md)
- [PrimitiveTypeValue](docs/PrimitiveTypeValue.md)
- [RegisterTableRequest](docs/RegisterTableRequest.md)
- [RemovePartitionStatisticsUpdate](docs/RemovePartitionStatisticsUpdate.md)
- [RemovePropertiesUpdate](docs/RemovePropertiesUpdate.md)
- [RemoveSnapshotRefUpdate](docs/RemoveSnapshotRefUpdate.md)
- [RemoveSnapshotsUpdate](docs/RemoveSnapshotsUpdate.md)
- [RemoveStatisticsUpdate](docs/RemoveStatisticsUpdate.md)
- [RenameTableRequest](docs/RenameTableRequest.md)
- [ReportMetricsRequest](docs/ReportMetricsRequest.md)
- [ScanReport](docs/ScanReport.md)
- [Schema](docs/Schema.md)
- [SetCurrentSchemaUpdate](docs/SetCurrentSchemaUpdate.md)
- [SetCurrentViewVersionUpdate](docs/SetCurrentViewVersionUpdate.md)
- [SetDefaultSortOrderUpdate](docs/SetDefaultSortOrderUpdate.md)
- [SetDefaultSpecUpdate](docs/SetDefaultSpecUpdate.md)
- [SetExpression](docs/SetExpression.md)
- [SetLocationUpdate](docs/SetLocationUpdate.md)
- [SetPartitionStatisticsUpdate](docs/SetPartitionStatisticsUpdate.md)
- [SetPropertiesUpdate](docs/SetPropertiesUpdate.md)
- [SetSnapshotRefUpdate](docs/SetSnapshotRefUpdate.md)
- [SetStatisticsUpdate](docs/SetStatisticsUpdate.md)
- [Snapshot](docs/Snapshot.md)
- [SnapshotLogInner](docs/SnapshotLogInner.md)
- [SnapshotReference](docs/SnapshotReference.md)
- [SnapshotSummary](docs/SnapshotSummary.md)
- [SortDirection](docs/SortDirection.md)
- [SortField](docs/SortField.md)
- [SortOrder](docs/SortOrder.md)
- [SqlViewRepresentation](docs/SqlViewRepresentation.md)
- [StatisticsFile](docs/StatisticsFile.md)
- [StructField](docs/StructField.md)
- [StructType](docs/StructType.md)
- [TableIdentifier](docs/TableIdentifier.md)
- [TableMetadata](docs/TableMetadata.md)
- [TableRequirement](docs/TableRequirement.md)
- [TableUpdate](docs/TableUpdate.md)
- [Term](docs/Term.md)
- [TimerResult](docs/TimerResult.md)
- [TokenType](docs/TokenType.md)
- [TransformTerm](docs/TransformTerm.md)
- [Type](docs/Type.md)
- [UnaryExpression](docs/UnaryExpression.md)
- [UpdateNamespacePropertiesRequest](docs/UpdateNamespacePropertiesRequest.md)
- [UpdateNamespacePropertiesResponse](docs/UpdateNamespacePropertiesResponse.md)
- [UpgradeFormatVersionUpdate](docs/UpgradeFormatVersionUpdate.md)
- [ValueMap](docs/ValueMap.md)
- [ViewHistoryEntry](docs/ViewHistoryEntry.md)
- [ViewMetadata](docs/ViewMetadata.md)
- [ViewRepresentation](docs/ViewRepresentation.md)
- [ViewRequirement](docs/ViewRequirement.md)
- [ViewUpdate](docs/ViewUpdate.md)
- [ViewVersion](docs/ViewVersion.md)


To get access to the crate's generated documentation, use:

```
cargo doc --open
```

## Author



Loading

0 comments on commit 75cdc4e

Please sign in to comment.