mochow_sdk_rust/lib.rs
1/*
2 * Copyright 2024 Baidu, Inc.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file
5 * except in compliance with the License. You may obtain a copy of the License at
6 *
7 * http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software distributed under the
10 * License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
11 * either express or implied. See the License for the specific language governing permissions
12 * and limitations under the License.
13 */
14
15//! ## Example
16//!
17//! ```
18//! use mochow_rust_sdk::mochow;
19//!
20//! const ACCOUNT: &str = "your_account";
21//! const PASSWORD: &str = "your_password";
22//! const ENDPOINT: &str = "http://127.0.0.1:5287";
23//!
24//! #[tokio::main]
25//! async fn main() {
26//! let client = mochow::client::MochowClient::new(ACCOUNT, PASSWORD, ENDPOINT).unwrap();
27//!
28//! let _create_database_resp = client.create_database("book").await.unwrap();
29//!
30//! let list_database_resp = client.list_database().await.unwrap();
31//! println!("database list: {:?}", list_database_resp.databases);
32//!
33//! let _delete_database_resp = client.drop_database("book").await.unwrap();
34//! println!("delete database resp: {}", _delete_database_resp);
35//! }
36//! ```
37//!
38pub mod error;
39pub mod mochow;
40
41mod auth;