mirror of
https://github.com/actix/actix-extras.git
synced 2025-03-20 20:05:18 +01:00
align descriptions
This commit is contained in:
parent
446c92c3d0
commit
07c5176bd0
12
README.md
12
README.md
@ -11,13 +11,13 @@
|
|||||||
|
|
||||||
| Crate | | |
|
| Crate | | |
|
||||||
| -------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- |
|
| -------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- |
|
||||||
| [actix-cors] | [](https://crates.io/crates/actix-cors) [](https://deps.rs/crate/actix-cors/0.6.1) | Cross-origin resource sharing (CORS) for actix-web applications. |
|
| [actix-cors] | [](https://crates.io/crates/actix-cors) [](https://deps.rs/crate/actix-cors/0.6.1) | Cross-Origin Resource Sharing (CORS) controls. |
|
||||||
| [actix-identity] | [](https://crates.io/crates/actix-identity) [](https://deps.rs/crate/actix-identity/0.4.0) | Identity service for actix-web framework. |
|
| [actix-identity] | [](https://crates.io/crates/actix-identity) [](https://deps.rs/crate/actix-identity/0.4.0) | Identity management. |
|
||||||
| [actix-limitation] | [](https://crates.io/crates/actix-limitation) [](https://deps.rs/crate/actix-limitation/0.3.0) | Rate-limiting using a fixed window counter for arbitrary keys, backed by Redis. |
|
| [actix-limitation] | [](https://crates.io/crates/actix-limitation) [](https://deps.rs/crate/actix-limitation/0.3.0) | Rate-limiting using a fixed window counter for arbitrary keys, backed by Redis. |
|
||||||
| [actix-protobuf] | [](https://crates.io/crates/actix-protobuf) [](https://deps.rs/crate/actix-protobuf/0.8.0) | Protobuf support for actix-web framework. |
|
| [actix-protobuf] | [](https://crates.io/crates/actix-protobuf) [](https://deps.rs/crate/actix-protobuf/0.8.0) | Protobuf payload extractor. |
|
||||||
| [actix-redis] | [](https://crates.io/crates/actix-redis) [](https://deps.rs/crate/actix-redis/0.12.0) | Redis integration for actix framework. |
|
| [actix-redis] | [](https://crates.io/crates/actix-redis) [](https://deps.rs/crate/actix-redis/0.12.0) | Actor-based Redis client. |
|
||||||
| [actix-session] | [](https://crates.io/crates/actix-session) [](https://deps.rs/crate/actix-session/0.7.0) | Session for actix-web framework. |
|
| [actix-session] | [](https://crates.io/crates/actix-session) [](https://deps.rs/crate/actix-session/0.7.0) | Session management. |
|
||||||
| [actix-web-httpauth] | [](https://crates.io/crates/actix-web-httpauth) [](https://deps.rs/crate/actix-web-httpauth/0.8.0) | HTTP authentication schemes for actix-web. |
|
| [actix-web-httpauth] | [](https://crates.io/crates/actix-web-httpauth) [](https://deps.rs/crate/actix-web-httpauth/0.8.0) | HTTP authentication schemes. |
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
# actix-cors
|
# actix-cors
|
||||||
|
|
||||||
> Cross-origin resource sharing (CORS) for Actix Web.
|
> Cross-Origin Resource Sharing (CORS) controls for Actix Web.
|
||||||
|
|
||||||
[](https://crates.io/crates/actix-cors)
|
[](https://crates.io/crates/actix-cors)
|
||||||
[](https://docs.rs/actix-cors/0.6.1)
|
[](https://docs.rs/actix-cors/0.6.1)
|
||||||
|
@ -5,7 +5,7 @@ authors = [
|
|||||||
"Nikolay Kim <fafhrd91@gmail.com>",
|
"Nikolay Kim <fafhrd91@gmail.com>",
|
||||||
"Luca Palmieri <rust@lpalmieri.com>",
|
"Luca Palmieri <rust@lpalmieri.com>",
|
||||||
]
|
]
|
||||||
description = "Identity service for Actix Web"
|
description = "Identity management for Actix Web"
|
||||||
keywords = ["actix", "auth", "identity", "web", "security"]
|
keywords = ["actix", "auth", "identity", "web", "security"]
|
||||||
homepage = "https://actix.rs"
|
homepage = "https://actix.rs"
|
||||||
repository = "https://github.com/actix/actix-extras.git"
|
repository = "https://github.com/actix/actix-extras.git"
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
# actix-identity
|
# actix-identity
|
||||||
|
|
||||||
> Identity service for actix-web framework.
|
> Identity management for Actix Web.
|
||||||
|
|
||||||
[](https://crates.io/crates/actix-identity)
|
[](https://crates.io/crates/actix-identity)
|
||||||
[](https://docs.rs/actix-identity/0.5.2)
|
[](https://docs.rs/actix-identity/0.5.2)
|
||||||
@ -9,5 +9,5 @@
|
|||||||
|
|
||||||
## Documentation & community resources
|
## Documentation & community resources
|
||||||
|
|
||||||
* [API Documentation](https://docs.rs/actix-identity)
|
- [API Documentation](https://docs.rs/actix-identity)
|
||||||
* Minimum Supported Rust Version (MSRV): 1.57
|
- Minimum Supported Rust Version (MSRV): 1.57
|
||||||
|
@ -6,7 +6,7 @@ authors = [
|
|||||||
"kingxsp <jin.hb.zh@outlook.com>",
|
"kingxsp <jin.hb.zh@outlook.com>",
|
||||||
"Yuki Okushi <huyuumi.dev@gmail.com>",
|
"Yuki Okushi <huyuumi.dev@gmail.com>",
|
||||||
]
|
]
|
||||||
description = "Protobuf support for Actix Web"
|
description = "Protobuf payload extractor for Actix Web"
|
||||||
keywords = ["actix", "web", "protobuf", "protocol", "rpc"]
|
keywords = ["actix", "web", "protobuf", "protocol", "rpc"]
|
||||||
homepage = "https://actix.rs"
|
homepage = "https://actix.rs"
|
||||||
repository = "https://github.com/actix/actix-extras.git"
|
repository = "https://github.com/actix/actix-extras.git"
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
# actix-protobuf
|
# actix-protobuf
|
||||||
|
|
||||||
> Protobuf support for Actix Web.
|
> Protobuf payload extractor for Actix Web.
|
||||||
|
|
||||||
[](https://crates.io/crates/actix-protobuf)
|
[](https://crates.io/crates/actix-protobuf)
|
||||||
[](https://docs.rs/actix-protobuf/0.8.0)
|
[](https://docs.rs/actix-protobuf/0.8.0)
|
||||||
@ -23,6 +23,7 @@ use actix_web::*;
|
|||||||
pub struct MyObj {
|
pub struct MyObj {
|
||||||
#[prost(int32, tag = "1")]
|
#[prost(int32, tag = "1")]
|
||||||
pub number: i32,
|
pub number: i32,
|
||||||
|
|
||||||
#[prost(string, tag = "2")]
|
#[prost(string, tag = "2")]
|
||||||
pub name: String,
|
pub name: String,
|
||||||
}
|
}
|
||||||
@ -33,7 +34,7 @@ async fn index(msg: ProtoBuf<MyObj>) -> Result<HttpResponse> {
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
See [here](https://github.com/actix/actix-extras/tree/master/actix-protobuf/examples/prost-example) for the complete example.
|
See [here](https://github.com/actix/examples/tree/master/protobuf) for the complete example.
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
//! Protobuf payload extractor for Actix Web.
|
||||||
|
|
||||||
#![forbid(unsafe_code)]
|
#![forbid(unsafe_code)]
|
||||||
#![deny(rust_2018_idioms, nonstandard_style)]
|
#![deny(rust_2018_idioms, nonstandard_style)]
|
||||||
#![warn(future_incompatible)]
|
#![warn(future_incompatible)]
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
name = "actix-redis"
|
name = "actix-redis"
|
||||||
version = "0.12.0"
|
version = "0.12.0"
|
||||||
authors = ["Nikolay Kim <fafhrd91@gmail.com>"]
|
authors = ["Nikolay Kim <fafhrd91@gmail.com>"]
|
||||||
description = "Redis integration for Actix"
|
description = "Actor-based Redis client"
|
||||||
license = "MIT OR Apache-2.0"
|
license = "MIT OR Apache-2.0"
|
||||||
keywords = ["actix", "redis", "async"]
|
keywords = ["actix", "redis", "async"]
|
||||||
homepage = "https://actix.rs"
|
homepage = "https://actix.rs"
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
# actix-redis
|
# actix-redis
|
||||||
|
|
||||||
> Redis integration for Actix.
|
> Actor-based Redis client.
|
||||||
|
|
||||||
[](https://crates.io/crates/actix-redis)
|
[](https://crates.io/crates/actix-redis)
|
||||||
[](https://docs.rs/actix-redis/0.12.0)
|
[](https://docs.rs/actix-redis/0.12.0)
|
||||||
|
@ -4,27 +4,26 @@
|
|||||||
#![deny(rust_2018_idioms, nonstandard_style)]
|
#![deny(rust_2018_idioms, nonstandard_style)]
|
||||||
#![warn(future_incompatible)]
|
#![warn(future_incompatible)]
|
||||||
|
|
||||||
mod redis;
|
|
||||||
use derive_more::{Display, Error, From};
|
use derive_more::{Display, Error, From};
|
||||||
pub use redis::{Command, RedisActor};
|
pub use redis_async::{error::Error as RespError, resp::RespValue, resp_array};
|
||||||
|
|
||||||
|
mod redis;
|
||||||
|
pub use self::redis::{Command, RedisActor};
|
||||||
|
|
||||||
/// General purpose `actix-redis` error.
|
/// General purpose `actix-redis` error.
|
||||||
#[derive(Debug, Display, Error, From)]
|
#[derive(Debug, Display, Error, From)]
|
||||||
pub enum Error {
|
pub enum Error {
|
||||||
#[display(fmt = "Redis error {}", _0)]
|
#[display(fmt = "Redis error: {}", _0)]
|
||||||
Redis(redis_async::error::Error),
|
Redis(redis_async::error::Error),
|
||||||
/// Receiving message during reconnecting
|
|
||||||
|
/// Receiving message during reconnecting.
|
||||||
#[display(fmt = "Redis: Not connected")]
|
#[display(fmt = "Redis: Not connected")]
|
||||||
NotConnected,
|
NotConnected,
|
||||||
/// Cancel all waters when connection get dropped
|
|
||||||
|
/// Cancel all waiters when connection is dropped.
|
||||||
#[display(fmt = "Redis: Disconnected")]
|
#[display(fmt = "Redis: Disconnected")]
|
||||||
Disconnected,
|
Disconnected,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(feature = "web")]
|
#[cfg(feature = "web")]
|
||||||
impl actix_web::ResponseError for Error {}
|
impl actix_web::ResponseError for Error {}
|
||||||
|
|
||||||
// re-export
|
|
||||||
pub use redis_async::error::Error as RespError;
|
|
||||||
pub use redis_async::resp::RespValue;
|
|
||||||
pub use redis_async::resp_array;
|
|
||||||
|
@ -1,22 +1,24 @@
|
|||||||
use std::collections::VecDeque;
|
use std::{collections::VecDeque, io};
|
||||||
use std::io;
|
|
||||||
|
|
||||||
use actix::prelude::*;
|
use actix::prelude::*;
|
||||||
use actix_rt::net::TcpStream;
|
use actix_rt::net::TcpStream;
|
||||||
use actix_service::boxed::{self, BoxService};
|
use actix_service::boxed::{self, BoxService};
|
||||||
use actix_tls::connect::{ConnectError, ConnectInfo, Connection, ConnectorService};
|
use actix_tls::connect::{ConnectError, ConnectInfo, Connection, ConnectorService};
|
||||||
use backoff::backoff::Backoff;
|
use backoff::{backoff::Backoff, ExponentialBackoff};
|
||||||
use backoff::ExponentialBackoff;
|
|
||||||
use log::{error, info, warn};
|
use log::{error, info, warn};
|
||||||
use redis_async::error::Error as RespError;
|
use redis_async::{
|
||||||
use redis_async::resp::{RespCodec, RespValue};
|
error::Error as RespError,
|
||||||
use tokio::io::{split, WriteHalf};
|
resp::{RespCodec, RespValue},
|
||||||
use tokio::sync::oneshot;
|
};
|
||||||
|
use tokio::{
|
||||||
|
io::{split, WriteHalf},
|
||||||
|
sync::oneshot,
|
||||||
|
};
|
||||||
use tokio_util::codec::FramedRead;
|
use tokio_util::codec::FramedRead;
|
||||||
|
|
||||||
use crate::Error;
|
use crate::Error;
|
||||||
|
|
||||||
/// Command for send data to Redis
|
/// Command for sending data to Redis.
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
pub struct Command(pub RespValue);
|
pub struct Command(pub RespValue);
|
||||||
|
|
||||||
@ -24,7 +26,7 @@ impl Message for Command {
|
|||||||
type Result = Result<RespValue, Error>;
|
type Result = Result<RespValue, Error>;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Redis communication actor
|
/// Redis communication actor.
|
||||||
pub struct RedisActor {
|
pub struct RedisActor {
|
||||||
addr: String,
|
addr: String,
|
||||||
connector: BoxService<ConnectInfo<String>, Connection<String, TcpStream>, ConnectError>,
|
connector: BoxService<ConnectInfo<String>, Connection<String, TcpStream>, ConnectError>,
|
||||||
|
@ -5,7 +5,7 @@ authors = [
|
|||||||
"Nikolay Kim <fafhrd91@gmail.com>",
|
"Nikolay Kim <fafhrd91@gmail.com>",
|
||||||
"Luca Palmieri <rust@lpalmieri.com>",
|
"Luca Palmieri <rust@lpalmieri.com>",
|
||||||
]
|
]
|
||||||
description = "Session management for Actix Web"
|
description = "Session management for Actix We"
|
||||||
keywords = ["http", "web", "framework", "async", "session"]
|
keywords = ["http", "web", "framework", "async", "session"]
|
||||||
homepage = "https://actix.rs"
|
homepage = "https://actix.rs"
|
||||||
repository = "https://github.com/actix/actix-extras.git"
|
repository = "https://github.com/actix/actix-extras.git"
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
# actix-session
|
# actix-session
|
||||||
|
|
||||||
> Session management for Actix Web applications.
|
> Session management for Actix Web.
|
||||||
|
|
||||||
[](https://crates.io/crates/actix-session)
|
[](https://crates.io/crates/actix-session)
|
||||||
[](https://docs.rs/actix-session/0.7.0)
|
[](https://docs.rs/actix-session/0.7.0)
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
# actix-web-httpauth
|
# actix-web-httpauth
|
||||||
|
|
||||||
> HTTP authentication schemes for [actix-web](https://github.com/actix/actix-web).
|
> HTTP authentication schemes for [Actix Web](https://actix.rs).
|
||||||
|
|
||||||
[](https://crates.io/crates/actix-web-httpauth)
|
[](https://crates.io/crates/actix-web-httpauth)
|
||||||
[](https://docs.rs/actix-web-httpauth/0.8.0)
|
[](https://docs.rs/actix-web-httpauth/0.8.0)
|
||||||
@ -13,6 +13,7 @@
|
|||||||
- Minimum Supported Rust Version (MSRV): 1.57
|
- Minimum Supported Rust Version (MSRV): 1.57
|
||||||
|
|
||||||
## Features
|
## Features
|
||||||
|
|
||||||
- Typed [Authorization] and [WWW-Authenticate] headers
|
- Typed [Authorization] and [WWW-Authenticate] headers
|
||||||
- [Extractors] for authorization headers
|
- [Extractors] for authorization headers
|
||||||
- [Middleware] for easier authorization checking
|
- [Middleware] for easier authorization checking
|
||||||
@ -20,10 +21,10 @@
|
|||||||
All supported schemas can be used in both middleware and request handlers.
|
All supported schemas can be used in both middleware and request handlers.
|
||||||
|
|
||||||
## Supported Schemes
|
## Supported Schemes
|
||||||
|
|
||||||
- [HTTP Basic](https://tools.ietf.org/html/rfc7617)
|
- [HTTP Basic](https://tools.ietf.org/html/rfc7617)
|
||||||
- [OAuth Bearer](https://tools.ietf.org/html/rfc6750)
|
- [OAuth Bearer](https://tools.ietf.org/html/rfc6750)
|
||||||
|
|
||||||
|
|
||||||
<!-- LINKS -->
|
<!-- LINKS -->
|
||||||
|
|
||||||
[Authorization]: https://docs.rs/actix-web-httpauth/*/actix_web_httpauth/headers/authorization/index.html
|
[Authorization]: https://docs.rs/actix-web-httpauth/*/actix_web_httpauth/headers/authorization/index.html
|
||||||
|
Loading…
x
Reference in New Issue
Block a user