rename m_captcha -> libmcaptcha
This commit is contained in:
parent
8f0f0daf1e
commit
a4d58cd556
8 changed files with 31 additions and 31 deletions
32
Cargo.lock
generated
32
Cargo.lock
generated
|
@ -616,6 +616,22 @@ version = "0.2.92"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "56d855069fafbb9b344c0f962150cd2c1187975cb1c22c1522c240d8c4986714"
|
||||
|
||||
[[package]]
|
||||
name = "libmcaptcha"
|
||||
version = "0.1.3"
|
||||
dependencies = [
|
||||
"actix",
|
||||
"actix-rt",
|
||||
"derive_builder 0.9.0",
|
||||
"derive_more",
|
||||
"log",
|
||||
"pow_sha256",
|
||||
"pretty_env_logger",
|
||||
"rand 0.8.3",
|
||||
"serde",
|
||||
"serde_json",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "linked-hash-map"
|
||||
version = "0.5.4"
|
||||
|
@ -649,22 +665,6 @@ dependencies = [
|
|||
"linked-hash-map",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "m_captcha"
|
||||
version = "0.1.3"
|
||||
dependencies = [
|
||||
"actix",
|
||||
"actix-rt",
|
||||
"derive_builder 0.9.0",
|
||||
"derive_more",
|
||||
"log",
|
||||
"pow_sha256",
|
||||
"pretty_env_logger",
|
||||
"rand 0.8.3",
|
||||
"serde",
|
||||
"serde_json",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "match_cfg"
|
||||
version = "0.1.0"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
[package]
|
||||
name = "m_captcha"
|
||||
name = "libmcaptcha"
|
||||
version = "0.1.3"
|
||||
authors = ["realaravinth <realaravinth@batsense.net>"]
|
||||
description = "Convenient abstractions for all things credentials"
|
||||
|
|
14
README.md
14
README.md
|
@ -1,16 +1,16 @@
|
|||
<div align="center">
|
||||
<h1>mCaptcha</h1>
|
||||
<h1>libmcaptcha</h1>
|
||||
<p>
|
||||
<strong>mCaptcha - PoW based DoS protection</strong>
|
||||
</p>
|
||||
|
||||
[![Documentation](https://img.shields.io/badge/docs-master-yellow)](https://mcaptcha.github.io/mCaptcha/m_captcha/index.html)
|
||||
[![Documentation](https://img.shields.io/badge/docs-master-yellow)](https://mcaptcha.github.io/mCaptcha/libmcaptcha/index.html)
|
||||
[![Documentation](https://img.shields.io/badge/docs-0.1.3-blue)](https://mcaptcha.org/docs/api/mcaptcha-system)
|
||||
[![dependency status](https://deps.rs/repo/github/mCaptcha/mCaptcha/status.svg)](https://deps.rs/repo/github/mCaptcha/mCaptcha)
|
||||
[![dependency status](https://deps.rs/repo/github/mCaptcha/libmcaptcha/status.svg)](https://deps.rs/repo/github/mCaptcha/libmcaptcha)
|
||||
[![AGPL License](https://img.shields.io/badge/license-AGPL-blue.svg)](http://www.gnu.org/licenses/agpl-3.0)
|
||||
![CI (Linux)](<https://github.com/mCaptcha/mCaptcha/workflows/CI%20(Linux)/badge.svg>)
|
||||
![CI (Linux)](<https://github.com/mCaptcha/libmcaptcha/workflows/CI%20(Linux)/badge.svg>)
|
||||
<br />
|
||||
[![codecov](https://codecov.io/gh/mCaptcha/mCaptcha/branch/master/graph/badge.svg)](https://codecov.io/gh/mCaptcha/mCaptcha)
|
||||
[![codecov](https://codecov.io/gh/mCaptcha/libmcaptcha/branch/master/graph/badge.svg)](https://codecov.io/gh/mCaptcha/libmcaptcha)
|
||||
[![Documentation](https://img.shields.io/badge/matrix-community-purple)](https://matrix.to/#/+mcaptcha:matrix.batsense.net)
|
||||
|
||||
</div>
|
||||
|
@ -48,12 +48,12 @@ development, database frequently wiped).
|
|||
|
||||
### Self-hosted:
|
||||
|
||||
Please refer to [mCaptcha/guard](https://github.com/mCaptcha/guard) for
|
||||
Please refer to [mCaptcha/mCaptcha](https://github.com/mCaptcha/mCaptcha) for
|
||||
instructions.
|
||||
|
||||
## Documentation
|
||||
|
||||
- [master-branch](https://mcaptcha.github.io/mCaptcha/m_captcha/index.html)
|
||||
- [master-branch](https://mcaptcha.github.io/mCaptcha/libmcaptcha/index.html)
|
||||
- [All published versions](https://mcaptcha.org/docs/api/mcaptcha-system)
|
||||
|
||||
## Usage
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
use m_captcha::{
|
||||
use libmcaptcha::{
|
||||
cache::{messages::VerifyCaptchaResult, HashCache},
|
||||
master::{AddSiteBuilder, Master},
|
||||
pow::{ConfigBuilder, Work},
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
|
||||
//! Defense datatypes
|
||||
//! ```rust
|
||||
//! use m_captcha::{LevelBuilder, DefenseBuilder};
|
||||
//! use libmcaptcha::{LevelBuilder, DefenseBuilder};
|
||||
//! DefenseBuilder::default()
|
||||
//! .add_level(
|
||||
//! LevelBuilder::default()
|
||||
|
|
|
@ -23,13 +23,13 @@ use derive_more::{Display, Error};
|
|||
#[derive(Debug, PartialEq, Display, Clone, Error)]
|
||||
#[cfg(not(tarpaulin_include))]
|
||||
pub enum CaptchaError {
|
||||
/// When configuring m_captcha, [DefenseBuilder][crate::defense::DefenseBuilder]
|
||||
/// When configuring libmcaptcha, [DefenseBuilder][crate::defense::DefenseBuilder]
|
||||
/// must be passed atleast one `LevelConfig` if not this error will arise
|
||||
#[display(fmt = "LevelBuilder should have atleaset one level configured")]
|
||||
LevelEmpty,
|
||||
|
||||
/// Visitor count must be a whole number(zero and above).
|
||||
/// When configuring m_captcha, [LevelBuilder][crate::defense::LevelBuilder].
|
||||
/// When configuring libmcaptcha, [LevelBuilder][crate::defense::LevelBuilder].
|
||||
/// difficulty_factor must be set to greater than zero.
|
||||
#[display(fmt = "difficulty factor must be greater than zero")]
|
||||
DifficultyFactorZero,
|
||||
|
@ -82,5 +82,5 @@ pub enum CaptchaError {
|
|||
PleaseSetValue(#[error(not(source))] String),
|
||||
}
|
||||
|
||||
/// [Result] datatype for m_captcha
|
||||
/// [Result] datatype for libmcaptcha
|
||||
pub type CaptchaResult<V> = std::result::Result<V, CaptchaError>;
|
||||
|
|
|
@ -46,7 +46,7 @@
|
|||
//! ## Example:
|
||||
//!
|
||||
//! ```rust
|
||||
//! use m_captcha::{
|
||||
//! use libmcaptcha::{
|
||||
//! cache::{messages::VerifyCaptchaResult, HashCache},
|
||||
//! master::{AddSiteBuilder, Master},
|
||||
//! pow::{ConfigBuilder, Work},
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
//!
|
||||
//! ## Usage:
|
||||
//! ```rust
|
||||
//! use m_captcha::{mcaptcha::AddVisitor, MCaptchaBuilder, cache::HashCache, LevelBuilder, DefenseBuilder};
|
||||
//! use libmcaptcha::{mcaptcha::AddVisitor, MCaptchaBuilder, cache::HashCache, LevelBuilder, DefenseBuilder};
|
||||
//! // traits from actix needs to be in scope for starting actor
|
||||
//! use actix::prelude::*;
|
||||
//!
|
||||
|
|
Loading…
Reference in a new issue