mz_frontegg_client/
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 Frontegg client to interact with the Admin API.
13//!
14//! # Example
15//!
16//! ```ignore
17//! use mz_frontegg_client::client::{Client};
18//! use mz_frontegg_client::config::{ClientBuilder, ClientConfig};
19//! use mz_frontegg_auth::AppPassword;
20//!
21//! let app_password = AppPassword {
22//!     client_id: "client-id".parse().unwrap(),
23//!     secret_key: "client-secret".parse().unwrap(),
24//! };
25//!
26//! let config = ClientConfig { app_password };
27//!
28//! let client = ClientBuilder::default()
29//!     .build(config);
30//!
31//! let response = client.list_app_passwords().await?;
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 Frontegg API capabilities are provided by the [client] module,
45//! which currently only enables listing or creating users and passwords.
46//!
47//! ## Config
48//!
49//! The client's builder, instantiation and  configuration reside in the [config] module.
50//! Every client requires an optional endpoint, otherwise, you can use the default.
51//!
52//! ## Note
53//!
54//! This crate is implemented following a similar pattern to [rust-orb-billing] and [rust-frontegg].
55//!
56//! [rust-orb-billing]: https://github.com/MaterializeInc/rust-orb-billing
57//! [rust-frontegg]: https://github.com/MaterializeInc/rust-frontegg
58
59pub(crate) mod parse;
60
61pub mod client;
62pub mod config;
63pub mod error;