mz_cloud_api/
lib.rs

1// Copyright Materialize, Inc. and contributors. All rights reserved.
2//
3// Use of this software is governed by the Business Source License
4// included in the LICENSE file.
5//
6// As of the Change Date specified in that file, in accordance with
7// the Business Source License, use of this software will be governed
8// by the Apache License, Version 2.0.
9
10#![warn(missing_docs)]
11
12//! A client to interact with the Materialize Cloud API.
13//!
14//! # Example
15//!
16//! ```ignore
17//! use mz_cloud_api::client::{Client};
18//! use mz_cloud_api::config::{ClientBuilder, ClientConfig};
19//! use mz_frontegg_client::client::{Client as FronteggClient};
20//! use mz_frontegg_auth::AppPassword;
21//!
22//! // Build the Frontegg Client
23//! let frontegg_client: FronteggClient;
24//!
25//! let config = ClientConfig { frontegg_client };
26//!
27//! let client = ClientBuilder::default()
28//!     .build(config);
29//!
30//! // List all the available providers
31//! let cloud_providers = client.list_cloud_regions().await.unwrap();
32//! ```
33//!
34//! ## Implementation
35//!
36//! It is divided into three modules: [client], [config], [error]
37//!
38//! ## Error
39//!
40//! The [error] crate contains the definitions and structures for all possible errors.
41//!
42//! ## Client
43//!
44//! The Materialize cloud API capabilities are provided by the [client] module.
45//!
46//! ## Config
47//!
48//! The client's builder, instantiation and  configuration reside in the [config] module.
49//! Every client requires an optional endpoint, otherwise, you can use the default.
50//!
51//! ## Note
52//!
53//! This crate is implemented following a similar pattern to [`mz-frontegg-client`], [rust-orb-billing] and [rust-frontegg].
54//!
55//! [mz-frontegg-client]:
56//! [rust-orb-billing]: <https://github.com/MaterializeInc/rust-orb-billing>
57//! [rust-frontegg]: <https://github.com/MaterializeInc/rust-frontegg>
58
59pub mod client;
60pub mod config;
61pub mod error;