Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix doc, publish rc.12 #115

Merged
merged 1 commit into from
May 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ codegen-units = 1
opt-level = "z"

[workspace.package]
version = "0.1.0-rc.11"
version = "0.1.0-rc.12"
authors = ["gudaoxuri <i@sunisle.org>"]
description = "Elegant, clean Rust development framework"
keywords = ["http", "database", "web", "redis", "mq"]
Expand Down
4 changes: 2 additions & 2 deletions tardis/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ tardis = { version = "^0", features = ["web-server"] }

Processor Configuration

```rust
```rust ignore
use tardis::basic::error::TardisError;
use tardis::web::poem_openapi;
use tardis::web::poem_openapi::param::Query;
Expand All @@ -100,7 +100,7 @@ impl Api {

Startup class configuration

```rust
```rust ignore
use tardis::basic::result::TardisResult;
use tardis::tokio;
use tardis::TardisFuns;
Expand Down
118 changes: 1 addition & 117 deletions tardis/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,120 +1,4 @@
//! **Elegant, Clean Rust development framework🛸**
//!
//! > TARDIS(\[tɑːrdɪs\] "Time And Relative Dimension In Space") From "Doctor Who".
//!
//! ## 💖 Core functions
//!
//! * Relational database client for MySQL, PostgresSQL
//! * Web service and web client for OpenAPI v3.x
//! * Distributed cache client for Redis protocol
//! * RabbitMQ client for AMQP protocol
//! * Search client for Elasticsearch
//! * Mail client for SMTP protocol
//! * Object Storage client for arbitrary S3 compatible APIs
//! * Mainstream encryption algorithms and SM2/3/4 algorithms
//! * Containerized unit testing of mainstream middleware
//! * Multi-environment configuration
//! * Multi-application aggregation
//! * Configure encryption support
//! * Internationalization and localization support
//! * Commonly used operations (E.g. uniform error handling, encryption and decryption, regular checksums)
//!
//! ## ⚙️Key Features
//!
//! * ``conf-remote`` enable the unified configuration center
//! * ``crypto`` encryption, decryption and digest operations
//! * ``crypto-with-sm`` encryption, decryption and digest with SM.x operations
//! * ``future`` asynchronous operations
//! * ``reldb-core`` relational database core operations(based on [SeaORM](https://github.com/SeaQL/sea-orm))
//! * ``reldb-postgres`` relational database with postgres driver
//! * ``reldb-mysql`` relational database with mysql driver
//! * ``reldb-sqlite`` relational database with sqlite driver
//! * ``reldb`` relational database with postgres/mysql/sqlite drivers
//! * ``web-server`` web service operations(based on [Poem](https://github.com/poem-web/poem))
//! * ``web-client`` web client operations
//! * ``ws-client`` webscoket client operations
//! * ``cache`` cache operations
//! * ``mq`` message queue operations
//! * ``mail`` mail send operations
//! * ``os`` object Storage operations
//! * ``test`` unit test operations
//!
//! ## 🚀 Quick start
//!
//! The core operations of the framework all use ``TardisFuns`` as an entry point.
//! E.g.
//!
//!> TardisFuns::init(relative_path) // Initialize the configuration
//!> TardisFuns::field.x // Some field operations
//!> TardisFuns::reldb().x // Some relational database operations
//!> TardisFuns::web_server().x // Some web service operations
//!
//! ### Web service example
//!
//! Dependency Configuration
//! ```toml
//! [dependencies]
//! tardis = { version = "^0", features = ["web-server"] }
//! ```
//!
//! Processor Configuration
//!```ignore
//! use tardis::basic::error::TardisError;
//! use tardis::web::poem_openapi;
//! use tardis::web::poem_openapi::param::Query;
//! use tardis::web::web_resp::{TardisApiResult, TardisResp};
//!
//! pub struct Api;
//!
//! #[poem_openapi::OpenApi]
//! impl Api {
//! #[oai(path = "/hello", method = "get")]
//! async fn index(&self, name: Query<Option<String>>) -> TardisResult<String> {
//! match name.0 {
//! Some(name) => TardisResp::ok(format!("hello, {name}!")),
//! None => TardisResp::err(TardisError::NotFound("name does not exist".to_string())),
//! }
//! }
//! }
//! ```
//!
//! Startup class configuration
//!```ignore
//! use tardis::basic::result::TardisResult;
//! use tardis::tokio;
//! use tardis::TardisFuns;
//! use crate::processor::Api;
//! mod processor;
//!
//! #[tokio::main]
//! async fn main() -> TardisResult<()> {
//! // Initial configuration
//! TardisFuns::init("config").await?;
//! // Register the processor and start the web service
//! let web_server = TardisFuns::web_server();
//! web_server.add_module("", Api).start().await?;
//! // wait web service stop
//! web_server.await;
//! Ok(());
//! }
//! ```
//!
//! ### More examples
//!
//! ```ignore
//! |-- examples
//! |-- reldb Relational database usage example
//! |-- web-basic Web service Usage Example
//! |-- web-client Web client Usage Example
//! |-- websocket WebSocket Usage Example
//! |-- cache Cache Usage Example
//! |-- mq Message Queue Usage Example
//! |-- todos A complete project usage example
//! |-- multi-apps Multi-application aggregation example
//! |-- pg-graph-search Graph search by Postgresql example
//! |-- perf-test Performance test case
//! ```

#![doc= include_str!("../README.md")]
#![doc(html_logo_url = "https://raw.githubusercontent.com/ideal-world/tardis/main/logo.png")]
#![cfg_attr(docsrs, feature(doc_cfg))]
#![warn(clippy::unwrap_used, clippy::undocumented_unsafe_blocks, clippy::dbg_macro)]
Expand Down
Loading