1
0
mirror of https://github.com/actix/examples synced 2024-11-27 16:02:57 +01:00

chore: rename middleware dirs

This commit is contained in:
Rob Ede 2023-10-29 23:51:05 +00:00
parent 5d36d72976
commit 0de1c02762
No known key found for this signature in database
GPG Key ID: 97C636207D3EF933
21 changed files with 43 additions and 38 deletions

44
Cargo.lock generated
View File

@ -4711,28 +4711,6 @@ dependencies = [
"serde_json", "serde_json",
] ]
[[package]]
name = "middleware-example"
version = "1.0.0"
dependencies = [
"actix-http",
"actix-web",
"actix-web-lab",
"env_logger",
"futures-util",
"log",
"pin-project",
]
[[package]]
name = "middleware-ext-mut"
version = "1.0.0"
dependencies = [
"actix-web",
"env_logger",
"log",
]
[[package]] [[package]]
name = "middleware-http-to-https" name = "middleware-http-to-https"
version = "1.0.0" version = "1.0.0"
@ -4757,6 +4735,28 @@ dependencies = [
"log", "log",
] ]
[[package]]
name = "middleware-request-extensions"
version = "1.0.0"
dependencies = [
"actix-web",
"env_logger",
"log",
]
[[package]]
name = "middleware-various"
version = "1.0.0"
dependencies = [
"actix-http",
"actix-web",
"actix-web-lab",
"env_logger",
"futures-util",
"log",
"pin-project",
]
[[package]] [[package]]
name = "mime" name = "mime"
version = "0.3.17" version = "0.3.17"

View File

@ -41,11 +41,11 @@ members = [
"json/json-validation", "json/json-validation",
"json/json", "json/json",
"json/jsonrpc", "json/jsonrpc",
"middleware/middleware-encrypted-payloads", "middleware/encrypted-payloads",
"middleware/middleware-ext-mut", "middleware/http-to-https",
"middleware/middleware-http-to-https",
"middleware/middleware",
"middleware/rate-limit", "middleware/rate-limit",
"middleware/request-extensions",
"middleware/various",
"protobuf", "protobuf",
"run-in-thread", "run-in-thread",
"server-sent-events", "server-sent-events",

View File

@ -1,7 +1,8 @@
[package] [package]
name = "middleware-encrypted-payloads" name = "middleware-encrypted-payloads"
version = "1.0.0" version = "1.0.0"
edition = "2021" publish.workspace = true
edition.workspace = true
[dependencies] [dependencies]
actix-http.workspace = true actix-http.workspace = true

View File

@ -1,7 +1,8 @@
[package] [package]
name = "middleware-http-to-https" name = "middleware-http-to-https"
version = "1.0.0" version = "1.0.0"
edition = "2021" publish.workspace = true
edition.workspace = true
[dependencies] [dependencies]
actix-web = { workspace = true, features = ["rustls-0_21"] } actix-web = { workspace = true, features = ["rustls-0_21"] }

View File

@ -15,6 +15,6 @@ Now, the only problem left to solve is, to listen to **HTTP** connections as wel
## Usage ## Usage
```sh ```sh
cd middleware/middleware-http-to-https cd middleware/http-to-https
cargo run cargo run
``` ```

View File

@ -1,7 +1,8 @@
[package] [package]
name = "middleware-ext-mut" name = "middleware-request-extensions"
version = "1.0.0" version = "1.0.0"
edition = "2021" publish.workspace = true
edition.workspace = true
[dependencies] [dependencies]
actix-web.workspace = true actix-web.workspace = true

View File

@ -1,11 +1,11 @@
# Middleware: Add/Retrieve Request-Local Data # Middleware: Add/Retrieve Request-Local Data
This example showcases a middleware that adds and retrieves request-local data. See also the [middleware guide](https://actix.rs/docs/middleware/). This example showcases a middleware that adds and retrieves request-local data. See also the [middleware guide](https://actix.rs/docs/middleware).
## Usage ## Usage
```sh ```sh
cd middleware/middleware-ext-mut cd middleware/request-extensions
cargo run cargo run
``` ```

View File

@ -1,7 +1,8 @@
[package] [package]
name = "middleware-example" name = "middleware-various"
version = "1.0.0" version = "1.0.0"
edition = "2021" publish.workspace = true
edition.workspace = true
[dependencies] [dependencies]
actix-http.workspace = true actix-http.workspace = true

View File

@ -1,13 +1,14 @@
# Middleware: Various # Middleware: Various
This example showcases a bunch of different uses of middleware. See also the [Middleware guide](https://actix.rs/docs/middleware/). This example showcases a bunch of different uses of middleware.
See also the [Middleware guide](https://actix.rs/docs/middleware).
## Usage ## Usage
```sh ```sh
cd basics/middleware cd middleware/various
cargo run cargo run
# Started http server: 127.0.0.1:8080
``` ```
Look in `src/main.rs` and comment the different middleware in/out to see how they function. Look in `src/main.rs` and comment the different middleware in/out to see how they function.