From 8ea519fc54e3dad3ce3d6aab734096936921ffa8 Mon Sep 17 00:00:00 2001 From: realaravinth Date: Wed, 24 Mar 2021 12:40:07 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20=20@=20ee548?= =?UTF-8?q?588a85a91ceeb3606a047e2611992e3e02e=20=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- guard/all.html | 2 +- guard/api/v1/fn.services.html | 2 +- guard/api/v1/index.html | 2 +- guard/api/v1/mcaptcha/domains/index.html | 5 + .../api/v1/mcaptcha/domains/sidebar-items.js | 1 + .../mcaptcha/{ => domains}/struct.Domain.html | 20 +- .../{ => domains}/struct.add_domain.html | 10 +- .../{ => domains}/struct.delete_domain.html | 10 +- guard/api/v1/mcaptcha/duration/index.html | 5 + .../api/v1/mcaptcha/duration/sidebar-items.js | 1 + .../{ => duration}/struct.GetDuration.html | 18 +- .../duration/struct.GetDurationResp.html | 116 +++++ .../struct.UpdateDuration.html} | 16 +- .../{ => duration}/struct.get_duration.html | 10 +- .../struct.update_duration.html | 10 +- guard/api/v1/mcaptcha/fn.get_levels_util.html | 4 - guard/api/v1/mcaptcha/fn.get_random.html | 4 - guard/api/v1/mcaptcha/index.html | 8 +- .../mcaptcha/levels/fn.get_levels_util.html | 4 + guard/api/v1/mcaptcha/levels/index.html | 6 + guard/api/v1/mcaptcha/levels/sidebar-items.js | 1 + .../{ => levels}/struct.AddLevels.html | 16 +- .../{ => levels}/struct.GetLevels.html | 16 +- .../{ => levels}/struct.I32Levels.html | 16 +- .../mcaptcha/{ => levels}/struct.Levels.html | 18 +- .../{ => levels}/struct.add_levels.html | 10 +- .../{ => levels}/struct.delete_levels.html | 10 +- .../{ => levels}/struct.get_levels.html | 10 +- .../{ => levels}/struct.update_levels.html | 10 +- .../v1/mcaptcha/mcaptcha/fn.get_random.html | 4 + guard/api/v1/mcaptcha/mcaptcha/index.html | 6 + .../api/v1/mcaptcha/mcaptcha/sidebar-items.js | 1 + .../struct.MCaptchaDetails.html} | 20 +- .../struct.MCaptchaID.html} | 20 +- .../{ => mcaptcha}/struct.add_mcaptcha.html | 10 +- .../struct.delete_mcaptcha.html | 10 +- guard/api/v1/mcaptcha/sidebar-items.js | 2 +- .../service/trait.HttpServiceFactory.js | 2 +- implementors/core/clone/trait.Clone.js | 2 +- implementors/core/fmt/trait.Debug.js | 2 +- implementors/core/marker/trait.Freeze.js | 2 +- implementors/core/marker/trait.Send.js | 2 +- implementors/core/marker/trait.Sync.js | 2 +- implementors/core/marker/trait.Unpin.js | 2 +- implementors/serde/de/trait.Deserialize.js | 2 +- implementors/serde/ser/trait.Serialize.js | 2 +- implementors/std/panic/trait.RefUnwindSafe.js | 2 +- implementors/std/panic/trait.UnwindSafe.js | 2 +- search-index.js | 2 +- source-files.js | 2 +- src/guard/api/v1/mcaptcha/domains.rs.html | 312 ++++++++++++++ src/guard/api/v1/mcaptcha/duration.rs.html | 328 ++++++++++++++ .../levels.rs.html} | 406 +++++++----------- src/guard/api/v1/mcaptcha/mcaptcha.rs.html | 378 ++++++++++++++++ src/guard/api/v1/mcaptcha/mod.rs.html | 52 +++ src/guard/api/v1/mod.rs.html | 30 +- 56 files changed, 1536 insertions(+), 430 deletions(-) create mode 100644 guard/api/v1/mcaptcha/domains/index.html create mode 100644 guard/api/v1/mcaptcha/domains/sidebar-items.js rename guard/api/v1/mcaptcha/{ => domains}/struct.Domain.html (83%) rename guard/api/v1/mcaptcha/{ => domains}/struct.add_domain.html (86%) rename guard/api/v1/mcaptcha/{ => domains}/struct.delete_domain.html (86%) create mode 100644 guard/api/v1/mcaptcha/duration/index.html create mode 100644 guard/api/v1/mcaptcha/duration/sidebar-items.js rename guard/api/v1/mcaptcha/{ => duration}/struct.GetDuration.html (84%) create mode 100644 guard/api/v1/mcaptcha/duration/struct.GetDurationResp.html rename guard/api/v1/mcaptcha/{struct.Duration.html => duration/struct.UpdateDuration.html} (84%) rename guard/api/v1/mcaptcha/{ => duration}/struct.get_duration.html (86%) rename guard/api/v1/mcaptcha/{ => duration}/struct.update_duration.html (86%) delete mode 100644 guard/api/v1/mcaptcha/fn.get_levels_util.html delete mode 100644 guard/api/v1/mcaptcha/fn.get_random.html create mode 100644 guard/api/v1/mcaptcha/levels/fn.get_levels_util.html create mode 100644 guard/api/v1/mcaptcha/levels/index.html create mode 100644 guard/api/v1/mcaptcha/levels/sidebar-items.js rename guard/api/v1/mcaptcha/{ => levels}/struct.AddLevels.html (85%) rename guard/api/v1/mcaptcha/{ => levels}/struct.GetLevels.html (85%) rename guard/api/v1/mcaptcha/{ => levels}/struct.I32Levels.html (85%) rename guard/api/v1/mcaptcha/{ => levels}/struct.Levels.html (84%) rename guard/api/v1/mcaptcha/{ => levels}/struct.add_levels.html (86%) rename guard/api/v1/mcaptcha/{ => levels}/struct.delete_levels.html (86%) rename guard/api/v1/mcaptcha/{ => levels}/struct.get_levels.html (86%) rename guard/api/v1/mcaptcha/{ => levels}/struct.update_levels.html (86%) create mode 100644 guard/api/v1/mcaptcha/mcaptcha/fn.get_random.html create mode 100644 guard/api/v1/mcaptcha/mcaptcha/index.html create mode 100644 guard/api/v1/mcaptcha/mcaptcha/sidebar-items.js rename guard/api/v1/mcaptcha/{struct.TokenKeyPair.html => mcaptcha/struct.MCaptchaDetails.html} (83%) rename guard/api/v1/mcaptcha/{struct.CreateToken.html => mcaptcha/struct.MCaptchaID.html} (83%) rename guard/api/v1/mcaptcha/{ => mcaptcha}/struct.add_mcaptcha.html (87%) rename guard/api/v1/mcaptcha/{ => mcaptcha}/struct.delete_mcaptcha.html (86%) create mode 100644 src/guard/api/v1/mcaptcha/domains.rs.html create mode 100644 src/guard/api/v1/mcaptcha/duration.rs.html rename src/guard/api/v1/{mcaptcha.rs.html => mcaptcha/levels.rs.html} (51%) create mode 100644 src/guard/api/v1/mcaptcha/mcaptcha.rs.html create mode 100644 src/guard/api/v1/mcaptcha/mod.rs.html diff --git a/guard/all.html b/guard/all.html index ca282175..a95b04b8 100644 --- a/guard/all.html +++ b/guard/all.html @@ -3,4 +3,4 @@

[] - List of all items

Structs

Enums

Functions

Typedefs

Statics

\ No newline at end of file + List of all items

Structs

Enums

Functions

Typedefs

Statics

\ No newline at end of file diff --git a/guard/api/v1/fn.services.html b/guard/api/v1/fn.services.html index 57aa8f19..cc46585a 100644 --- a/guard/api/v1/fn.services.html +++ b/guard/api/v1/fn.services.html @@ -1,4 +1,4 @@ guard::api::v1::services - Rust

[][src]Function guard::api::v1::services

pub fn services(cfg: &mut ServiceConfig)
\ No newline at end of file + Change settings

[][src]Function guard::api::v1::services

pub fn services(cfg: &mut ServiceConfig)
\ No newline at end of file diff --git a/guard/api/v1/index.html b/guard/api/v1/index.html index 1818411b..74b0e79e 100644 --- a/guard/api/v1/index.html +++ b/guard/api/v1/index.html @@ -1,6 +1,6 @@ guard::api::v1 - Rust

[][src]Module guard::api::v1

Modules

+ Change settings

[][src]Module guard::api::v1

Modules

auth
mcaptcha
meta

Functions

services
\ No newline at end of file diff --git a/guard/api/v1/mcaptcha/domains/index.html b/guard/api/v1/mcaptcha/domains/index.html new file mode 100644 index 00000000..6097da74 --- /dev/null +++ b/guard/api/v1/mcaptcha/domains/index.html @@ -0,0 +1,5 @@ +guard::api::v1::mcaptcha::domains - Rust + +

[][src]Module guard::api::v1::mcaptcha::domains

Structs

+
Domain
add_domain
delete_domain
\ No newline at end of file diff --git a/guard/api/v1/mcaptcha/domains/sidebar-items.js b/guard/api/v1/mcaptcha/domains/sidebar-items.js new file mode 100644 index 00000000..5c40f72a --- /dev/null +++ b/guard/api/v1/mcaptcha/domains/sidebar-items.js @@ -0,0 +1 @@ +initSidebarItems({"struct":[["Domain",""],["add_domain",""],["delete_domain",""]]}); \ No newline at end of file diff --git a/guard/api/v1/mcaptcha/struct.Domain.html b/guard/api/v1/mcaptcha/domains/struct.Domain.html similarity index 83% rename from guard/api/v1/mcaptcha/struct.Domain.html rename to guard/api/v1/mcaptcha/domains/struct.Domain.html index 53178b4d..9e39fdb5 100644 --- a/guard/api/v1/mcaptcha/struct.Domain.html +++ b/guard/api/v1/mcaptcha/domains/struct.Domain.html @@ -1,15 +1,15 @@ -guard::api::v1::mcaptcha::Domain - Rust - -

[][src]Struct guard::api::v1::mcaptcha::Domain

pub struct Domain {
+guard::api::v1::mcaptcha::domains::Domain - Rust
+
+

[][src]Struct guard::api::v1::mcaptcha::domains::Domain

pub struct Domain {
     pub name: String,
 }

- Fields

name: String

Trait Implementations

impl Clone for Domain[src]

\ No newline at end of file +

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

\ No newline at end of file diff --git a/guard/api/v1/mcaptcha/struct.add_domain.html b/guard/api/v1/mcaptcha/domains/struct.add_domain.html similarity index 86% rename from guard/api/v1/mcaptcha/struct.add_domain.html rename to guard/api/v1/mcaptcha/domains/struct.add_domain.html index 65ef3852..a144ee3f 100644 --- a/guard/api/v1/mcaptcha/struct.add_domain.html +++ b/guard/api/v1/mcaptcha/domains/struct.add_domain.html @@ -1,7 +1,7 @@ -guard::api::v1::mcaptcha::add_domain - Rust - -

[][src]Struct guard::api::v1::mcaptcha::add_domain

pub struct add_domain;

Trait Implementations

impl HttpServiceFactory for add_domain[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

\ No newline at end of file diff --git a/guard/api/v1/mcaptcha/struct.delete_domain.html b/guard/api/v1/mcaptcha/domains/struct.delete_domain.html similarity index 86% rename from guard/api/v1/mcaptcha/struct.delete_domain.html rename to guard/api/v1/mcaptcha/domains/struct.delete_domain.html index 327b70f2..0ca4364b 100644 --- a/guard/api/v1/mcaptcha/struct.delete_domain.html +++ b/guard/api/v1/mcaptcha/domains/struct.delete_domain.html @@ -1,7 +1,7 @@ -guard::api::v1::mcaptcha::delete_domain - Rust - -

[][src]Struct guard::api::v1::mcaptcha::delete_domain

pub struct delete_domain;

Trait Implementations

impl HttpServiceFactory for delete_domain[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

\ No newline at end of file diff --git a/guard/api/v1/mcaptcha/duration/index.html b/guard/api/v1/mcaptcha/duration/index.html new file mode 100644 index 00000000..16626043 --- /dev/null +++ b/guard/api/v1/mcaptcha/duration/index.html @@ -0,0 +1,5 @@ +guard::api::v1::mcaptcha::duration - Rust + +

[][src]Module guard::api::v1::mcaptcha::duration

Structs

+
GetDuration
GetDurationResp
UpdateDuration
get_duration
update_duration
\ No newline at end of file diff --git a/guard/api/v1/mcaptcha/duration/sidebar-items.js b/guard/api/v1/mcaptcha/duration/sidebar-items.js new file mode 100644 index 00000000..c618c950 --- /dev/null +++ b/guard/api/v1/mcaptcha/duration/sidebar-items.js @@ -0,0 +1 @@ +initSidebarItems({"struct":[["GetDuration",""],["GetDurationResp",""],["UpdateDuration",""],["get_duration",""],["update_duration",""]]}); \ No newline at end of file diff --git a/guard/api/v1/mcaptcha/struct.GetDuration.html b/guard/api/v1/mcaptcha/duration/struct.GetDuration.html similarity index 84% rename from guard/api/v1/mcaptcha/struct.GetDuration.html rename to guard/api/v1/mcaptcha/duration/struct.GetDuration.html index e8164758..f28d6fea 100644 --- a/guard/api/v1/mcaptcha/struct.GetDuration.html +++ b/guard/api/v1/mcaptcha/duration/struct.GetDuration.html @@ -1,12 +1,12 @@ -guard::api::v1::mcaptcha::GetDuration - Rust - -

[][src]Struct guard::api::v1::mcaptcha::GetDuration

pub struct GetDuration {
-    pub duration: i32,
+guard::api::v1::mcaptcha::duration::GetDuration - Rust
+
+

[][src]Struct guard::api::v1::mcaptcha::duration::GetDuration

pub struct GetDuration {
+    pub token: String,
 }

- Fields

duration: i32

Trait Implementations

impl<'de> Deserialize<'de> for GetDuration[src]

impl Serialize for GetDuration[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

\ No newline at end of file +

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

\ No newline at end of file diff --git a/guard/api/v1/mcaptcha/duration/struct.GetDurationResp.html b/guard/api/v1/mcaptcha/duration/struct.GetDurationResp.html new file mode 100644 index 00000000..8f2f1118 --- /dev/null +++ b/guard/api/v1/mcaptcha/duration/struct.GetDurationResp.html @@ -0,0 +1,116 @@ +guard::api::v1::mcaptcha::duration::GetDurationResp - Rust + +

[][src]Struct guard::api::v1::mcaptcha::duration::GetDurationResp

pub struct GetDurationResp {
+    pub duration: i32,
+}

+ Fields

duration: i32

Trait Implementations

impl<'de> Deserialize<'de> for GetDurationResp[src]

impl Serialize for GetDurationResp[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Conv for T

impl<T> Conv for T

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> FmtForward for T

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Pipe for T where
    T: ?Sized

impl<T> Pipe for T

impl<T> PipeAsRef for T

impl<T> PipeBorrow for T

impl<T> PipeDeref for T

impl<T> PipeRef for T

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> Tap for T

impl<T> Tap for T

impl<T, U> TapAsRef<U> for T where
    U: ?Sized

impl<T, U> TapBorrow<U> for T where
    U: ?Sized

impl<T> TapDeref for T

impl<T> TryConv for T

impl<T> TryConv for T

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

\ No newline at end of file diff --git a/guard/api/v1/mcaptcha/struct.Duration.html b/guard/api/v1/mcaptcha/duration/struct.UpdateDuration.html similarity index 84% rename from guard/api/v1/mcaptcha/struct.Duration.html rename to guard/api/v1/mcaptcha/duration/struct.UpdateDuration.html index 51437f6b..fd8f54c1 100644 --- a/guard/api/v1/mcaptcha/struct.Duration.html +++ b/guard/api/v1/mcaptcha/duration/struct.UpdateDuration.html @@ -1,13 +1,13 @@ -guard::api::v1::mcaptcha::Duration - Rust - -

[][src]Struct guard::api::v1::mcaptcha::Duration

pub struct Duration {
+guard::api::v1::mcaptcha::duration::UpdateDuration - Rust
+
+

[][src]Struct guard::api::v1::mcaptcha::duration::UpdateDuration

pub struct UpdateDuration {
     pub token_name: String,
     pub duration: i32,
 }

- Fields

token_name: Stringduration: i32

Trait Implementations

impl<'de> Deserialize<'de> for Duration[src]

impl Serialize for Duration[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

\ No newline at end of file +

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

\ No newline at end of file diff --git a/guard/api/v1/mcaptcha/struct.get_duration.html b/guard/api/v1/mcaptcha/duration/struct.get_duration.html similarity index 86% rename from guard/api/v1/mcaptcha/struct.get_duration.html rename to guard/api/v1/mcaptcha/duration/struct.get_duration.html index d7efc634..7a23f32a 100644 --- a/guard/api/v1/mcaptcha/struct.get_duration.html +++ b/guard/api/v1/mcaptcha/duration/struct.get_duration.html @@ -1,7 +1,7 @@ -guard::api::v1::mcaptcha::get_duration - Rust - -

[][src]Struct guard::api::v1::mcaptcha::get_duration

pub struct get_duration;

Trait Implementations

impl HttpServiceFactory for get_duration[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

\ No newline at end of file diff --git a/guard/api/v1/mcaptcha/struct.update_duration.html b/guard/api/v1/mcaptcha/duration/struct.update_duration.html similarity index 86% rename from guard/api/v1/mcaptcha/struct.update_duration.html rename to guard/api/v1/mcaptcha/duration/struct.update_duration.html index 39b7e19c..237b31b1 100644 --- a/guard/api/v1/mcaptcha/struct.update_duration.html +++ b/guard/api/v1/mcaptcha/duration/struct.update_duration.html @@ -1,7 +1,7 @@ -guard::api::v1::mcaptcha::update_duration - Rust - -

[][src]Struct guard::api::v1::mcaptcha::update_duration

pub struct update_duration;

Trait Implementations

impl HttpServiceFactory for update_duration[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

\ No newline at end of file diff --git a/guard/api/v1/mcaptcha/fn.get_levels_util.html b/guard/api/v1/mcaptcha/fn.get_levels_util.html deleted file mode 100644 index 8bd66196..00000000 --- a/guard/api/v1/mcaptcha/fn.get_levels_util.html +++ /dev/null @@ -1,4 +0,0 @@ -guard::api::v1::mcaptcha::get_levels_util - Rust - -

[][src]Function guard::api::v1::mcaptcha::get_levels_util

async fn get_levels_util(
    name: &str,
    data: &Data
) -> Result<Vec<I32Levels>, ServiceError>
\ No newline at end of file diff --git a/guard/api/v1/mcaptcha/fn.get_random.html b/guard/api/v1/mcaptcha/fn.get_random.html deleted file mode 100644 index 918aaf81..00000000 --- a/guard/api/v1/mcaptcha/fn.get_random.html +++ /dev/null @@ -1,4 +0,0 @@ -guard::api::v1::mcaptcha::get_random - Rust - -

[][src]Function guard::api::v1::mcaptcha::get_random

fn get_random(len: usize) -> String
\ No newline at end of file diff --git a/guard/api/v1/mcaptcha/index.html b/guard/api/v1/mcaptcha/index.html index bb167a60..a1c60d57 100644 --- a/guard/api/v1/mcaptcha/index.html +++ b/guard/api/v1/mcaptcha/index.html @@ -1,6 +1,6 @@ guard::api::v1::mcaptcha - Rust -

[][src]Module guard::api::v1::mcaptcha

Structs

-
AddLevels
CreateToken
Domain
Duration
GetDuration
GetLevels
I32Levels
Levels
TokenKeyPair
add_domain
add_levels
add_mcaptcha
delete_domain
delete_levels
delete_mcaptcha
get_duration
get_levels
update_duration
update_levels

Functions

-
get_levels_util
get_random
\ No newline at end of file +

[][src]Module guard::api::v1::mcaptcha

Re-exports

+
pub use super::auth::is_authenticated;

Modules

+
domains
duration
levels
mcaptcha
\ No newline at end of file diff --git a/guard/api/v1/mcaptcha/levels/fn.get_levels_util.html b/guard/api/v1/mcaptcha/levels/fn.get_levels_util.html new file mode 100644 index 00000000..007b8a9a --- /dev/null +++ b/guard/api/v1/mcaptcha/levels/fn.get_levels_util.html @@ -0,0 +1,4 @@ +guard::api::v1::mcaptcha::levels::get_levels_util - Rust + +

[][src]Function guard::api::v1::mcaptcha::levels::get_levels_util

async fn get_levels_util(
    name: &str,
    data: &Data
) -> Result<Vec<I32Levels>, ServiceError>
\ No newline at end of file diff --git a/guard/api/v1/mcaptcha/levels/index.html b/guard/api/v1/mcaptcha/levels/index.html new file mode 100644 index 00000000..4377163e --- /dev/null +++ b/guard/api/v1/mcaptcha/levels/index.html @@ -0,0 +1,6 @@ +guard::api::v1::mcaptcha::levels - Rust + +

[][src]Module guard::api::v1::mcaptcha::levels

Structs

+
AddLevels
GetLevels
I32Levels
Levels
add_levels
delete_levels
get_levels
update_levels

Functions

+
get_levels_util
\ No newline at end of file diff --git a/guard/api/v1/mcaptcha/levels/sidebar-items.js b/guard/api/v1/mcaptcha/levels/sidebar-items.js new file mode 100644 index 00000000..5e5796af --- /dev/null +++ b/guard/api/v1/mcaptcha/levels/sidebar-items.js @@ -0,0 +1 @@ +initSidebarItems({"fn":[["get_levels_util",""]],"struct":[["AddLevels",""],["GetLevels",""],["I32Levels",""],["Levels",""],["add_levels",""],["delete_levels",""],["get_levels",""],["update_levels",""]]}); \ No newline at end of file diff --git a/guard/api/v1/mcaptcha/struct.AddLevels.html b/guard/api/v1/mcaptcha/levels/struct.AddLevels.html similarity index 85% rename from guard/api/v1/mcaptcha/struct.AddLevels.html rename to guard/api/v1/mcaptcha/levels/struct.AddLevels.html index b8bef78f..a99bec68 100644 --- a/guard/api/v1/mcaptcha/struct.AddLevels.html +++ b/guard/api/v1/mcaptcha/levels/struct.AddLevels.html @@ -1,13 +1,13 @@ -guard::api::v1::mcaptcha::AddLevels - Rust - -

[][src]Struct guard::api::v1::mcaptcha::AddLevels

pub struct AddLevels {
+guard::api::v1::mcaptcha::levels::AddLevels - Rust
+
+

[][src]Struct guard::api::v1::mcaptcha::levels::AddLevels

pub struct AddLevels {
     pub levels: Vec<Level>,
     pub name: String,
 }

- Fields

levels: Vec<Level>name: String

Trait Implementations

impl<'de> Deserialize<'de> for AddLevels[src]

impl Serialize for AddLevels[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

\ No newline at end of file +

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

\ No newline at end of file diff --git a/guard/api/v1/mcaptcha/struct.GetLevels.html b/guard/api/v1/mcaptcha/levels/struct.GetLevels.html similarity index 85% rename from guard/api/v1/mcaptcha/struct.GetLevels.html rename to guard/api/v1/mcaptcha/levels/struct.GetLevels.html index ef8d6694..1b8c1462 100644 --- a/guard/api/v1/mcaptcha/struct.GetLevels.html +++ b/guard/api/v1/mcaptcha/levels/struct.GetLevels.html @@ -1,12 +1,12 @@ -guard::api::v1::mcaptcha::GetLevels - Rust - -

[][src]Struct guard::api::v1::mcaptcha::GetLevels

pub struct GetLevels {
+guard::api::v1::mcaptcha::levels::GetLevels - Rust
+
+

[][src]Struct guard::api::v1::mcaptcha::levels::GetLevels

pub struct GetLevels {
     pub token: String,
 }

- Fields

token: String

Trait Implementations

impl<'de> Deserialize<'de> for GetLevels[src]

impl Serialize for GetLevels[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

\ No newline at end of file +

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

\ No newline at end of file diff --git a/guard/api/v1/mcaptcha/struct.I32Levels.html b/guard/api/v1/mcaptcha/levels/struct.I32Levels.html similarity index 85% rename from guard/api/v1/mcaptcha/struct.I32Levels.html rename to guard/api/v1/mcaptcha/levels/struct.I32Levels.html index ade51149..5fca8c3c 100644 --- a/guard/api/v1/mcaptcha/struct.I32Levels.html +++ b/guard/api/v1/mcaptcha/levels/struct.I32Levels.html @@ -1,13 +1,13 @@ -guard::api::v1::mcaptcha::I32Levels - Rust - -

[][src]Struct guard::api::v1::mcaptcha::I32Levels

pub struct I32Levels {
+guard::api::v1::mcaptcha::levels::I32Levels - Rust
+
+

[][src]Struct guard::api::v1::mcaptcha::levels::I32Levels

pub struct I32Levels {
     difficulty_factor: i32,
     visitor_threshold: i32,
 }

- Fields

difficulty_factor: i32visitor_threshold: i32

Trait Implementations

impl<'de> Deserialize<'de> for I32Levels[src]

impl Serialize for I32Levels[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

\ No newline at end of file +

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

\ No newline at end of file diff --git a/guard/api/v1/mcaptcha/struct.Levels.html b/guard/api/v1/mcaptcha/levels/struct.Levels.html similarity index 84% rename from guard/api/v1/mcaptcha/struct.Levels.html rename to guard/api/v1/mcaptcha/levels/struct.Levels.html index 5ee6358e..05d6c2cb 100644 --- a/guard/api/v1/mcaptcha/struct.Levels.html +++ b/guard/api/v1/mcaptcha/levels/struct.Levels.html @@ -1,12 +1,12 @@ -guard::api::v1::mcaptcha::Levels - Rust - -

[][src]Struct guard::api::v1::mcaptcha::Levels

pub struct Levels {
-    levels: I32Levels,
+guard::api::v1::mcaptcha::levels::Levels - Rust
+
+

[][src]Struct guard::api::v1::mcaptcha::levels::Levels

pub struct Levels {
+    levels: I32Levels,
 }

- Fields

levels: I32Levels

Trait Implementations

impl<'de> Deserialize<'de> for Levels[src]

impl Serialize for Levels[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

\ No newline at end of file +

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

\ No newline at end of file diff --git a/guard/api/v1/mcaptcha/struct.add_levels.html b/guard/api/v1/mcaptcha/levels/struct.add_levels.html similarity index 86% rename from guard/api/v1/mcaptcha/struct.add_levels.html rename to guard/api/v1/mcaptcha/levels/struct.add_levels.html index 6d432526..e1813e0e 100644 --- a/guard/api/v1/mcaptcha/struct.add_levels.html +++ b/guard/api/v1/mcaptcha/levels/struct.add_levels.html @@ -1,7 +1,7 @@ -guard::api::v1::mcaptcha::add_levels - Rust - -

[][src]Struct guard::api::v1::mcaptcha::add_levels

pub struct add_levels;

Trait Implementations

impl HttpServiceFactory for add_levels[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

\ No newline at end of file diff --git a/guard/api/v1/mcaptcha/struct.delete_levels.html b/guard/api/v1/mcaptcha/levels/struct.delete_levels.html similarity index 86% rename from guard/api/v1/mcaptcha/struct.delete_levels.html rename to guard/api/v1/mcaptcha/levels/struct.delete_levels.html index a82fde7f..c1903703 100644 --- a/guard/api/v1/mcaptcha/struct.delete_levels.html +++ b/guard/api/v1/mcaptcha/levels/struct.delete_levels.html @@ -1,7 +1,7 @@ -guard::api::v1::mcaptcha::delete_levels - Rust - -

[][src]Struct guard::api::v1::mcaptcha::delete_levels

pub struct delete_levels;

Trait Implementations

impl HttpServiceFactory for delete_levels[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

\ No newline at end of file diff --git a/guard/api/v1/mcaptcha/struct.get_levels.html b/guard/api/v1/mcaptcha/levels/struct.get_levels.html similarity index 86% rename from guard/api/v1/mcaptcha/struct.get_levels.html rename to guard/api/v1/mcaptcha/levels/struct.get_levels.html index 47c5d454..747767fd 100644 --- a/guard/api/v1/mcaptcha/struct.get_levels.html +++ b/guard/api/v1/mcaptcha/levels/struct.get_levels.html @@ -1,7 +1,7 @@ -guard::api::v1::mcaptcha::get_levels - Rust - -

[][src]Struct guard::api::v1::mcaptcha::get_levels

pub struct get_levels;

Trait Implementations

impl HttpServiceFactory for get_levels[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

\ No newline at end of file diff --git a/guard/api/v1/mcaptcha/struct.update_levels.html b/guard/api/v1/mcaptcha/levels/struct.update_levels.html similarity index 86% rename from guard/api/v1/mcaptcha/struct.update_levels.html rename to guard/api/v1/mcaptcha/levels/struct.update_levels.html index dbdcf573..257c37b4 100644 --- a/guard/api/v1/mcaptcha/struct.update_levels.html +++ b/guard/api/v1/mcaptcha/levels/struct.update_levels.html @@ -1,7 +1,7 @@ -guard::api::v1::mcaptcha::update_levels - Rust - -

[][src]Struct guard::api::v1::mcaptcha::update_levels

pub struct update_levels;

Trait Implementations

impl HttpServiceFactory for update_levels[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

\ No newline at end of file diff --git a/guard/api/v1/mcaptcha/mcaptcha/fn.get_random.html b/guard/api/v1/mcaptcha/mcaptcha/fn.get_random.html new file mode 100644 index 00000000..9e6fc8e3 --- /dev/null +++ b/guard/api/v1/mcaptcha/mcaptcha/fn.get_random.html @@ -0,0 +1,4 @@ +guard::api::v1::mcaptcha::mcaptcha::get_random - Rust + +

[][src]Function guard::api::v1::mcaptcha::mcaptcha::get_random

fn get_random(len: usize) -> String
\ No newline at end of file diff --git a/guard/api/v1/mcaptcha/mcaptcha/index.html b/guard/api/v1/mcaptcha/mcaptcha/index.html new file mode 100644 index 00000000..196d7b7a --- /dev/null +++ b/guard/api/v1/mcaptcha/mcaptcha/index.html @@ -0,0 +1,6 @@ +guard::api::v1::mcaptcha::mcaptcha - Rust + +

[][src]Module guard::api::v1::mcaptcha::mcaptcha

Structs

+
MCaptchaDetails
MCaptchaID
add_mcaptcha
delete_mcaptcha

Functions

+
get_random
\ No newline at end of file diff --git a/guard/api/v1/mcaptcha/mcaptcha/sidebar-items.js b/guard/api/v1/mcaptcha/mcaptcha/sidebar-items.js new file mode 100644 index 00000000..865b8007 --- /dev/null +++ b/guard/api/v1/mcaptcha/mcaptcha/sidebar-items.js @@ -0,0 +1 @@ +initSidebarItems({"fn":[["get_random",""]],"struct":[["MCaptchaDetails",""],["MCaptchaID",""],["add_mcaptcha",""],["delete_mcaptcha",""]]}); \ No newline at end of file diff --git a/guard/api/v1/mcaptcha/struct.TokenKeyPair.html b/guard/api/v1/mcaptcha/mcaptcha/struct.MCaptchaDetails.html similarity index 83% rename from guard/api/v1/mcaptcha/struct.TokenKeyPair.html rename to guard/api/v1/mcaptcha/mcaptcha/struct.MCaptchaDetails.html index df6451bd..a48fc349 100644 --- a/guard/api/v1/mcaptcha/struct.TokenKeyPair.html +++ b/guard/api/v1/mcaptcha/mcaptcha/struct.MCaptchaDetails.html @@ -1,16 +1,16 @@ -guard::api::v1::mcaptcha::TokenKeyPair - Rust - -

[][src]Struct guard::api::v1::mcaptcha::TokenKeyPair

pub struct TokenKeyPair {
+guard::api::v1::mcaptcha::mcaptcha::MCaptchaDetails - Rust
+
+

[][src]Struct guard::api::v1::mcaptcha::mcaptcha::MCaptchaDetails

pub struct MCaptchaDetails {
     pub name: String,
     pub key: String,
 }

- Fields

name: Stringkey: String

Trait Implementations

impl Clone for TokenKeyPair[src]

\ No newline at end of file +

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

\ No newline at end of file diff --git a/guard/api/v1/mcaptcha/struct.CreateToken.html b/guard/api/v1/mcaptcha/mcaptcha/struct.MCaptchaID.html similarity index 83% rename from guard/api/v1/mcaptcha/struct.CreateToken.html rename to guard/api/v1/mcaptcha/mcaptcha/struct.MCaptchaID.html index a8099c7a..c3b2b13a 100644 --- a/guard/api/v1/mcaptcha/struct.CreateToken.html +++ b/guard/api/v1/mcaptcha/mcaptcha/struct.MCaptchaID.html @@ -1,16 +1,16 @@ -guard::api::v1::mcaptcha::CreateToken - Rust - -

[][src]Struct guard::api::v1::mcaptcha::CreateToken

pub struct CreateToken {
+guard::api::v1::mcaptcha::mcaptcha::MCaptchaID - Rust
+
+

[][src]Struct guard::api::v1::mcaptcha::mcaptcha::MCaptchaID

pub struct MCaptchaID {
     pub name: String,
     pub domain: String,
 }

- Fields

name: Stringdomain: String

Trait Implementations

impl Clone for CreateToken[src]

\ No newline at end of file +

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

\ No newline at end of file diff --git a/guard/api/v1/mcaptcha/struct.add_mcaptcha.html b/guard/api/v1/mcaptcha/mcaptcha/struct.add_mcaptcha.html similarity index 87% rename from guard/api/v1/mcaptcha/struct.add_mcaptcha.html rename to guard/api/v1/mcaptcha/mcaptcha/struct.add_mcaptcha.html index 8ae85e0e..09e8e321 100644 --- a/guard/api/v1/mcaptcha/struct.add_mcaptcha.html +++ b/guard/api/v1/mcaptcha/mcaptcha/struct.add_mcaptcha.html @@ -1,7 +1,7 @@ -guard::api::v1::mcaptcha::add_mcaptcha - Rust - -

[][src]Struct guard::api::v1::mcaptcha::add_mcaptcha

pub struct add_mcaptcha;

Trait Implementations

impl HttpServiceFactory for add_mcaptcha[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

\ No newline at end of file diff --git a/guard/api/v1/mcaptcha/struct.delete_mcaptcha.html b/guard/api/v1/mcaptcha/mcaptcha/struct.delete_mcaptcha.html similarity index 86% rename from guard/api/v1/mcaptcha/struct.delete_mcaptcha.html rename to guard/api/v1/mcaptcha/mcaptcha/struct.delete_mcaptcha.html index 1f925506..1a05fdef 100644 --- a/guard/api/v1/mcaptcha/struct.delete_mcaptcha.html +++ b/guard/api/v1/mcaptcha/mcaptcha/struct.delete_mcaptcha.html @@ -1,7 +1,7 @@ -guard::api::v1::mcaptcha::delete_mcaptcha - Rust - -

[][src]Struct guard::api::v1::mcaptcha::delete_mcaptcha

pub struct delete_mcaptcha;

Trait Implementations

impl HttpServiceFactory for delete_mcaptcha[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

\ No newline at end of file diff --git a/guard/api/v1/mcaptcha/sidebar-items.js b/guard/api/v1/mcaptcha/sidebar-items.js index 853c449f..0c9cbf6e 100644 --- a/guard/api/v1/mcaptcha/sidebar-items.js +++ b/guard/api/v1/mcaptcha/sidebar-items.js @@ -1 +1 @@ -initSidebarItems({"fn":[["get_levels_util",""],["get_random",""]],"struct":[["AddLevels",""],["CreateToken",""],["Domain",""],["Duration",""],["GetDuration",""],["GetLevels",""],["I32Levels",""],["Levels",""],["TokenKeyPair",""],["add_domain",""],["add_levels",""],["add_mcaptcha",""],["delete_domain",""],["delete_levels",""],["delete_mcaptcha",""],["get_duration",""],["get_levels",""],["update_duration",""],["update_levels",""]]}); \ No newline at end of file +initSidebarItems({"mod":[["domains",""],["duration",""],["levels",""],["mcaptcha",""]]}); \ No newline at end of file diff --git a/implementors/actix_web/service/trait.HttpServiceFactory.js b/implementors/actix_web/service/trait.HttpServiceFactory.js index cac49725..d7ae29f6 100644 --- a/implementors/actix_web/service/trait.HttpServiceFactory.js +++ b/implementors/actix_web/service/trait.HttpServiceFactory.js @@ -1,3 +1,3 @@ (function() {var implementors = {}; -implementors["guard"] = [{"text":"impl HttpServiceFactory for signup","synthetic":false,"types":[]},{"text":"impl HttpServiceFactory for signin","synthetic":false,"types":[]},{"text":"impl HttpServiceFactory for signout","synthetic":false,"types":[]},{"text":"impl HttpServiceFactory for delete_account","synthetic":false,"types":[]},{"text":"impl HttpServiceFactory for add_domain","synthetic":false,"types":[]},{"text":"impl HttpServiceFactory for delete_domain","synthetic":false,"types":[]},{"text":"impl HttpServiceFactory for add_mcaptcha","synthetic":false,"types":[]},{"text":"impl HttpServiceFactory for delete_mcaptcha","synthetic":false,"types":[]},{"text":"impl HttpServiceFactory for add_levels","synthetic":false,"types":[]},{"text":"impl HttpServiceFactory for update_levels","synthetic":false,"types":[]},{"text":"impl HttpServiceFactory for delete_levels","synthetic":false,"types":[]},{"text":"impl HttpServiceFactory for get_levels","synthetic":false,"types":[]},{"text":"impl HttpServiceFactory for update_duration","synthetic":false,"types":[]},{"text":"impl HttpServiceFactory for get_duration","synthetic":false,"types":[]},{"text":"impl HttpServiceFactory for build_details","synthetic":false,"types":[]},{"text":"impl HttpServiceFactory for health","synthetic":false,"types":[]}]; +implementors["guard"] = [{"text":"impl HttpServiceFactory for signup","synthetic":false,"types":[]},{"text":"impl HttpServiceFactory for signin","synthetic":false,"types":[]},{"text":"impl HttpServiceFactory for signout","synthetic":false,"types":[]},{"text":"impl HttpServiceFactory for delete_account","synthetic":false,"types":[]},{"text":"impl HttpServiceFactory for add_domain","synthetic":false,"types":[]},{"text":"impl HttpServiceFactory for delete_domain","synthetic":false,"types":[]},{"text":"impl HttpServiceFactory for update_duration","synthetic":false,"types":[]},{"text":"impl HttpServiceFactory for get_duration","synthetic":false,"types":[]},{"text":"impl HttpServiceFactory for add_levels","synthetic":false,"types":[]},{"text":"impl HttpServiceFactory for update_levels","synthetic":false,"types":[]},{"text":"impl HttpServiceFactory for delete_levels","synthetic":false,"types":[]},{"text":"impl HttpServiceFactory for get_levels","synthetic":false,"types":[]},{"text":"impl HttpServiceFactory for add_mcaptcha","synthetic":false,"types":[]},{"text":"impl HttpServiceFactory for delete_mcaptcha","synthetic":false,"types":[]},{"text":"impl HttpServiceFactory for build_details","synthetic":false,"types":[]},{"text":"impl HttpServiceFactory for health","synthetic":false,"types":[]}]; if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/implementors/core/clone/trait.Clone.js b/implementors/core/clone/trait.Clone.js index 16f9f03d..75f2a9c2 100644 --- a/implementors/core/clone/trait.Clone.js +++ b/implementors/core/clone/trait.Clone.js @@ -1,4 +1,4 @@ (function() {var implementors = {}; -implementors["guard"] = [{"text":"impl Clone for Data","synthetic":false,"types":[]},{"text":"impl Clone for ServiceError","synthetic":false,"types":[]},{"text":"impl Clone for Register","synthetic":false,"types":[]},{"text":"impl Clone for Login","synthetic":false,"types":[]},{"text":"impl Clone for Domain","synthetic":false,"types":[]},{"text":"impl Clone for CreateToken","synthetic":false,"types":[]},{"text":"impl Clone for TokenKeyPair","synthetic":false,"types":[]},{"text":"impl Clone for Health","synthetic":false,"types":[]},{"text":"impl Clone for HealthBuilder","synthetic":false,"types":[]},{"text":"impl Clone for Server","synthetic":false,"types":[]},{"text":"impl Clone for Captcha","synthetic":false,"types":[]},{"text":"impl Clone for DatabaseBuilder","synthetic":false,"types":[]},{"text":"impl Clone for Database","synthetic":false,"types":[]},{"text":"impl Clone for Settings","synthetic":false,"types":[]}]; +implementors["guard"] = [{"text":"impl Clone for Data","synthetic":false,"types":[]},{"text":"impl Clone for ServiceError","synthetic":false,"types":[]},{"text":"impl Clone for Register","synthetic":false,"types":[]},{"text":"impl Clone for Login","synthetic":false,"types":[]},{"text":"impl Clone for Domain","synthetic":false,"types":[]},{"text":"impl Clone for MCaptchaID","synthetic":false,"types":[]},{"text":"impl Clone for MCaptchaDetails","synthetic":false,"types":[]},{"text":"impl Clone for Health","synthetic":false,"types":[]},{"text":"impl Clone for HealthBuilder","synthetic":false,"types":[]},{"text":"impl Clone for Server","synthetic":false,"types":[]},{"text":"impl Clone for Captcha","synthetic":false,"types":[]},{"text":"impl Clone for DatabaseBuilder","synthetic":false,"types":[]},{"text":"impl Clone for Database","synthetic":false,"types":[]},{"text":"impl Clone for Settings","synthetic":false,"types":[]}]; implementors["tests_migrate"] = [{"text":"impl Clone for Data","synthetic":false,"types":[]},{"text":"impl Clone for Server","synthetic":false,"types":[]},{"text":"impl Clone for Captcha","synthetic":false,"types":[]},{"text":"impl Clone for DatabaseBuilder","synthetic":false,"types":[]},{"text":"impl Clone for Database","synthetic":false,"types":[]},{"text":"impl Clone for Settings","synthetic":false,"types":[]}]; if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/implementors/core/fmt/trait.Debug.js b/implementors/core/fmt/trait.Debug.js index 6341436c..762e4508 100644 --- a/implementors/core/fmt/trait.Debug.js +++ b/implementors/core/fmt/trait.Debug.js @@ -1,4 +1,4 @@ (function() {var implementors = {}; -implementors["guard"] = [{"text":"impl Debug for ServiceError","synthetic":false,"types":[]},{"text":"impl Debug for Register","synthetic":false,"types":[]},{"text":"impl Debug for Login","synthetic":false,"types":[]},{"text":"impl Debug for Domain","synthetic":false,"types":[]},{"text":"impl Debug for CreateToken","synthetic":false,"types":[]},{"text":"impl Debug for TokenKeyPair","synthetic":false,"types":[]},{"text":"impl Debug for Health","synthetic":false,"types":[]},{"text":"impl Debug for Server","synthetic":false,"types":[]},{"text":"impl Debug for Captcha","synthetic":false,"types":[]},{"text":"impl Debug for DatabaseBuilder","synthetic":false,"types":[]},{"text":"impl Debug for Database","synthetic":false,"types":[]},{"text":"impl Debug for Settings","synthetic":false,"types":[]}]; +implementors["guard"] = [{"text":"impl Debug for ServiceError","synthetic":false,"types":[]},{"text":"impl Debug for Register","synthetic":false,"types":[]},{"text":"impl Debug for Login","synthetic":false,"types":[]},{"text":"impl Debug for Domain","synthetic":false,"types":[]},{"text":"impl Debug for MCaptchaID","synthetic":false,"types":[]},{"text":"impl Debug for MCaptchaDetails","synthetic":false,"types":[]},{"text":"impl Debug for Health","synthetic":false,"types":[]},{"text":"impl Debug for Server","synthetic":false,"types":[]},{"text":"impl Debug for Captcha","synthetic":false,"types":[]},{"text":"impl Debug for DatabaseBuilder","synthetic":false,"types":[]},{"text":"impl Debug for Database","synthetic":false,"types":[]},{"text":"impl Debug for Settings","synthetic":false,"types":[]}]; implementors["tests_migrate"] = [{"text":"impl Debug for Server","synthetic":false,"types":[]},{"text":"impl Debug for Captcha","synthetic":false,"types":[]},{"text":"impl Debug for DatabaseBuilder","synthetic":false,"types":[]},{"text":"impl Debug for Database","synthetic":false,"types":[]},{"text":"impl Debug for Settings","synthetic":false,"types":[]}]; if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/implementors/core/marker/trait.Freeze.js b/implementors/core/marker/trait.Freeze.js index cecf3ce9..f8502214 100644 --- a/implementors/core/marker/trait.Freeze.js +++ b/implementors/core/marker/trait.Freeze.js @@ -1,4 +1,4 @@ (function() {var implementors = {}; -implementors["guard"] = [{"text":"impl Freeze for Data","synthetic":true,"types":[]},{"text":"impl Freeze for ServiceError","synthetic":true,"types":[]},{"text":"impl Freeze for ErrorToResponse","synthetic":true,"types":[]},{"text":"impl Freeze for Register","synthetic":true,"types":[]},{"text":"impl Freeze for Login","synthetic":true,"types":[]},{"text":"impl Freeze for Password","synthetic":true,"types":[]},{"text":"impl Freeze for signup","synthetic":true,"types":[]},{"text":"impl Freeze for signin","synthetic":true,"types":[]},{"text":"impl Freeze for signout","synthetic":true,"types":[]},{"text":"impl Freeze for delete_account","synthetic":true,"types":[]},{"text":"impl Freeze for Domain","synthetic":true,"types":[]},{"text":"impl Freeze for add_domain","synthetic":true,"types":[]},{"text":"impl Freeze for delete_domain","synthetic":true,"types":[]},{"text":"impl Freeze for CreateToken","synthetic":true,"types":[]},{"text":"impl Freeze for TokenKeyPair","synthetic":true,"types":[]},{"text":"impl Freeze for add_mcaptcha","synthetic":true,"types":[]},{"text":"impl Freeze for delete_mcaptcha","synthetic":true,"types":[]},{"text":"impl Freeze for AddLevels","synthetic":true,"types":[]},{"text":"impl Freeze for add_levels","synthetic":true,"types":[]},{"text":"impl Freeze for update_levels","synthetic":true,"types":[]},{"text":"impl Freeze for delete_levels","synthetic":true,"types":[]},{"text":"impl Freeze for GetLevels","synthetic":true,"types":[]},{"text":"impl Freeze for get_levels","synthetic":true,"types":[]},{"text":"impl Freeze for Duration","synthetic":true,"types":[]},{"text":"impl Freeze for update_duration","synthetic":true,"types":[]},{"text":"impl Freeze for GetDuration","synthetic":true,"types":[]},{"text":"impl Freeze for get_duration","synthetic":true,"types":[]},{"text":"impl Freeze for Levels","synthetic":true,"types":[]},{"text":"impl Freeze for I32Levels","synthetic":true,"types":[]},{"text":"impl Freeze for build_details","synthetic":true,"types":[]},{"text":"impl Freeze for Health","synthetic":true,"types":[]},{"text":"impl Freeze for HealthBuilder","synthetic":true,"types":[]},{"text":"impl Freeze for health","synthetic":true,"types":[]},{"text":"impl Freeze for Server","synthetic":true,"types":[]},{"text":"impl Freeze for Captcha","synthetic":true,"types":[]},{"text":"impl Freeze for DatabaseBuilder","synthetic":true,"types":[]},{"text":"impl Freeze for Database","synthetic":true,"types":[]},{"text":"impl Freeze for Settings","synthetic":true,"types":[]},{"text":"impl Freeze for SETTINGS","synthetic":true,"types":[]},{"text":"impl Freeze for GIT_COMMIT_HASH","synthetic":true,"types":[]}]; +implementors["guard"] = [{"text":"impl Freeze for Data","synthetic":true,"types":[]},{"text":"impl Freeze for ServiceError","synthetic":true,"types":[]},{"text":"impl Freeze for ErrorToResponse","synthetic":true,"types":[]},{"text":"impl Freeze for Register","synthetic":true,"types":[]},{"text":"impl Freeze for Login","synthetic":true,"types":[]},{"text":"impl Freeze for Password","synthetic":true,"types":[]},{"text":"impl Freeze for signup","synthetic":true,"types":[]},{"text":"impl Freeze for signin","synthetic":true,"types":[]},{"text":"impl Freeze for signout","synthetic":true,"types":[]},{"text":"impl Freeze for delete_account","synthetic":true,"types":[]},{"text":"impl Freeze for Domain","synthetic":true,"types":[]},{"text":"impl Freeze for add_domain","synthetic":true,"types":[]},{"text":"impl Freeze for delete_domain","synthetic":true,"types":[]},{"text":"impl Freeze for UpdateDuration","synthetic":true,"types":[]},{"text":"impl Freeze for update_duration","synthetic":true,"types":[]},{"text":"impl Freeze for GetDurationResp","synthetic":true,"types":[]},{"text":"impl Freeze for GetDuration","synthetic":true,"types":[]},{"text":"impl Freeze for get_duration","synthetic":true,"types":[]},{"text":"impl Freeze for AddLevels","synthetic":true,"types":[]},{"text":"impl Freeze for add_levels","synthetic":true,"types":[]},{"text":"impl Freeze for update_levels","synthetic":true,"types":[]},{"text":"impl Freeze for delete_levels","synthetic":true,"types":[]},{"text":"impl Freeze for GetLevels","synthetic":true,"types":[]},{"text":"impl Freeze for get_levels","synthetic":true,"types":[]},{"text":"impl Freeze for Levels","synthetic":true,"types":[]},{"text":"impl Freeze for I32Levels","synthetic":true,"types":[]},{"text":"impl Freeze for MCaptchaID","synthetic":true,"types":[]},{"text":"impl Freeze for MCaptchaDetails","synthetic":true,"types":[]},{"text":"impl Freeze for add_mcaptcha","synthetic":true,"types":[]},{"text":"impl Freeze for delete_mcaptcha","synthetic":true,"types":[]},{"text":"impl Freeze for build_details","synthetic":true,"types":[]},{"text":"impl Freeze for Health","synthetic":true,"types":[]},{"text":"impl Freeze for HealthBuilder","synthetic":true,"types":[]},{"text":"impl Freeze for health","synthetic":true,"types":[]},{"text":"impl Freeze for Server","synthetic":true,"types":[]},{"text":"impl Freeze for Captcha","synthetic":true,"types":[]},{"text":"impl Freeze for DatabaseBuilder","synthetic":true,"types":[]},{"text":"impl Freeze for Database","synthetic":true,"types":[]},{"text":"impl Freeze for Settings","synthetic":true,"types":[]},{"text":"impl Freeze for SETTINGS","synthetic":true,"types":[]},{"text":"impl Freeze for GIT_COMMIT_HASH","synthetic":true,"types":[]}]; implementors["tests_migrate"] = [{"text":"impl Freeze for Data","synthetic":true,"types":[]},{"text":"impl Freeze for Server","synthetic":true,"types":[]},{"text":"impl Freeze for Captcha","synthetic":true,"types":[]},{"text":"impl Freeze for DatabaseBuilder","synthetic":true,"types":[]},{"text":"impl Freeze for Database","synthetic":true,"types":[]},{"text":"impl Freeze for Settings","synthetic":true,"types":[]},{"text":"impl Freeze for SETTINGS","synthetic":true,"types":[]}]; if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/implementors/core/marker/trait.Send.js b/implementors/core/marker/trait.Send.js index ce7debf1..d3e534b6 100644 --- a/implementors/core/marker/trait.Send.js +++ b/implementors/core/marker/trait.Send.js @@ -1,4 +1,4 @@ (function() {var implementors = {}; -implementors["guard"] = [{"text":"impl Send for Data","synthetic":true,"types":[]},{"text":"impl Send for ServiceError","synthetic":true,"types":[]},{"text":"impl Send for ErrorToResponse","synthetic":true,"types":[]},{"text":"impl Send for Register","synthetic":true,"types":[]},{"text":"impl Send for Login","synthetic":true,"types":[]},{"text":"impl Send for Password","synthetic":true,"types":[]},{"text":"impl Send for signup","synthetic":true,"types":[]},{"text":"impl Send for signin","synthetic":true,"types":[]},{"text":"impl Send for signout","synthetic":true,"types":[]},{"text":"impl Send for delete_account","synthetic":true,"types":[]},{"text":"impl Send for Domain","synthetic":true,"types":[]},{"text":"impl Send for add_domain","synthetic":true,"types":[]},{"text":"impl Send for delete_domain","synthetic":true,"types":[]},{"text":"impl Send for CreateToken","synthetic":true,"types":[]},{"text":"impl Send for TokenKeyPair","synthetic":true,"types":[]},{"text":"impl Send for add_mcaptcha","synthetic":true,"types":[]},{"text":"impl Send for delete_mcaptcha","synthetic":true,"types":[]},{"text":"impl Send for AddLevels","synthetic":true,"types":[]},{"text":"impl Send for add_levels","synthetic":true,"types":[]},{"text":"impl Send for update_levels","synthetic":true,"types":[]},{"text":"impl Send for delete_levels","synthetic":true,"types":[]},{"text":"impl Send for GetLevels","synthetic":true,"types":[]},{"text":"impl Send for get_levels","synthetic":true,"types":[]},{"text":"impl Send for Duration","synthetic":true,"types":[]},{"text":"impl Send for update_duration","synthetic":true,"types":[]},{"text":"impl Send for GetDuration","synthetic":true,"types":[]},{"text":"impl Send for get_duration","synthetic":true,"types":[]},{"text":"impl Send for Levels","synthetic":true,"types":[]},{"text":"impl Send for I32Levels","synthetic":true,"types":[]},{"text":"impl Send for build_details","synthetic":true,"types":[]},{"text":"impl Send for Health","synthetic":true,"types":[]},{"text":"impl Send for HealthBuilder","synthetic":true,"types":[]},{"text":"impl Send for health","synthetic":true,"types":[]},{"text":"impl Send for Server","synthetic":true,"types":[]},{"text":"impl Send for Captcha","synthetic":true,"types":[]},{"text":"impl Send for DatabaseBuilder","synthetic":true,"types":[]},{"text":"impl Send for Database","synthetic":true,"types":[]},{"text":"impl Send for Settings","synthetic":true,"types":[]},{"text":"impl Send for SETTINGS","synthetic":true,"types":[]},{"text":"impl Send for GIT_COMMIT_HASH","synthetic":true,"types":[]}]; +implementors["guard"] = [{"text":"impl Send for Data","synthetic":true,"types":[]},{"text":"impl Send for ServiceError","synthetic":true,"types":[]},{"text":"impl Send for ErrorToResponse","synthetic":true,"types":[]},{"text":"impl Send for Register","synthetic":true,"types":[]},{"text":"impl Send for Login","synthetic":true,"types":[]},{"text":"impl Send for Password","synthetic":true,"types":[]},{"text":"impl Send for signup","synthetic":true,"types":[]},{"text":"impl Send for signin","synthetic":true,"types":[]},{"text":"impl Send for signout","synthetic":true,"types":[]},{"text":"impl Send for delete_account","synthetic":true,"types":[]},{"text":"impl Send for Domain","synthetic":true,"types":[]},{"text":"impl Send for add_domain","synthetic":true,"types":[]},{"text":"impl Send for delete_domain","synthetic":true,"types":[]},{"text":"impl Send for UpdateDuration","synthetic":true,"types":[]},{"text":"impl Send for update_duration","synthetic":true,"types":[]},{"text":"impl Send for GetDurationResp","synthetic":true,"types":[]},{"text":"impl Send for GetDuration","synthetic":true,"types":[]},{"text":"impl Send for get_duration","synthetic":true,"types":[]},{"text":"impl Send for AddLevels","synthetic":true,"types":[]},{"text":"impl Send for add_levels","synthetic":true,"types":[]},{"text":"impl Send for update_levels","synthetic":true,"types":[]},{"text":"impl Send for delete_levels","synthetic":true,"types":[]},{"text":"impl Send for GetLevels","synthetic":true,"types":[]},{"text":"impl Send for get_levels","synthetic":true,"types":[]},{"text":"impl Send for Levels","synthetic":true,"types":[]},{"text":"impl Send for I32Levels","synthetic":true,"types":[]},{"text":"impl Send for MCaptchaID","synthetic":true,"types":[]},{"text":"impl Send for MCaptchaDetails","synthetic":true,"types":[]},{"text":"impl Send for add_mcaptcha","synthetic":true,"types":[]},{"text":"impl Send for delete_mcaptcha","synthetic":true,"types":[]},{"text":"impl Send for build_details","synthetic":true,"types":[]},{"text":"impl Send for Health","synthetic":true,"types":[]},{"text":"impl Send for HealthBuilder","synthetic":true,"types":[]},{"text":"impl Send for health","synthetic":true,"types":[]},{"text":"impl Send for Server","synthetic":true,"types":[]},{"text":"impl Send for Captcha","synthetic":true,"types":[]},{"text":"impl Send for DatabaseBuilder","synthetic":true,"types":[]},{"text":"impl Send for Database","synthetic":true,"types":[]},{"text":"impl Send for Settings","synthetic":true,"types":[]},{"text":"impl Send for SETTINGS","synthetic":true,"types":[]},{"text":"impl Send for GIT_COMMIT_HASH","synthetic":true,"types":[]}]; implementors["tests_migrate"] = [{"text":"impl Send for Data","synthetic":true,"types":[]},{"text":"impl Send for Server","synthetic":true,"types":[]},{"text":"impl Send for Captcha","synthetic":true,"types":[]},{"text":"impl Send for DatabaseBuilder","synthetic":true,"types":[]},{"text":"impl Send for Database","synthetic":true,"types":[]},{"text":"impl Send for Settings","synthetic":true,"types":[]},{"text":"impl Send for SETTINGS","synthetic":true,"types":[]}]; if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/implementors/core/marker/trait.Sync.js b/implementors/core/marker/trait.Sync.js index 0406e3de..ae46f2fe 100644 --- a/implementors/core/marker/trait.Sync.js +++ b/implementors/core/marker/trait.Sync.js @@ -1,4 +1,4 @@ (function() {var implementors = {}; -implementors["guard"] = [{"text":"impl Sync for Data","synthetic":true,"types":[]},{"text":"impl Sync for ServiceError","synthetic":true,"types":[]},{"text":"impl Sync for ErrorToResponse","synthetic":true,"types":[]},{"text":"impl Sync for Register","synthetic":true,"types":[]},{"text":"impl Sync for Login","synthetic":true,"types":[]},{"text":"impl Sync for Password","synthetic":true,"types":[]},{"text":"impl Sync for signup","synthetic":true,"types":[]},{"text":"impl Sync for signin","synthetic":true,"types":[]},{"text":"impl Sync for signout","synthetic":true,"types":[]},{"text":"impl Sync for delete_account","synthetic":true,"types":[]},{"text":"impl Sync for Domain","synthetic":true,"types":[]},{"text":"impl Sync for add_domain","synthetic":true,"types":[]},{"text":"impl Sync for delete_domain","synthetic":true,"types":[]},{"text":"impl Sync for CreateToken","synthetic":true,"types":[]},{"text":"impl Sync for TokenKeyPair","synthetic":true,"types":[]},{"text":"impl Sync for add_mcaptcha","synthetic":true,"types":[]},{"text":"impl Sync for delete_mcaptcha","synthetic":true,"types":[]},{"text":"impl Sync for AddLevels","synthetic":true,"types":[]},{"text":"impl Sync for add_levels","synthetic":true,"types":[]},{"text":"impl Sync for update_levels","synthetic":true,"types":[]},{"text":"impl Sync for delete_levels","synthetic":true,"types":[]},{"text":"impl Sync for GetLevels","synthetic":true,"types":[]},{"text":"impl Sync for get_levels","synthetic":true,"types":[]},{"text":"impl Sync for Duration","synthetic":true,"types":[]},{"text":"impl Sync for update_duration","synthetic":true,"types":[]},{"text":"impl Sync for GetDuration","synthetic":true,"types":[]},{"text":"impl Sync for get_duration","synthetic":true,"types":[]},{"text":"impl Sync for Levels","synthetic":true,"types":[]},{"text":"impl Sync for I32Levels","synthetic":true,"types":[]},{"text":"impl Sync for build_details","synthetic":true,"types":[]},{"text":"impl Sync for Health","synthetic":true,"types":[]},{"text":"impl Sync for HealthBuilder","synthetic":true,"types":[]},{"text":"impl Sync for health","synthetic":true,"types":[]},{"text":"impl Sync for Server","synthetic":true,"types":[]},{"text":"impl Sync for Captcha","synthetic":true,"types":[]},{"text":"impl Sync for DatabaseBuilder","synthetic":true,"types":[]},{"text":"impl Sync for Database","synthetic":true,"types":[]},{"text":"impl Sync for Settings","synthetic":true,"types":[]},{"text":"impl Sync for SETTINGS","synthetic":true,"types":[]},{"text":"impl Sync for GIT_COMMIT_HASH","synthetic":true,"types":[]}]; +implementors["guard"] = [{"text":"impl Sync for Data","synthetic":true,"types":[]},{"text":"impl Sync for ServiceError","synthetic":true,"types":[]},{"text":"impl Sync for ErrorToResponse","synthetic":true,"types":[]},{"text":"impl Sync for Register","synthetic":true,"types":[]},{"text":"impl Sync for Login","synthetic":true,"types":[]},{"text":"impl Sync for Password","synthetic":true,"types":[]},{"text":"impl Sync for signup","synthetic":true,"types":[]},{"text":"impl Sync for signin","synthetic":true,"types":[]},{"text":"impl Sync for signout","synthetic":true,"types":[]},{"text":"impl Sync for delete_account","synthetic":true,"types":[]},{"text":"impl Sync for Domain","synthetic":true,"types":[]},{"text":"impl Sync for add_domain","synthetic":true,"types":[]},{"text":"impl Sync for delete_domain","synthetic":true,"types":[]},{"text":"impl Sync for UpdateDuration","synthetic":true,"types":[]},{"text":"impl Sync for update_duration","synthetic":true,"types":[]},{"text":"impl Sync for GetDurationResp","synthetic":true,"types":[]},{"text":"impl Sync for GetDuration","synthetic":true,"types":[]},{"text":"impl Sync for get_duration","synthetic":true,"types":[]},{"text":"impl Sync for AddLevels","synthetic":true,"types":[]},{"text":"impl Sync for add_levels","synthetic":true,"types":[]},{"text":"impl Sync for update_levels","synthetic":true,"types":[]},{"text":"impl Sync for delete_levels","synthetic":true,"types":[]},{"text":"impl Sync for GetLevels","synthetic":true,"types":[]},{"text":"impl Sync for get_levels","synthetic":true,"types":[]},{"text":"impl Sync for Levels","synthetic":true,"types":[]},{"text":"impl Sync for I32Levels","synthetic":true,"types":[]},{"text":"impl Sync for MCaptchaID","synthetic":true,"types":[]},{"text":"impl Sync for MCaptchaDetails","synthetic":true,"types":[]},{"text":"impl Sync for add_mcaptcha","synthetic":true,"types":[]},{"text":"impl Sync for delete_mcaptcha","synthetic":true,"types":[]},{"text":"impl Sync for build_details","synthetic":true,"types":[]},{"text":"impl Sync for Health","synthetic":true,"types":[]},{"text":"impl Sync for HealthBuilder","synthetic":true,"types":[]},{"text":"impl Sync for health","synthetic":true,"types":[]},{"text":"impl Sync for Server","synthetic":true,"types":[]},{"text":"impl Sync for Captcha","synthetic":true,"types":[]},{"text":"impl Sync for DatabaseBuilder","synthetic":true,"types":[]},{"text":"impl Sync for Database","synthetic":true,"types":[]},{"text":"impl Sync for Settings","synthetic":true,"types":[]},{"text":"impl Sync for SETTINGS","synthetic":true,"types":[]},{"text":"impl Sync for GIT_COMMIT_HASH","synthetic":true,"types":[]}]; implementors["tests_migrate"] = [{"text":"impl Sync for Data","synthetic":true,"types":[]},{"text":"impl Sync for Server","synthetic":true,"types":[]},{"text":"impl Sync for Captcha","synthetic":true,"types":[]},{"text":"impl Sync for DatabaseBuilder","synthetic":true,"types":[]},{"text":"impl Sync for Database","synthetic":true,"types":[]},{"text":"impl Sync for Settings","synthetic":true,"types":[]},{"text":"impl Sync for SETTINGS","synthetic":true,"types":[]}]; if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/implementors/core/marker/trait.Unpin.js b/implementors/core/marker/trait.Unpin.js index 24e29590..966ff03d 100644 --- a/implementors/core/marker/trait.Unpin.js +++ b/implementors/core/marker/trait.Unpin.js @@ -1,4 +1,4 @@ (function() {var implementors = {}; -implementors["guard"] = [{"text":"impl Unpin for Data","synthetic":true,"types":[]},{"text":"impl Unpin for ServiceError","synthetic":true,"types":[]},{"text":"impl Unpin for ErrorToResponse","synthetic":true,"types":[]},{"text":"impl Unpin for Register","synthetic":true,"types":[]},{"text":"impl Unpin for Login","synthetic":true,"types":[]},{"text":"impl Unpin for Password","synthetic":true,"types":[]},{"text":"impl Unpin for signup","synthetic":true,"types":[]},{"text":"impl Unpin for signin","synthetic":true,"types":[]},{"text":"impl Unpin for signout","synthetic":true,"types":[]},{"text":"impl Unpin for delete_account","synthetic":true,"types":[]},{"text":"impl Unpin for Domain","synthetic":true,"types":[]},{"text":"impl Unpin for add_domain","synthetic":true,"types":[]},{"text":"impl Unpin for delete_domain","synthetic":true,"types":[]},{"text":"impl Unpin for CreateToken","synthetic":true,"types":[]},{"text":"impl Unpin for TokenKeyPair","synthetic":true,"types":[]},{"text":"impl Unpin for add_mcaptcha","synthetic":true,"types":[]},{"text":"impl Unpin for delete_mcaptcha","synthetic":true,"types":[]},{"text":"impl Unpin for AddLevels","synthetic":true,"types":[]},{"text":"impl Unpin for add_levels","synthetic":true,"types":[]},{"text":"impl Unpin for update_levels","synthetic":true,"types":[]},{"text":"impl Unpin for delete_levels","synthetic":true,"types":[]},{"text":"impl Unpin for GetLevels","synthetic":true,"types":[]},{"text":"impl Unpin for get_levels","synthetic":true,"types":[]},{"text":"impl Unpin for Duration","synthetic":true,"types":[]},{"text":"impl Unpin for update_duration","synthetic":true,"types":[]},{"text":"impl Unpin for GetDuration","synthetic":true,"types":[]},{"text":"impl Unpin for get_duration","synthetic":true,"types":[]},{"text":"impl Unpin for Levels","synthetic":true,"types":[]},{"text":"impl Unpin for I32Levels","synthetic":true,"types":[]},{"text":"impl Unpin for build_details","synthetic":true,"types":[]},{"text":"impl Unpin for Health","synthetic":true,"types":[]},{"text":"impl Unpin for HealthBuilder","synthetic":true,"types":[]},{"text":"impl Unpin for health","synthetic":true,"types":[]},{"text":"impl Unpin for Server","synthetic":true,"types":[]},{"text":"impl Unpin for Captcha","synthetic":true,"types":[]},{"text":"impl Unpin for DatabaseBuilder","synthetic":true,"types":[]},{"text":"impl Unpin for Database","synthetic":true,"types":[]},{"text":"impl Unpin for Settings","synthetic":true,"types":[]},{"text":"impl Unpin for SETTINGS","synthetic":true,"types":[]},{"text":"impl Unpin for GIT_COMMIT_HASH","synthetic":true,"types":[]}]; +implementors["guard"] = [{"text":"impl Unpin for Data","synthetic":true,"types":[]},{"text":"impl Unpin for ServiceError","synthetic":true,"types":[]},{"text":"impl Unpin for ErrorToResponse","synthetic":true,"types":[]},{"text":"impl Unpin for Register","synthetic":true,"types":[]},{"text":"impl Unpin for Login","synthetic":true,"types":[]},{"text":"impl Unpin for Password","synthetic":true,"types":[]},{"text":"impl Unpin for signup","synthetic":true,"types":[]},{"text":"impl Unpin for signin","synthetic":true,"types":[]},{"text":"impl Unpin for signout","synthetic":true,"types":[]},{"text":"impl Unpin for delete_account","synthetic":true,"types":[]},{"text":"impl Unpin for Domain","synthetic":true,"types":[]},{"text":"impl Unpin for add_domain","synthetic":true,"types":[]},{"text":"impl Unpin for delete_domain","synthetic":true,"types":[]},{"text":"impl Unpin for UpdateDuration","synthetic":true,"types":[]},{"text":"impl Unpin for update_duration","synthetic":true,"types":[]},{"text":"impl Unpin for GetDurationResp","synthetic":true,"types":[]},{"text":"impl Unpin for GetDuration","synthetic":true,"types":[]},{"text":"impl Unpin for get_duration","synthetic":true,"types":[]},{"text":"impl Unpin for AddLevels","synthetic":true,"types":[]},{"text":"impl Unpin for add_levels","synthetic":true,"types":[]},{"text":"impl Unpin for update_levels","synthetic":true,"types":[]},{"text":"impl Unpin for delete_levels","synthetic":true,"types":[]},{"text":"impl Unpin for GetLevels","synthetic":true,"types":[]},{"text":"impl Unpin for get_levels","synthetic":true,"types":[]},{"text":"impl Unpin for Levels","synthetic":true,"types":[]},{"text":"impl Unpin for I32Levels","synthetic":true,"types":[]},{"text":"impl Unpin for MCaptchaID","synthetic":true,"types":[]},{"text":"impl Unpin for MCaptchaDetails","synthetic":true,"types":[]},{"text":"impl Unpin for add_mcaptcha","synthetic":true,"types":[]},{"text":"impl Unpin for delete_mcaptcha","synthetic":true,"types":[]},{"text":"impl Unpin for build_details","synthetic":true,"types":[]},{"text":"impl Unpin for Health","synthetic":true,"types":[]},{"text":"impl Unpin for HealthBuilder","synthetic":true,"types":[]},{"text":"impl Unpin for health","synthetic":true,"types":[]},{"text":"impl Unpin for Server","synthetic":true,"types":[]},{"text":"impl Unpin for Captcha","synthetic":true,"types":[]},{"text":"impl Unpin for DatabaseBuilder","synthetic":true,"types":[]},{"text":"impl Unpin for Database","synthetic":true,"types":[]},{"text":"impl Unpin for Settings","synthetic":true,"types":[]},{"text":"impl Unpin for SETTINGS","synthetic":true,"types":[]},{"text":"impl Unpin for GIT_COMMIT_HASH","synthetic":true,"types":[]}]; implementors["tests_migrate"] = [{"text":"impl Unpin for Data","synthetic":true,"types":[]},{"text":"impl Unpin for Server","synthetic":true,"types":[]},{"text":"impl Unpin for Captcha","synthetic":true,"types":[]},{"text":"impl Unpin for DatabaseBuilder","synthetic":true,"types":[]},{"text":"impl Unpin for Database","synthetic":true,"types":[]},{"text":"impl Unpin for Settings","synthetic":true,"types":[]},{"text":"impl Unpin for SETTINGS","synthetic":true,"types":[]}]; if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/implementors/serde/de/trait.Deserialize.js b/implementors/serde/de/trait.Deserialize.js index 3cfd6f39..00c8648c 100644 --- a/implementors/serde/de/trait.Deserialize.js +++ b/implementors/serde/de/trait.Deserialize.js @@ -1,4 +1,4 @@ (function() {var implementors = {}; -implementors["guard"] = [{"text":"impl<'de> Deserialize<'de> for ErrorToResponse","synthetic":false,"types":[]},{"text":"impl<'de> Deserialize<'de> for Register","synthetic":false,"types":[]},{"text":"impl<'de> Deserialize<'de> for Login","synthetic":false,"types":[]},{"text":"impl<'de> Deserialize<'de> for Domain","synthetic":false,"types":[]},{"text":"impl<'de> Deserialize<'de> for CreateToken","synthetic":false,"types":[]},{"text":"impl<'de> Deserialize<'de> for TokenKeyPair","synthetic":false,"types":[]},{"text":"impl<'de> Deserialize<'de> for AddLevels","synthetic":false,"types":[]},{"text":"impl<'de> Deserialize<'de> for GetLevels","synthetic":false,"types":[]},{"text":"impl<'de> Deserialize<'de> for Duration","synthetic":false,"types":[]},{"text":"impl<'de> Deserialize<'de> for GetDuration","synthetic":false,"types":[]},{"text":"impl<'de> Deserialize<'de> for Levels","synthetic":false,"types":[]},{"text":"impl<'de> Deserialize<'de> for I32Levels","synthetic":false,"types":[]},{"text":"impl<'de> Deserialize<'de> for Health","synthetic":false,"types":[]},{"text":"impl<'de> Deserialize<'de> for Server","synthetic":false,"types":[]},{"text":"impl<'de> Deserialize<'de> for Captcha","synthetic":false,"types":[]},{"text":"impl<'de> Deserialize<'de> for DatabaseBuilder","synthetic":false,"types":[]},{"text":"impl<'de> Deserialize<'de> for Database","synthetic":false,"types":[]},{"text":"impl<'de> Deserialize<'de> for Settings","synthetic":false,"types":[]}]; +implementors["guard"] = [{"text":"impl<'de> Deserialize<'de> for ErrorToResponse","synthetic":false,"types":[]},{"text":"impl<'de> Deserialize<'de> for Register","synthetic":false,"types":[]},{"text":"impl<'de> Deserialize<'de> for Login","synthetic":false,"types":[]},{"text":"impl<'de> Deserialize<'de> for Domain","synthetic":false,"types":[]},{"text":"impl<'de> Deserialize<'de> for UpdateDuration","synthetic":false,"types":[]},{"text":"impl<'de> Deserialize<'de> for GetDurationResp","synthetic":false,"types":[]},{"text":"impl<'de> Deserialize<'de> for GetDuration","synthetic":false,"types":[]},{"text":"impl<'de> Deserialize<'de> for AddLevels","synthetic":false,"types":[]},{"text":"impl<'de> Deserialize<'de> for GetLevels","synthetic":false,"types":[]},{"text":"impl<'de> Deserialize<'de> for Levels","synthetic":false,"types":[]},{"text":"impl<'de> Deserialize<'de> for I32Levels","synthetic":false,"types":[]},{"text":"impl<'de> Deserialize<'de> for MCaptchaID","synthetic":false,"types":[]},{"text":"impl<'de> Deserialize<'de> for MCaptchaDetails","synthetic":false,"types":[]},{"text":"impl<'de> Deserialize<'de> for Health","synthetic":false,"types":[]},{"text":"impl<'de> Deserialize<'de> for Server","synthetic":false,"types":[]},{"text":"impl<'de> Deserialize<'de> for Captcha","synthetic":false,"types":[]},{"text":"impl<'de> Deserialize<'de> for DatabaseBuilder","synthetic":false,"types":[]},{"text":"impl<'de> Deserialize<'de> for Database","synthetic":false,"types":[]},{"text":"impl<'de> Deserialize<'de> for Settings","synthetic":false,"types":[]}]; implementors["tests_migrate"] = [{"text":"impl<'de> Deserialize<'de> for Server","synthetic":false,"types":[]},{"text":"impl<'de> Deserialize<'de> for Captcha","synthetic":false,"types":[]},{"text":"impl<'de> Deserialize<'de> for DatabaseBuilder","synthetic":false,"types":[]},{"text":"impl<'de> Deserialize<'de> for Database","synthetic":false,"types":[]},{"text":"impl<'de> Deserialize<'de> for Settings","synthetic":false,"types":[]}]; if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/implementors/serde/ser/trait.Serialize.js b/implementors/serde/ser/trait.Serialize.js index 9c4e7cf4..8001fa51 100644 --- a/implementors/serde/ser/trait.Serialize.js +++ b/implementors/serde/ser/trait.Serialize.js @@ -1,3 +1,3 @@ (function() {var implementors = {}; -implementors["guard"] = [{"text":"impl Serialize for ErrorToResponse","synthetic":false,"types":[]},{"text":"impl Serialize for Register","synthetic":false,"types":[]},{"text":"impl Serialize for Login","synthetic":false,"types":[]},{"text":"impl Serialize for Domain","synthetic":false,"types":[]},{"text":"impl Serialize for CreateToken","synthetic":false,"types":[]},{"text":"impl Serialize for TokenKeyPair","synthetic":false,"types":[]},{"text":"impl Serialize for AddLevels","synthetic":false,"types":[]},{"text":"impl Serialize for GetLevels","synthetic":false,"types":[]},{"text":"impl Serialize for Duration","synthetic":false,"types":[]},{"text":"impl Serialize for GetDuration","synthetic":false,"types":[]},{"text":"impl Serialize for Levels","synthetic":false,"types":[]},{"text":"impl Serialize for I32Levels","synthetic":false,"types":[]},{"text":"impl Serialize for Health","synthetic":false,"types":[]}]; +implementors["guard"] = [{"text":"impl Serialize for ErrorToResponse","synthetic":false,"types":[]},{"text":"impl Serialize for Register","synthetic":false,"types":[]},{"text":"impl Serialize for Login","synthetic":false,"types":[]},{"text":"impl Serialize for Domain","synthetic":false,"types":[]},{"text":"impl Serialize for UpdateDuration","synthetic":false,"types":[]},{"text":"impl Serialize for GetDurationResp","synthetic":false,"types":[]},{"text":"impl Serialize for GetDuration","synthetic":false,"types":[]},{"text":"impl Serialize for AddLevels","synthetic":false,"types":[]},{"text":"impl Serialize for GetLevels","synthetic":false,"types":[]},{"text":"impl Serialize for Levels","synthetic":false,"types":[]},{"text":"impl Serialize for I32Levels","synthetic":false,"types":[]},{"text":"impl Serialize for MCaptchaID","synthetic":false,"types":[]},{"text":"impl Serialize for MCaptchaDetails","synthetic":false,"types":[]},{"text":"impl Serialize for Health","synthetic":false,"types":[]}]; if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/implementors/std/panic/trait.RefUnwindSafe.js b/implementors/std/panic/trait.RefUnwindSafe.js index b2369ee2..8a6bfcac 100644 --- a/implementors/std/panic/trait.RefUnwindSafe.js +++ b/implementors/std/panic/trait.RefUnwindSafe.js @@ -1,4 +1,4 @@ (function() {var implementors = {}; -implementors["guard"] = [{"text":"impl !RefUnwindSafe for Data","synthetic":true,"types":[]},{"text":"impl RefUnwindSafe for ServiceError","synthetic":true,"types":[]},{"text":"impl RefUnwindSafe for ErrorToResponse","synthetic":true,"types":[]},{"text":"impl RefUnwindSafe for Register","synthetic":true,"types":[]},{"text":"impl RefUnwindSafe for Login","synthetic":true,"types":[]},{"text":"impl RefUnwindSafe for Password","synthetic":true,"types":[]},{"text":"impl RefUnwindSafe for signup","synthetic":true,"types":[]},{"text":"impl RefUnwindSafe for signin","synthetic":true,"types":[]},{"text":"impl RefUnwindSafe for signout","synthetic":true,"types":[]},{"text":"impl RefUnwindSafe for delete_account","synthetic":true,"types":[]},{"text":"impl RefUnwindSafe for Domain","synthetic":true,"types":[]},{"text":"impl RefUnwindSafe for add_domain","synthetic":true,"types":[]},{"text":"impl RefUnwindSafe for delete_domain","synthetic":true,"types":[]},{"text":"impl RefUnwindSafe for CreateToken","synthetic":true,"types":[]},{"text":"impl RefUnwindSafe for TokenKeyPair","synthetic":true,"types":[]},{"text":"impl RefUnwindSafe for add_mcaptcha","synthetic":true,"types":[]},{"text":"impl RefUnwindSafe for delete_mcaptcha","synthetic":true,"types":[]},{"text":"impl RefUnwindSafe for AddLevels","synthetic":true,"types":[]},{"text":"impl RefUnwindSafe for add_levels","synthetic":true,"types":[]},{"text":"impl RefUnwindSafe for update_levels","synthetic":true,"types":[]},{"text":"impl RefUnwindSafe for delete_levels","synthetic":true,"types":[]},{"text":"impl RefUnwindSafe for GetLevels","synthetic":true,"types":[]},{"text":"impl RefUnwindSafe for get_levels","synthetic":true,"types":[]},{"text":"impl RefUnwindSafe for Duration","synthetic":true,"types":[]},{"text":"impl RefUnwindSafe for update_duration","synthetic":true,"types":[]},{"text":"impl RefUnwindSafe for GetDuration","synthetic":true,"types":[]},{"text":"impl RefUnwindSafe for get_duration","synthetic":true,"types":[]},{"text":"impl RefUnwindSafe for Levels","synthetic":true,"types":[]},{"text":"impl RefUnwindSafe for I32Levels","synthetic":true,"types":[]},{"text":"impl RefUnwindSafe for build_details","synthetic":true,"types":[]},{"text":"impl RefUnwindSafe for Health","synthetic":true,"types":[]},{"text":"impl RefUnwindSafe for HealthBuilder","synthetic":true,"types":[]},{"text":"impl RefUnwindSafe for health","synthetic":true,"types":[]},{"text":"impl RefUnwindSafe for Server","synthetic":true,"types":[]},{"text":"impl RefUnwindSafe for Captcha","synthetic":true,"types":[]},{"text":"impl RefUnwindSafe for DatabaseBuilder","synthetic":true,"types":[]},{"text":"impl RefUnwindSafe for Database","synthetic":true,"types":[]},{"text":"impl RefUnwindSafe for Settings","synthetic":true,"types":[]},{"text":"impl RefUnwindSafe for SETTINGS","synthetic":true,"types":[]},{"text":"impl RefUnwindSafe for GIT_COMMIT_HASH","synthetic":true,"types":[]}]; +implementors["guard"] = [{"text":"impl !RefUnwindSafe for Data","synthetic":true,"types":[]},{"text":"impl RefUnwindSafe for ServiceError","synthetic":true,"types":[]},{"text":"impl RefUnwindSafe for ErrorToResponse","synthetic":true,"types":[]},{"text":"impl RefUnwindSafe for Register","synthetic":true,"types":[]},{"text":"impl RefUnwindSafe for Login","synthetic":true,"types":[]},{"text":"impl RefUnwindSafe for Password","synthetic":true,"types":[]},{"text":"impl RefUnwindSafe for signup","synthetic":true,"types":[]},{"text":"impl RefUnwindSafe for signin","synthetic":true,"types":[]},{"text":"impl RefUnwindSafe for signout","synthetic":true,"types":[]},{"text":"impl RefUnwindSafe for delete_account","synthetic":true,"types":[]},{"text":"impl RefUnwindSafe for Domain","synthetic":true,"types":[]},{"text":"impl RefUnwindSafe for add_domain","synthetic":true,"types":[]},{"text":"impl RefUnwindSafe for delete_domain","synthetic":true,"types":[]},{"text":"impl RefUnwindSafe for UpdateDuration","synthetic":true,"types":[]},{"text":"impl RefUnwindSafe for update_duration","synthetic":true,"types":[]},{"text":"impl RefUnwindSafe for GetDurationResp","synthetic":true,"types":[]},{"text":"impl RefUnwindSafe for GetDuration","synthetic":true,"types":[]},{"text":"impl RefUnwindSafe for get_duration","synthetic":true,"types":[]},{"text":"impl RefUnwindSafe for AddLevels","synthetic":true,"types":[]},{"text":"impl RefUnwindSafe for add_levels","synthetic":true,"types":[]},{"text":"impl RefUnwindSafe for update_levels","synthetic":true,"types":[]},{"text":"impl RefUnwindSafe for delete_levels","synthetic":true,"types":[]},{"text":"impl RefUnwindSafe for GetLevels","synthetic":true,"types":[]},{"text":"impl RefUnwindSafe for get_levels","synthetic":true,"types":[]},{"text":"impl RefUnwindSafe for Levels","synthetic":true,"types":[]},{"text":"impl RefUnwindSafe for I32Levels","synthetic":true,"types":[]},{"text":"impl RefUnwindSafe for MCaptchaID","synthetic":true,"types":[]},{"text":"impl RefUnwindSafe for MCaptchaDetails","synthetic":true,"types":[]},{"text":"impl RefUnwindSafe for add_mcaptcha","synthetic":true,"types":[]},{"text":"impl RefUnwindSafe for delete_mcaptcha","synthetic":true,"types":[]},{"text":"impl RefUnwindSafe for build_details","synthetic":true,"types":[]},{"text":"impl RefUnwindSafe for Health","synthetic":true,"types":[]},{"text":"impl RefUnwindSafe for HealthBuilder","synthetic":true,"types":[]},{"text":"impl RefUnwindSafe for health","synthetic":true,"types":[]},{"text":"impl RefUnwindSafe for Server","synthetic":true,"types":[]},{"text":"impl RefUnwindSafe for Captcha","synthetic":true,"types":[]},{"text":"impl RefUnwindSafe for DatabaseBuilder","synthetic":true,"types":[]},{"text":"impl RefUnwindSafe for Database","synthetic":true,"types":[]},{"text":"impl RefUnwindSafe for Settings","synthetic":true,"types":[]},{"text":"impl RefUnwindSafe for SETTINGS","synthetic":true,"types":[]},{"text":"impl RefUnwindSafe for GIT_COMMIT_HASH","synthetic":true,"types":[]}]; implementors["tests_migrate"] = [{"text":"impl !RefUnwindSafe for Data","synthetic":true,"types":[]},{"text":"impl RefUnwindSafe for Server","synthetic":true,"types":[]},{"text":"impl RefUnwindSafe for Captcha","synthetic":true,"types":[]},{"text":"impl RefUnwindSafe for DatabaseBuilder","synthetic":true,"types":[]},{"text":"impl RefUnwindSafe for Database","synthetic":true,"types":[]},{"text":"impl RefUnwindSafe for Settings","synthetic":true,"types":[]},{"text":"impl RefUnwindSafe for SETTINGS","synthetic":true,"types":[]}]; if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/implementors/std/panic/trait.UnwindSafe.js b/implementors/std/panic/trait.UnwindSafe.js index 20a35e97..bcc8d79e 100644 --- a/implementors/std/panic/trait.UnwindSafe.js +++ b/implementors/std/panic/trait.UnwindSafe.js @@ -1,4 +1,4 @@ (function() {var implementors = {}; -implementors["guard"] = [{"text":"impl !UnwindSafe for Data","synthetic":true,"types":[]},{"text":"impl UnwindSafe for ServiceError","synthetic":true,"types":[]},{"text":"impl UnwindSafe for ErrorToResponse","synthetic":true,"types":[]},{"text":"impl UnwindSafe for Register","synthetic":true,"types":[]},{"text":"impl UnwindSafe for Login","synthetic":true,"types":[]},{"text":"impl UnwindSafe for Password","synthetic":true,"types":[]},{"text":"impl UnwindSafe for signup","synthetic":true,"types":[]},{"text":"impl UnwindSafe for signin","synthetic":true,"types":[]},{"text":"impl UnwindSafe for signout","synthetic":true,"types":[]},{"text":"impl UnwindSafe for delete_account","synthetic":true,"types":[]},{"text":"impl UnwindSafe for Domain","synthetic":true,"types":[]},{"text":"impl UnwindSafe for add_domain","synthetic":true,"types":[]},{"text":"impl UnwindSafe for delete_domain","synthetic":true,"types":[]},{"text":"impl UnwindSafe for CreateToken","synthetic":true,"types":[]},{"text":"impl UnwindSafe for TokenKeyPair","synthetic":true,"types":[]},{"text":"impl UnwindSafe for add_mcaptcha","synthetic":true,"types":[]},{"text":"impl UnwindSafe for delete_mcaptcha","synthetic":true,"types":[]},{"text":"impl UnwindSafe for AddLevels","synthetic":true,"types":[]},{"text":"impl UnwindSafe for add_levels","synthetic":true,"types":[]},{"text":"impl UnwindSafe for update_levels","synthetic":true,"types":[]},{"text":"impl UnwindSafe for delete_levels","synthetic":true,"types":[]},{"text":"impl UnwindSafe for GetLevels","synthetic":true,"types":[]},{"text":"impl UnwindSafe for get_levels","synthetic":true,"types":[]},{"text":"impl UnwindSafe for Duration","synthetic":true,"types":[]},{"text":"impl UnwindSafe for update_duration","synthetic":true,"types":[]},{"text":"impl UnwindSafe for GetDuration","synthetic":true,"types":[]},{"text":"impl UnwindSafe for get_duration","synthetic":true,"types":[]},{"text":"impl UnwindSafe for Levels","synthetic":true,"types":[]},{"text":"impl UnwindSafe for I32Levels","synthetic":true,"types":[]},{"text":"impl UnwindSafe for build_details","synthetic":true,"types":[]},{"text":"impl UnwindSafe for Health","synthetic":true,"types":[]},{"text":"impl UnwindSafe for HealthBuilder","synthetic":true,"types":[]},{"text":"impl UnwindSafe for health","synthetic":true,"types":[]},{"text":"impl UnwindSafe for Server","synthetic":true,"types":[]},{"text":"impl UnwindSafe for Captcha","synthetic":true,"types":[]},{"text":"impl UnwindSafe for DatabaseBuilder","synthetic":true,"types":[]},{"text":"impl UnwindSafe for Database","synthetic":true,"types":[]},{"text":"impl UnwindSafe for Settings","synthetic":true,"types":[]},{"text":"impl UnwindSafe for SETTINGS","synthetic":true,"types":[]},{"text":"impl UnwindSafe for GIT_COMMIT_HASH","synthetic":true,"types":[]}]; +implementors["guard"] = [{"text":"impl !UnwindSafe for Data","synthetic":true,"types":[]},{"text":"impl UnwindSafe for ServiceError","synthetic":true,"types":[]},{"text":"impl UnwindSafe for ErrorToResponse","synthetic":true,"types":[]},{"text":"impl UnwindSafe for Register","synthetic":true,"types":[]},{"text":"impl UnwindSafe for Login","synthetic":true,"types":[]},{"text":"impl UnwindSafe for Password","synthetic":true,"types":[]},{"text":"impl UnwindSafe for signup","synthetic":true,"types":[]},{"text":"impl UnwindSafe for signin","synthetic":true,"types":[]},{"text":"impl UnwindSafe for signout","synthetic":true,"types":[]},{"text":"impl UnwindSafe for delete_account","synthetic":true,"types":[]},{"text":"impl UnwindSafe for Domain","synthetic":true,"types":[]},{"text":"impl UnwindSafe for add_domain","synthetic":true,"types":[]},{"text":"impl UnwindSafe for delete_domain","synthetic":true,"types":[]},{"text":"impl UnwindSafe for UpdateDuration","synthetic":true,"types":[]},{"text":"impl UnwindSafe for update_duration","synthetic":true,"types":[]},{"text":"impl UnwindSafe for GetDurationResp","synthetic":true,"types":[]},{"text":"impl UnwindSafe for GetDuration","synthetic":true,"types":[]},{"text":"impl UnwindSafe for get_duration","synthetic":true,"types":[]},{"text":"impl UnwindSafe for AddLevels","synthetic":true,"types":[]},{"text":"impl UnwindSafe for add_levels","synthetic":true,"types":[]},{"text":"impl UnwindSafe for update_levels","synthetic":true,"types":[]},{"text":"impl UnwindSafe for delete_levels","synthetic":true,"types":[]},{"text":"impl UnwindSafe for GetLevels","synthetic":true,"types":[]},{"text":"impl UnwindSafe for get_levels","synthetic":true,"types":[]},{"text":"impl UnwindSafe for Levels","synthetic":true,"types":[]},{"text":"impl UnwindSafe for I32Levels","synthetic":true,"types":[]},{"text":"impl UnwindSafe for MCaptchaID","synthetic":true,"types":[]},{"text":"impl UnwindSafe for MCaptchaDetails","synthetic":true,"types":[]},{"text":"impl UnwindSafe for add_mcaptcha","synthetic":true,"types":[]},{"text":"impl UnwindSafe for delete_mcaptcha","synthetic":true,"types":[]},{"text":"impl UnwindSafe for build_details","synthetic":true,"types":[]},{"text":"impl UnwindSafe for Health","synthetic":true,"types":[]},{"text":"impl UnwindSafe for HealthBuilder","synthetic":true,"types":[]},{"text":"impl UnwindSafe for health","synthetic":true,"types":[]},{"text":"impl UnwindSafe for Server","synthetic":true,"types":[]},{"text":"impl UnwindSafe for Captcha","synthetic":true,"types":[]},{"text":"impl UnwindSafe for DatabaseBuilder","synthetic":true,"types":[]},{"text":"impl UnwindSafe for Database","synthetic":true,"types":[]},{"text":"impl UnwindSafe for Settings","synthetic":true,"types":[]},{"text":"impl UnwindSafe for SETTINGS","synthetic":true,"types":[]},{"text":"impl UnwindSafe for GIT_COMMIT_HASH","synthetic":true,"types":[]}]; implementors["tests_migrate"] = [{"text":"impl !UnwindSafe for Data","synthetic":true,"types":[]},{"text":"impl UnwindSafe for Server","synthetic":true,"types":[]},{"text":"impl UnwindSafe for Captcha","synthetic":true,"types":[]},{"text":"impl UnwindSafe for DatabaseBuilder","synthetic":true,"types":[]},{"text":"impl UnwindSafe for Database","synthetic":true,"types":[]},{"text":"impl UnwindSafe for Settings","synthetic":true,"types":[]},{"text":"impl UnwindSafe for SETTINGS","synthetic":true,"types":[]}]; if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/search-index.js b/search-index.js index a7d86040..ed5d468b 100644 --- a/search-index.js +++ b/search-index.js @@ -1,5 +1,5 @@ var searchIndex = JSON.parse('{\ -"guard":{"doc":"","i":[[0,"data","guard","",null,null],[3,"Data","guard::data","",null,null],[12,"db","","",0,null],[12,"creds","","",0,null],[12,"captcha","","",0,null],[11,"new","","",0,[[]]],[0,"errors","guard","",null,null],[4,"ServiceError","guard::errors","",null,null],[13,"InternalServerError","","",1,null],[13,"NotAnEmail","","",1,null],[13,"NotAUrl","","",1,null],[13,"WrongPassword","","",1,null],[13,"UsernameNotFound","","",1,null],[13,"AuthorizationRequired","","",1,null],[13,"ProfainityError","","when the value passed contains profainity",1,null],[13,"BlacklistError","","when the value passed contains blacklisted words see …",1,null],[13,"UsernameCaseMappedError","","when the value passed contains characters not present in …",1,null],[13,"PasswordTooShort","","",1,null],[13,"PasswordTooLong","","",1,null],[13,"UsernameTaken","","when the a username is already taken",1,null],[13,"TokenNameTaken","","when the a token name is already taken",1,null],[13,"HostnameTaken","","when the a host name is already taken",1,null],[13,"CaptchaError","","",1,null],[3,"ErrorToResponse","","",null,null],[12,"error","","",2,null],[5,"dup_error","","",null,[[["serviceerror",4],["error",4]],["serviceerror",4]]],[6,"ServiceResult","","",null,null],[0,"api","guard","",null,null],[0,"v1","guard::api","",null,null],[0,"auth","guard::api::v1","",null,null],[3,"Register","guard::api::v1::auth","",null,null],[12,"username","","",3,null],[12,"password","","",3,null],[12,"email","","",3,null],[3,"Login","","",null,null],[12,"username","","",4,null],[12,"password","","",4,null],[3,"Password","","",null,null],[12,"password","","",5,null],[3,"signup","","",null,null],[3,"signin","","",null,null],[3,"signout","","",null,null],[5,"is_authenticated","","Check if user is authenticated",null,[[["identity",3]],[["serviceerror",4],["result",4]]]],[3,"delete_account","","",null,null],[0,"mcaptcha","guard::api::v1","",null,null],[3,"Domain","guard::api::v1::mcaptcha","",null,null],[12,"name","","",6,null],[3,"add_domain","","",null,null],[3,"delete_domain","","",null,null],[3,"CreateToken","","",null,null],[12,"name","","",7,null],[12,"domain","","",7,null],[3,"TokenKeyPair","","",null,null],[12,"name","","",8,null],[12,"key","","",8,null],[3,"add_mcaptcha","","",null,null],[3,"delete_mcaptcha","","",null,null],[5,"get_random","","",null,[[],["string",3]]],[3,"AddLevels","","",null,null],[12,"levels","","",9,null],[12,"name","","",9,null],[3,"add_levels","","",null,null],[3,"update_levels","","",null,null],[3,"delete_levels","","",null,null],[3,"GetLevels","","",null,null],[12,"token","","",10,null],[3,"get_levels","","",null,null],[3,"Duration","","",null,null],[12,"token_name","","",11,null],[12,"duration","","",11,null],[3,"update_duration","","",null,null],[3,"GetDuration","","",null,null],[12,"duration","","",12,null],[3,"get_duration","","",null,null],[3,"Levels","","",null,null],[12,"levels","","",13,null],[3,"I32Levels","","",null,null],[12,"difficulty_factor","","",14,null],[12,"visitor_threshold","","",14,null],[5,"get_levels_util","","",null,[[["data",3]]]],[0,"meta","guard::api::v1","",null,null],[3,"build_details","guard::api::v1::meta","",null,null],[3,"Health","","Health check return datatype",null,null],[12,"db","","",15,null],[3,"HealthBuilder","","Builder for Health.",null,null],[12,"db","","",16,null],[11,"db","","",16,[[]]],[11,"build","","Builds a new Health.",16,[[],[["health",3],["string",3],["result",4]]]],[3,"health","","",null,null],[5,"services","guard::api::v1","",null,[[["serviceconfig",3]]]],[0,"settings","guard","",null,null],[3,"Server","guard::settings","",null,null],[12,"allow_registration","","",17,null],[12,"port","","",17,null],[12,"domain","","",17,null],[12,"cookie_secret","","",17,null],[12,"ip","","",17,null],[3,"Captcha","","",null,null],[12,"salt","","",18,null],[12,"gc","","",18,null],[11,"get_ip","","",17,[[],["string",3]]],[3,"DatabaseBuilder","","",null,null],[12,"port","","",19,null],[12,"hostname","","",19,null],[12,"username","","",19,null],[12,"password","","",19,null],[12,"name","","",19,null],[12,"url","","",19,null],[11,"extract_database_url","","",19,[[["url",3]]]],[3,"Database","","",null,null],[12,"url","","",20,null],[12,"pool","","",20,null],[3,"Settings","","",null,null],[12,"debug","","",21,null],[12,"database","","",21,null],[12,"server","","",21,null],[12,"pow","","",21,null],[11,"new","","",21,[[],[["configerror",4],["result",4]]]],[5,"set_from_database_url","","",null,[[["config",3],["databasebuilder",3]]]],[5,"set_database_url","","",null,[[["config",3]]]],[3,"Data","guard","",null,null],[12,"db","","",0,null],[12,"creds","","",0,null],[12,"captcha","","",0,null],[3,"Settings","","",null,null],[12,"debug","","",21,null],[12,"database","","",21,null],[12,"server","","",21,null],[12,"pow","","",21,null],[3,"SETTINGS","","",null,null],[12,"__private_field","","",22,null],[3,"GIT_COMMIT_HASH","","",null,null],[12,"__private_field","","",23,null],[7,"VERSION","","",null,null],[7,"PKG_NAME","","",null,null],[7,"PKG_DESCRIPTION","","",null,null],[7,"PKG_HOMEPAGE","","",null,null],[5,"main","","",null,[[],["result",6]]],[5,"get_json_err","","",null,[[],["jsonconfig",3]]],[5,"get_identity_service","","",null,[[],[["identityservice",3],["cookieidentitypolicy",3]]]],[11,"from","guard::data","",0,[[]]],[11,"into","","",0,[[]]],[11,"to_owned","","",0,[[]]],[11,"clone_into","","",0,[[]]],[11,"borrow","","",0,[[]]],[11,"borrow_mut","","",0,[[]]],[11,"try_from","","",0,[[],["result",4]]],[11,"try_into","","",0,[[],["result",4]]],[11,"type_id","","",0,[[],["typeid",3]]],[11,"vzip","","",0,[[]]],[11,"from","guard::errors","",1,[[]]],[11,"into","","",1,[[]]],[11,"to_owned","","",1,[[]]],[11,"clone_into","","",1,[[]]],[11,"to_string","","",1,[[],["string",3]]],[11,"borrow","","",1,[[]]],[11,"borrow_mut","","",1,[[]]],[11,"try_from","","",1,[[],["result",4]]],[11,"try_into","","",1,[[],["result",4]]],[11,"type_id","","",1,[[],["typeid",3]]],[11,"vzip","","",1,[[]]],[11,"from","","",2,[[]]],[11,"into","","",2,[[]]],[11,"borrow","","",2,[[]]],[11,"borrow_mut","","",2,[[]]],[11,"try_from","","",2,[[],["result",4]]],[11,"try_into","","",2,[[],["result",4]]],[11,"type_id","","",2,[[],["typeid",3]]],[11,"vzip","","",2,[[]]],[11,"from","guard::api::v1::auth","",3,[[]]],[11,"into","","",3,[[]]],[11,"to_owned","","",3,[[]]],[11,"clone_into","","",3,[[]]],[11,"borrow","","",3,[[]]],[11,"borrow_mut","","",3,[[]]],[11,"try_from","","",3,[[],["result",4]]],[11,"try_into","","",3,[[],["result",4]]],[11,"type_id","","",3,[[],["typeid",3]]],[11,"vzip","","",3,[[]]],[11,"from","","",4,[[]]],[11,"into","","",4,[[]]],[11,"to_owned","","",4,[[]]],[11,"clone_into","","",4,[[]]],[11,"borrow","","",4,[[]]],[11,"borrow_mut","","",4,[[]]],[11,"try_from","","",4,[[],["result",4]]],[11,"try_into","","",4,[[],["result",4]]],[11,"type_id","","",4,[[],["typeid",3]]],[11,"vzip","","",4,[[]]],[11,"from","","",5,[[]]],[11,"into","","",5,[[]]],[11,"borrow","","",5,[[]]],[11,"borrow_mut","","",5,[[]]],[11,"try_from","","",5,[[],["result",4]]],[11,"try_into","","",5,[[],["result",4]]],[11,"type_id","","",5,[[],["typeid",3]]],[11,"vzip","","",5,[[]]],[11,"from","","",24,[[]]],[11,"into","","",24,[[]]],[11,"borrow","","",24,[[]]],[11,"borrow_mut","","",24,[[]]],[11,"try_from","","",24,[[],["result",4]]],[11,"try_into","","",24,[[],["result",4]]],[11,"type_id","","",24,[[],["typeid",3]]],[11,"vzip","","",24,[[]]],[11,"from","","",25,[[]]],[11,"into","","",25,[[]]],[11,"borrow","","",25,[[]]],[11,"borrow_mut","","",25,[[]]],[11,"try_from","","",25,[[],["result",4]]],[11,"try_into","","",25,[[],["result",4]]],[11,"type_id","","",25,[[],["typeid",3]]],[11,"vzip","","",25,[[]]],[11,"from","","",26,[[]]],[11,"into","","",26,[[]]],[11,"borrow","","",26,[[]]],[11,"borrow_mut","","",26,[[]]],[11,"try_from","","",26,[[],["result",4]]],[11,"try_into","","",26,[[],["result",4]]],[11,"type_id","","",26,[[],["typeid",3]]],[11,"vzip","","",26,[[]]],[11,"from","","",27,[[]]],[11,"into","","",27,[[]]],[11,"borrow","","",27,[[]]],[11,"borrow_mut","","",27,[[]]],[11,"try_from","","",27,[[],["result",4]]],[11,"try_into","","",27,[[],["result",4]]],[11,"type_id","","",27,[[],["typeid",3]]],[11,"vzip","","",27,[[]]],[11,"from","guard::api::v1::mcaptcha","",6,[[]]],[11,"into","","",6,[[]]],[11,"to_owned","","",6,[[]]],[11,"clone_into","","",6,[[]]],[11,"borrow","","",6,[[]]],[11,"borrow_mut","","",6,[[]]],[11,"try_from","","",6,[[],["result",4]]],[11,"try_into","","",6,[[],["result",4]]],[11,"type_id","","",6,[[],["typeid",3]]],[11,"vzip","","",6,[[]]],[11,"from","","",28,[[]]],[11,"into","","",28,[[]]],[11,"borrow","","",28,[[]]],[11,"borrow_mut","","",28,[[]]],[11,"try_from","","",28,[[],["result",4]]],[11,"try_into","","",28,[[],["result",4]]],[11,"type_id","","",28,[[],["typeid",3]]],[11,"vzip","","",28,[[]]],[11,"from","","",29,[[]]],[11,"into","","",29,[[]]],[11,"borrow","","",29,[[]]],[11,"borrow_mut","","",29,[[]]],[11,"try_from","","",29,[[],["result",4]]],[11,"try_into","","",29,[[],["result",4]]],[11,"type_id","","",29,[[],["typeid",3]]],[11,"vzip","","",29,[[]]],[11,"from","","",7,[[]]],[11,"into","","",7,[[]]],[11,"to_owned","","",7,[[]]],[11,"clone_into","","",7,[[]]],[11,"borrow","","",7,[[]]],[11,"borrow_mut","","",7,[[]]],[11,"try_from","","",7,[[],["result",4]]],[11,"try_into","","",7,[[],["result",4]]],[11,"type_id","","",7,[[],["typeid",3]]],[11,"vzip","","",7,[[]]],[11,"from","","",8,[[]]],[11,"into","","",8,[[]]],[11,"to_owned","","",8,[[]]],[11,"clone_into","","",8,[[]]],[11,"borrow","","",8,[[]]],[11,"borrow_mut","","",8,[[]]],[11,"try_from","","",8,[[],["result",4]]],[11,"try_into","","",8,[[],["result",4]]],[11,"type_id","","",8,[[],["typeid",3]]],[11,"vzip","","",8,[[]]],[11,"from","","",30,[[]]],[11,"into","","",30,[[]]],[11,"borrow","","",30,[[]]],[11,"borrow_mut","","",30,[[]]],[11,"try_from","","",30,[[],["result",4]]],[11,"try_into","","",30,[[],["result",4]]],[11,"type_id","","",30,[[],["typeid",3]]],[11,"vzip","","",30,[[]]],[11,"from","","",31,[[]]],[11,"into","","",31,[[]]],[11,"borrow","","",31,[[]]],[11,"borrow_mut","","",31,[[]]],[11,"try_from","","",31,[[],["result",4]]],[11,"try_into","","",31,[[],["result",4]]],[11,"type_id","","",31,[[],["typeid",3]]],[11,"vzip","","",31,[[]]],[11,"from","","",9,[[]]],[11,"into","","",9,[[]]],[11,"borrow","","",9,[[]]],[11,"borrow_mut","","",9,[[]]],[11,"try_from","","",9,[[],["result",4]]],[11,"try_into","","",9,[[],["result",4]]],[11,"type_id","","",9,[[],["typeid",3]]],[11,"vzip","","",9,[[]]],[11,"from","","",32,[[]]],[11,"into","","",32,[[]]],[11,"borrow","","",32,[[]]],[11,"borrow_mut","","",32,[[]]],[11,"try_from","","",32,[[],["result",4]]],[11,"try_into","","",32,[[],["result",4]]],[11,"type_id","","",32,[[],["typeid",3]]],[11,"vzip","","",32,[[]]],[11,"from","","",33,[[]]],[11,"into","","",33,[[]]],[11,"borrow","","",33,[[]]],[11,"borrow_mut","","",33,[[]]],[11,"try_from","","",33,[[],["result",4]]],[11,"try_into","","",33,[[],["result",4]]],[11,"type_id","","",33,[[],["typeid",3]]],[11,"vzip","","",33,[[]]],[11,"from","","",34,[[]]],[11,"into","","",34,[[]]],[11,"borrow","","",34,[[]]],[11,"borrow_mut","","",34,[[]]],[11,"try_from","","",34,[[],["result",4]]],[11,"try_into","","",34,[[],["result",4]]],[11,"type_id","","",34,[[],["typeid",3]]],[11,"vzip","","",34,[[]]],[11,"from","","",10,[[]]],[11,"into","","",10,[[]]],[11,"borrow","","",10,[[]]],[11,"borrow_mut","","",10,[[]]],[11,"try_from","","",10,[[],["result",4]]],[11,"try_into","","",10,[[],["result",4]]],[11,"type_id","","",10,[[],["typeid",3]]],[11,"vzip","","",10,[[]]],[11,"from","","",35,[[]]],[11,"into","","",35,[[]]],[11,"borrow","","",35,[[]]],[11,"borrow_mut","","",35,[[]]],[11,"try_from","","",35,[[],["result",4]]],[11,"try_into","","",35,[[],["result",4]]],[11,"type_id","","",35,[[],["typeid",3]]],[11,"vzip","","",35,[[]]],[11,"from","","",11,[[]]],[11,"into","","",11,[[]]],[11,"borrow","","",11,[[]]],[11,"borrow_mut","","",11,[[]]],[11,"try_from","","",11,[[],["result",4]]],[11,"try_into","","",11,[[],["result",4]]],[11,"type_id","","",11,[[],["typeid",3]]],[11,"vzip","","",11,[[]]],[11,"from","","",36,[[]]],[11,"into","","",36,[[]]],[11,"borrow","","",36,[[]]],[11,"borrow_mut","","",36,[[]]],[11,"try_from","","",36,[[],["result",4]]],[11,"try_into","","",36,[[],["result",4]]],[11,"type_id","","",36,[[],["typeid",3]]],[11,"vzip","","",36,[[]]],[11,"from","","",12,[[]]],[11,"into","","",12,[[]]],[11,"borrow","","",12,[[]]],[11,"borrow_mut","","",12,[[]]],[11,"try_from","","",12,[[],["result",4]]],[11,"try_into","","",12,[[],["result",4]]],[11,"type_id","","",12,[[],["typeid",3]]],[11,"vzip","","",12,[[]]],[11,"from","","",37,[[]]],[11,"into","","",37,[[]]],[11,"borrow","","",37,[[]]],[11,"borrow_mut","","",37,[[]]],[11,"try_from","","",37,[[],["result",4]]],[11,"try_into","","",37,[[],["result",4]]],[11,"type_id","","",37,[[],["typeid",3]]],[11,"vzip","","",37,[[]]],[11,"from","","",13,[[]]],[11,"into","","",13,[[]]],[11,"borrow","","",13,[[]]],[11,"borrow_mut","","",13,[[]]],[11,"try_from","","",13,[[],["result",4]]],[11,"try_into","","",13,[[],["result",4]]],[11,"type_id","","",13,[[],["typeid",3]]],[11,"vzip","","",13,[[]]],[11,"from","","",14,[[]]],[11,"into","","",14,[[]]],[11,"borrow","","",14,[[]]],[11,"borrow_mut","","",14,[[]]],[11,"try_from","","",14,[[],["result",4]]],[11,"try_into","","",14,[[],["result",4]]],[11,"type_id","","",14,[[],["typeid",3]]],[11,"vzip","","",14,[[]]],[11,"from","guard::api::v1::meta","",38,[[]]],[11,"into","","",38,[[]]],[11,"borrow","","",38,[[]]],[11,"borrow_mut","","",38,[[]]],[11,"try_from","","",38,[[],["result",4]]],[11,"try_into","","",38,[[],["result",4]]],[11,"type_id","","",38,[[],["typeid",3]]],[11,"vzip","","",38,[[]]],[11,"from","","",15,[[]]],[11,"into","","",15,[[]]],[11,"to_owned","","",15,[[]]],[11,"clone_into","","",15,[[]]],[11,"borrow","","",15,[[]]],[11,"borrow_mut","","",15,[[]]],[11,"try_from","","",15,[[],["result",4]]],[11,"try_into","","",15,[[],["result",4]]],[11,"type_id","","",15,[[],["typeid",3]]],[11,"vzip","","",15,[[]]],[11,"from","","",16,[[]]],[11,"into","","",16,[[]]],[11,"to_owned","","",16,[[]]],[11,"clone_into","","",16,[[]]],[11,"borrow","","",16,[[]]],[11,"borrow_mut","","",16,[[]]],[11,"try_from","","",16,[[],["result",4]]],[11,"try_into","","",16,[[],["result",4]]],[11,"type_id","","",16,[[],["typeid",3]]],[11,"vzip","","",16,[[]]],[11,"from","","",39,[[]]],[11,"into","","",39,[[]]],[11,"borrow","","",39,[[]]],[11,"borrow_mut","","",39,[[]]],[11,"try_from","","",39,[[],["result",4]]],[11,"try_into","","",39,[[],["result",4]]],[11,"type_id","","",39,[[],["typeid",3]]],[11,"vzip","","",39,[[]]],[11,"from","guard::settings","",17,[[]]],[11,"into","","",17,[[]]],[11,"to_owned","","",17,[[]]],[11,"clone_into","","",17,[[]]],[11,"borrow","","",17,[[]]],[11,"borrow_mut","","",17,[[]]],[11,"try_from","","",17,[[],["result",4]]],[11,"try_into","","",17,[[],["result",4]]],[11,"type_id","","",17,[[],["typeid",3]]],[11,"vzip","","",17,[[]]],[11,"from","","",18,[[]]],[11,"into","","",18,[[]]],[11,"to_owned","","",18,[[]]],[11,"clone_into","","",18,[[]]],[11,"borrow","","",18,[[]]],[11,"borrow_mut","","",18,[[]]],[11,"try_from","","",18,[[],["result",4]]],[11,"try_into","","",18,[[],["result",4]]],[11,"type_id","","",18,[[],["typeid",3]]],[11,"vzip","","",18,[[]]],[11,"from","","",19,[[]]],[11,"into","","",19,[[]]],[11,"to_owned","","",19,[[]]],[11,"clone_into","","",19,[[]]],[11,"borrow","","",19,[[]]],[11,"borrow_mut","","",19,[[]]],[11,"try_from","","",19,[[],["result",4]]],[11,"try_into","","",19,[[],["result",4]]],[11,"type_id","","",19,[[],["typeid",3]]],[11,"vzip","","",19,[[]]],[11,"from","","",20,[[]]],[11,"into","","",20,[[]]],[11,"to_owned","","",20,[[]]],[11,"clone_into","","",20,[[]]],[11,"borrow","","",20,[[]]],[11,"borrow_mut","","",20,[[]]],[11,"try_from","","",20,[[],["result",4]]],[11,"try_into","","",20,[[],["result",4]]],[11,"type_id","","",20,[[],["typeid",3]]],[11,"vzip","","",20,[[]]],[11,"from","","",21,[[]]],[11,"into","","",21,[[]]],[11,"to_owned","","",21,[[]]],[11,"clone_into","","",21,[[]]],[11,"borrow","","",21,[[]]],[11,"borrow_mut","","",21,[[]]],[11,"try_from","","",21,[[],["result",4]]],[11,"try_into","","",21,[[],["result",4]]],[11,"type_id","","",21,[[],["typeid",3]]],[11,"vzip","","",21,[[]]],[11,"from","guard","",22,[[]]],[11,"into","","",22,[[]]],[11,"borrow","","",22,[[]]],[11,"borrow_mut","","",22,[[]]],[11,"try_from","","",22,[[],["result",4]]],[11,"try_into","","",22,[[],["result",4]]],[11,"type_id","","",22,[[],["typeid",3]]],[11,"vzip","","",22,[[]]],[11,"from","","",23,[[]]],[11,"into","","",23,[[]]],[11,"borrow","","",23,[[]]],[11,"borrow_mut","","",23,[[]]],[11,"try_from","","",23,[[],["result",4]]],[11,"try_into","","",23,[[],["result",4]]],[11,"type_id","","",23,[[],["typeid",3]]],[11,"vzip","","",23,[[]]],[11,"from","guard::errors","",1,[[["credserror",4]],["serviceerror",4]]],[11,"from","","",1,[[["validationerrors",3]],["serviceerror",4]]],[11,"from","","",1,[[["parseerror",4]],["serviceerror",4]]],[11,"from","","",1,[[["captchaerror",4]],["serviceerror",4]]],[11,"from","","",1,[[["error",4]]]],[11,"clone","guard::data","",0,[[],["data",3]]],[11,"clone","guard::errors","",1,[[],["serviceerror",4]]],[11,"clone","guard::api::v1::auth","",3,[[],["register",3]]],[11,"clone","","",4,[[],["login",3]]],[11,"clone","guard::api::v1::mcaptcha","",6,[[],["domain",3]]],[11,"clone","","",7,[[],["createtoken",3]]],[11,"clone","","",8,[[],["tokenkeypair",3]]],[11,"clone","guard::api::v1::meta","",15,[[],["health",3]]],[11,"clone","","",16,[[],["healthbuilder",3]]],[11,"clone","guard::settings","",17,[[],["server",3]]],[11,"clone","","",18,[[],["captcha",3]]],[11,"clone","","",19,[[],["databasebuilder",3]]],[11,"clone","","",20,[[],["database",3]]],[11,"clone","","",21,[[],["settings",3]]],[11,"default","guard::api::v1::meta","",16,[[],["healthbuilder",3]]],[11,"eq","guard::errors","",1,[[["serviceerror",4]]]],[11,"ne","","",1,[[["serviceerror",4]]]],[11,"deref","guard","",22,[[],["settings",3]]],[11,"deref","","",23,[[],["string",3]]],[11,"fmt","guard::errors","",1,[[["formatter",3]],["result",6]]],[11,"fmt","guard::api::v1::auth","",3,[[["formatter",3]],["result",6]]],[11,"fmt","","",4,[[["formatter",3]],["result",6]]],[11,"fmt","guard::api::v1::mcaptcha","",6,[[["formatter",3]],["result",6]]],[11,"fmt","","",7,[[["formatter",3]],["result",6]]],[11,"fmt","","",8,[[["formatter",3]],["result",6]]],[11,"fmt","guard::api::v1::meta","",15,[[["formatter",3]],["result",6]]],[11,"fmt","guard::settings","",17,[[["formatter",3]],["result",6]]],[11,"fmt","","",18,[[["formatter",3]],["result",6]]],[11,"fmt","","",19,[[["formatter",3]],["result",6]]],[11,"fmt","","",20,[[["formatter",3]],["result",6]]],[11,"fmt","","",21,[[["formatter",3]],["result",6]]],[11,"fmt","guard::errors","",1,[[["formatter",3]],["result",6]]],[11,"source","","",1,[[],[["error",8],["option",4]]]],[11,"deserialize","","",2,[[],["result",4]]],[11,"deserialize","guard::api::v1::auth","",3,[[],["result",4]]],[11,"deserialize","","",4,[[],["result",4]]],[11,"deserialize","guard::api::v1::mcaptcha","",6,[[],["result",4]]],[11,"deserialize","","",7,[[],["result",4]]],[11,"deserialize","","",8,[[],["result",4]]],[11,"deserialize","","",9,[[],["result",4]]],[11,"deserialize","","",10,[[],["result",4]]],[11,"deserialize","","",11,[[],["result",4]]],[11,"deserialize","","",12,[[],["result",4]]],[11,"deserialize","","",13,[[],["result",4]]],[11,"deserialize","","",14,[[],["result",4]]],[11,"deserialize","guard::api::v1::meta","",15,[[],["result",4]]],[11,"deserialize","guard::settings","",17,[[],["result",4]]],[11,"deserialize","","",18,[[],["result",4]]],[11,"deserialize","","",19,[[],["result",4]]],[11,"deserialize","","",20,[[],["result",4]]],[11,"deserialize","","",21,[[],["result",4]]],[11,"serialize","guard::errors","",2,[[],["result",4]]],[11,"serialize","guard::api::v1::auth","",3,[[],["result",4]]],[11,"serialize","","",4,[[],["result",4]]],[11,"serialize","guard::api::v1::mcaptcha","",6,[[],["result",4]]],[11,"serialize","","",7,[[],["result",4]]],[11,"serialize","","",8,[[],["result",4]]],[11,"serialize","","",9,[[],["result",4]]],[11,"serialize","","",10,[[],["result",4]]],[11,"serialize","","",11,[[],["result",4]]],[11,"serialize","","",12,[[],["result",4]]],[11,"serialize","","",13,[[],["result",4]]],[11,"serialize","","",14,[[],["result",4]]],[11,"serialize","guard::api::v1::meta","",15,[[],["result",4]]],[11,"register","guard::api::v1::auth","",24,[[["appservice",3]]]],[11,"register","","",25,[[["appservice",3]]]],[11,"register","","",26,[[["appservice",3]]]],[11,"register","","",27,[[["appservice",3]]]],[11,"register","guard::api::v1::mcaptcha","",28,[[["appservice",3]]]],[11,"register","","",29,[[["appservice",3]]]],[11,"register","","",30,[[["appservice",3]]]],[11,"register","","",31,[[["appservice",3]]]],[11,"register","","",32,[[["appservice",3]]]],[11,"register","","",33,[[["appservice",3]]]],[11,"register","","",34,[[["appservice",3]]]],[11,"register","","",35,[[["appservice",3]]]],[11,"register","","",36,[[["appservice",3]]]],[11,"register","","",37,[[["appservice",3]]]],[11,"register","guard::api::v1::meta","",38,[[["appservice",3]]]],[11,"register","","",39,[[["appservice",3]]]],[11,"error_response","guard::errors","",1,[[],["httpresponse",3]]],[11,"status_code","","",1,[[],["statuscode",3]]],[11,"initialize","guard","",22,[[]]],[11,"initialize","","",23,[[]]]],"p":[[3,"Data"],[4,"ServiceError"],[3,"ErrorToResponse"],[3,"Register"],[3,"Login"],[3,"Password"],[3,"Domain"],[3,"CreateToken"],[3,"TokenKeyPair"],[3,"AddLevels"],[3,"GetLevels"],[3,"Duration"],[3,"GetDuration"],[3,"Levels"],[3,"I32Levels"],[3,"Health"],[3,"HealthBuilder"],[3,"Server"],[3,"Captcha"],[3,"DatabaseBuilder"],[3,"Database"],[3,"Settings"],[3,"SETTINGS"],[3,"GIT_COMMIT_HASH"],[3,"signup"],[3,"signin"],[3,"signout"],[3,"delete_account"],[3,"add_domain"],[3,"delete_domain"],[3,"add_mcaptcha"],[3,"delete_mcaptcha"],[3,"add_levels"],[3,"update_levels"],[3,"delete_levels"],[3,"get_levels"],[3,"update_duration"],[3,"get_duration"],[3,"build_details"],[3,"health"]]},\ +"guard":{"doc":"","i":[[0,"data","guard","",null,null],[3,"Data","guard::data","",null,null],[12,"db","","",0,null],[12,"creds","","",0,null],[12,"captcha","","",0,null],[11,"new","","",0,[[]]],[0,"errors","guard","",null,null],[4,"ServiceError","guard::errors","",null,null],[13,"InternalServerError","","",1,null],[13,"NotAnEmail","","",1,null],[13,"NotAUrl","","",1,null],[13,"WrongPassword","","",1,null],[13,"UsernameNotFound","","",1,null],[13,"AuthorizationRequired","","",1,null],[13,"ProfainityError","","when the value passed contains profainity",1,null],[13,"BlacklistError","","when the value passed contains blacklisted words see …",1,null],[13,"UsernameCaseMappedError","","when the value passed contains characters not present in …",1,null],[13,"PasswordTooShort","","",1,null],[13,"PasswordTooLong","","",1,null],[13,"UsernameTaken","","when the a username is already taken",1,null],[13,"TokenNameTaken","","when the a token name is already taken",1,null],[13,"HostnameTaken","","when the a host name is already taken",1,null],[13,"CaptchaError","","",1,null],[3,"ErrorToResponse","","",null,null],[12,"error","","",2,null],[5,"dup_error","","",null,[[["serviceerror",4],["error",4]],["serviceerror",4]]],[6,"ServiceResult","","",null,null],[0,"api","guard","",null,null],[0,"v1","guard::api","",null,null],[0,"auth","guard::api::v1","",null,null],[3,"Register","guard::api::v1::auth","",null,null],[12,"username","","",3,null],[12,"password","","",3,null],[12,"email","","",3,null],[3,"Login","","",null,null],[12,"username","","",4,null],[12,"password","","",4,null],[3,"Password","","",null,null],[12,"password","","",5,null],[3,"signup","","",null,null],[3,"signin","","",null,null],[3,"signout","","",null,null],[5,"is_authenticated","","Check if user is authenticated",null,[[["identity",3]],[["serviceerror",4],["result",4]]]],[3,"delete_account","","",null,null],[0,"mcaptcha","guard::api::v1","",null,null],[0,"domains","guard::api::v1::mcaptcha","",null,null],[3,"Domain","guard::api::v1::mcaptcha::domains","",null,null],[12,"name","","",6,null],[3,"add_domain","","",null,null],[3,"delete_domain","","",null,null],[0,"duration","guard::api::v1::mcaptcha","",null,null],[3,"UpdateDuration","guard::api::v1::mcaptcha::duration","",null,null],[12,"token_name","","",7,null],[12,"duration","","",7,null],[3,"update_duration","","",null,null],[3,"GetDurationResp","","",null,null],[12,"duration","","",8,null],[3,"GetDuration","","",null,null],[12,"token","","",9,null],[3,"get_duration","","",null,null],[0,"levels","guard::api::v1::mcaptcha","",null,null],[3,"AddLevels","guard::api::v1::mcaptcha::levels","",null,null],[12,"levels","","",10,null],[12,"name","","",10,null],[3,"add_levels","","",null,null],[3,"update_levels","","",null,null],[3,"delete_levels","","",null,null],[3,"GetLevels","","",null,null],[12,"token","","",11,null],[3,"get_levels","","",null,null],[3,"Levels","","",null,null],[12,"levels","","",12,null],[3,"I32Levels","","",null,null],[12,"difficulty_factor","","",13,null],[12,"visitor_threshold","","",13,null],[5,"get_levels_util","","",null,[[["data",3]]]],[0,"mcaptcha","guard::api::v1::mcaptcha","",null,null],[3,"MCaptchaID","guard::api::v1::mcaptcha::mcaptcha","",null,null],[12,"name","","",14,null],[12,"domain","","",14,null],[3,"MCaptchaDetails","","",null,null],[12,"name","","",15,null],[12,"key","","",15,null],[3,"add_mcaptcha","","",null,null],[3,"delete_mcaptcha","","",null,null],[5,"get_random","","",null,[[],["string",3]]],[0,"meta","guard::api::v1","",null,null],[3,"build_details","guard::api::v1::meta","",null,null],[3,"Health","","Health check return datatype",null,null],[12,"db","","",16,null],[3,"HealthBuilder","","Builder for Health.",null,null],[12,"db","","",17,null],[11,"db","","",17,[[]]],[11,"build","","Builds a new Health.",17,[[],[["health",3],["string",3],["result",4]]]],[3,"health","","",null,null],[5,"services","guard::api::v1","",null,[[["serviceconfig",3]]]],[0,"settings","guard","",null,null],[3,"Server","guard::settings","",null,null],[12,"allow_registration","","",18,null],[12,"port","","",18,null],[12,"domain","","",18,null],[12,"cookie_secret","","",18,null],[12,"ip","","",18,null],[3,"Captcha","","",null,null],[12,"salt","","",19,null],[12,"gc","","",19,null],[11,"get_ip","","",18,[[],["string",3]]],[3,"DatabaseBuilder","","",null,null],[12,"port","","",20,null],[12,"hostname","","",20,null],[12,"username","","",20,null],[12,"password","","",20,null],[12,"name","","",20,null],[12,"url","","",20,null],[11,"extract_database_url","","",20,[[["url",3]]]],[3,"Database","","",null,null],[12,"url","","",21,null],[12,"pool","","",21,null],[3,"Settings","","",null,null],[12,"debug","","",22,null],[12,"database","","",22,null],[12,"server","","",22,null],[12,"pow","","",22,null],[11,"new","","",22,[[],[["result",4],["configerror",4]]]],[5,"set_from_database_url","","",null,[[["config",3],["databasebuilder",3]]]],[5,"set_database_url","","",null,[[["config",3]]]],[3,"Data","guard","",null,null],[12,"db","","",0,null],[12,"creds","","",0,null],[12,"captcha","","",0,null],[3,"Settings","","",null,null],[12,"debug","","",22,null],[12,"database","","",22,null],[12,"server","","",22,null],[12,"pow","","",22,null],[3,"SETTINGS","","",null,null],[12,"__private_field","","",23,null],[3,"GIT_COMMIT_HASH","","",null,null],[12,"__private_field","","",24,null],[7,"VERSION","","",null,null],[7,"PKG_NAME","","",null,null],[7,"PKG_DESCRIPTION","","",null,null],[7,"PKG_HOMEPAGE","","",null,null],[5,"main","","",null,[[],["result",6]]],[5,"get_json_err","","",null,[[],["jsonconfig",3]]],[5,"get_identity_service","","",null,[[],[["identityservice",3],["cookieidentitypolicy",3]]]],[11,"from","guard::data","",0,[[]]],[11,"into","","",0,[[]]],[11,"to_owned","","",0,[[]]],[11,"clone_into","","",0,[[]]],[11,"borrow","","",0,[[]]],[11,"borrow_mut","","",0,[[]]],[11,"try_from","","",0,[[],["result",4]]],[11,"try_into","","",0,[[],["result",4]]],[11,"type_id","","",0,[[],["typeid",3]]],[11,"vzip","","",0,[[]]],[11,"from","guard::errors","",1,[[]]],[11,"into","","",1,[[]]],[11,"to_owned","","",1,[[]]],[11,"clone_into","","",1,[[]]],[11,"to_string","","",1,[[],["string",3]]],[11,"borrow","","",1,[[]]],[11,"borrow_mut","","",1,[[]]],[11,"try_from","","",1,[[],["result",4]]],[11,"try_into","","",1,[[],["result",4]]],[11,"type_id","","",1,[[],["typeid",3]]],[11,"vzip","","",1,[[]]],[11,"from","","",2,[[]]],[11,"into","","",2,[[]]],[11,"borrow","","",2,[[]]],[11,"borrow_mut","","",2,[[]]],[11,"try_from","","",2,[[],["result",4]]],[11,"try_into","","",2,[[],["result",4]]],[11,"type_id","","",2,[[],["typeid",3]]],[11,"vzip","","",2,[[]]],[11,"from","guard::api::v1::auth","",3,[[]]],[11,"into","","",3,[[]]],[11,"to_owned","","",3,[[]]],[11,"clone_into","","",3,[[]]],[11,"borrow","","",3,[[]]],[11,"borrow_mut","","",3,[[]]],[11,"try_from","","",3,[[],["result",4]]],[11,"try_into","","",3,[[],["result",4]]],[11,"type_id","","",3,[[],["typeid",3]]],[11,"vzip","","",3,[[]]],[11,"from","","",4,[[]]],[11,"into","","",4,[[]]],[11,"to_owned","","",4,[[]]],[11,"clone_into","","",4,[[]]],[11,"borrow","","",4,[[]]],[11,"borrow_mut","","",4,[[]]],[11,"try_from","","",4,[[],["result",4]]],[11,"try_into","","",4,[[],["result",4]]],[11,"type_id","","",4,[[],["typeid",3]]],[11,"vzip","","",4,[[]]],[11,"from","","",5,[[]]],[11,"into","","",5,[[]]],[11,"borrow","","",5,[[]]],[11,"borrow_mut","","",5,[[]]],[11,"try_from","","",5,[[],["result",4]]],[11,"try_into","","",5,[[],["result",4]]],[11,"type_id","","",5,[[],["typeid",3]]],[11,"vzip","","",5,[[]]],[11,"from","","",25,[[]]],[11,"into","","",25,[[]]],[11,"borrow","","",25,[[]]],[11,"borrow_mut","","",25,[[]]],[11,"try_from","","",25,[[],["result",4]]],[11,"try_into","","",25,[[],["result",4]]],[11,"type_id","","",25,[[],["typeid",3]]],[11,"vzip","","",25,[[]]],[11,"from","","",26,[[]]],[11,"into","","",26,[[]]],[11,"borrow","","",26,[[]]],[11,"borrow_mut","","",26,[[]]],[11,"try_from","","",26,[[],["result",4]]],[11,"try_into","","",26,[[],["result",4]]],[11,"type_id","","",26,[[],["typeid",3]]],[11,"vzip","","",26,[[]]],[11,"from","","",27,[[]]],[11,"into","","",27,[[]]],[11,"borrow","","",27,[[]]],[11,"borrow_mut","","",27,[[]]],[11,"try_from","","",27,[[],["result",4]]],[11,"try_into","","",27,[[],["result",4]]],[11,"type_id","","",27,[[],["typeid",3]]],[11,"vzip","","",27,[[]]],[11,"from","","",28,[[]]],[11,"into","","",28,[[]]],[11,"borrow","","",28,[[]]],[11,"borrow_mut","","",28,[[]]],[11,"try_from","","",28,[[],["result",4]]],[11,"try_into","","",28,[[],["result",4]]],[11,"type_id","","",28,[[],["typeid",3]]],[11,"vzip","","",28,[[]]],[11,"from","guard::api::v1::mcaptcha::domains","",6,[[]]],[11,"into","","",6,[[]]],[11,"to_owned","","",6,[[]]],[11,"clone_into","","",6,[[]]],[11,"borrow","","",6,[[]]],[11,"borrow_mut","","",6,[[]]],[11,"try_from","","",6,[[],["result",4]]],[11,"try_into","","",6,[[],["result",4]]],[11,"type_id","","",6,[[],["typeid",3]]],[11,"vzip","","",6,[[]]],[11,"from","","",29,[[]]],[11,"into","","",29,[[]]],[11,"borrow","","",29,[[]]],[11,"borrow_mut","","",29,[[]]],[11,"try_from","","",29,[[],["result",4]]],[11,"try_into","","",29,[[],["result",4]]],[11,"type_id","","",29,[[],["typeid",3]]],[11,"vzip","","",29,[[]]],[11,"from","","",30,[[]]],[11,"into","","",30,[[]]],[11,"borrow","","",30,[[]]],[11,"borrow_mut","","",30,[[]]],[11,"try_from","","",30,[[],["result",4]]],[11,"try_into","","",30,[[],["result",4]]],[11,"type_id","","",30,[[],["typeid",3]]],[11,"vzip","","",30,[[]]],[11,"from","guard::api::v1::mcaptcha::duration","",7,[[]]],[11,"into","","",7,[[]]],[11,"borrow","","",7,[[]]],[11,"borrow_mut","","",7,[[]]],[11,"try_from","","",7,[[],["result",4]]],[11,"try_into","","",7,[[],["result",4]]],[11,"type_id","","",7,[[],["typeid",3]]],[11,"vzip","","",7,[[]]],[11,"from","","",31,[[]]],[11,"into","","",31,[[]]],[11,"borrow","","",31,[[]]],[11,"borrow_mut","","",31,[[]]],[11,"try_from","","",31,[[],["result",4]]],[11,"try_into","","",31,[[],["result",4]]],[11,"type_id","","",31,[[],["typeid",3]]],[11,"vzip","","",31,[[]]],[11,"from","","",8,[[]]],[11,"into","","",8,[[]]],[11,"borrow","","",8,[[]]],[11,"borrow_mut","","",8,[[]]],[11,"try_from","","",8,[[],["result",4]]],[11,"try_into","","",8,[[],["result",4]]],[11,"type_id","","",8,[[],["typeid",3]]],[11,"vzip","","",8,[[]]],[11,"from","","",9,[[]]],[11,"into","","",9,[[]]],[11,"borrow","","",9,[[]]],[11,"borrow_mut","","",9,[[]]],[11,"try_from","","",9,[[],["result",4]]],[11,"try_into","","",9,[[],["result",4]]],[11,"type_id","","",9,[[],["typeid",3]]],[11,"vzip","","",9,[[]]],[11,"from","","",32,[[]]],[11,"into","","",32,[[]]],[11,"borrow","","",32,[[]]],[11,"borrow_mut","","",32,[[]]],[11,"try_from","","",32,[[],["result",4]]],[11,"try_into","","",32,[[],["result",4]]],[11,"type_id","","",32,[[],["typeid",3]]],[11,"vzip","","",32,[[]]],[11,"from","guard::api::v1::mcaptcha::levels","",10,[[]]],[11,"into","","",10,[[]]],[11,"borrow","","",10,[[]]],[11,"borrow_mut","","",10,[[]]],[11,"try_from","","",10,[[],["result",4]]],[11,"try_into","","",10,[[],["result",4]]],[11,"type_id","","",10,[[],["typeid",3]]],[11,"vzip","","",10,[[]]],[11,"from","","",33,[[]]],[11,"into","","",33,[[]]],[11,"borrow","","",33,[[]]],[11,"borrow_mut","","",33,[[]]],[11,"try_from","","",33,[[],["result",4]]],[11,"try_into","","",33,[[],["result",4]]],[11,"type_id","","",33,[[],["typeid",3]]],[11,"vzip","","",33,[[]]],[11,"from","","",34,[[]]],[11,"into","","",34,[[]]],[11,"borrow","","",34,[[]]],[11,"borrow_mut","","",34,[[]]],[11,"try_from","","",34,[[],["result",4]]],[11,"try_into","","",34,[[],["result",4]]],[11,"type_id","","",34,[[],["typeid",3]]],[11,"vzip","","",34,[[]]],[11,"from","","",35,[[]]],[11,"into","","",35,[[]]],[11,"borrow","","",35,[[]]],[11,"borrow_mut","","",35,[[]]],[11,"try_from","","",35,[[],["result",4]]],[11,"try_into","","",35,[[],["result",4]]],[11,"type_id","","",35,[[],["typeid",3]]],[11,"vzip","","",35,[[]]],[11,"from","","",11,[[]]],[11,"into","","",11,[[]]],[11,"borrow","","",11,[[]]],[11,"borrow_mut","","",11,[[]]],[11,"try_from","","",11,[[],["result",4]]],[11,"try_into","","",11,[[],["result",4]]],[11,"type_id","","",11,[[],["typeid",3]]],[11,"vzip","","",11,[[]]],[11,"from","","",36,[[]]],[11,"into","","",36,[[]]],[11,"borrow","","",36,[[]]],[11,"borrow_mut","","",36,[[]]],[11,"try_from","","",36,[[],["result",4]]],[11,"try_into","","",36,[[],["result",4]]],[11,"type_id","","",36,[[],["typeid",3]]],[11,"vzip","","",36,[[]]],[11,"from","","",12,[[]]],[11,"into","","",12,[[]]],[11,"borrow","","",12,[[]]],[11,"borrow_mut","","",12,[[]]],[11,"try_from","","",12,[[],["result",4]]],[11,"try_into","","",12,[[],["result",4]]],[11,"type_id","","",12,[[],["typeid",3]]],[11,"vzip","","",12,[[]]],[11,"from","","",13,[[]]],[11,"into","","",13,[[]]],[11,"borrow","","",13,[[]]],[11,"borrow_mut","","",13,[[]]],[11,"try_from","","",13,[[],["result",4]]],[11,"try_into","","",13,[[],["result",4]]],[11,"type_id","","",13,[[],["typeid",3]]],[11,"vzip","","",13,[[]]],[11,"from","guard::api::v1::mcaptcha::mcaptcha","",14,[[]]],[11,"into","","",14,[[]]],[11,"to_owned","","",14,[[]]],[11,"clone_into","","",14,[[]]],[11,"borrow","","",14,[[]]],[11,"borrow_mut","","",14,[[]]],[11,"try_from","","",14,[[],["result",4]]],[11,"try_into","","",14,[[],["result",4]]],[11,"type_id","","",14,[[],["typeid",3]]],[11,"vzip","","",14,[[]]],[11,"from","","",15,[[]]],[11,"into","","",15,[[]]],[11,"to_owned","","",15,[[]]],[11,"clone_into","","",15,[[]]],[11,"borrow","","",15,[[]]],[11,"borrow_mut","","",15,[[]]],[11,"try_from","","",15,[[],["result",4]]],[11,"try_into","","",15,[[],["result",4]]],[11,"type_id","","",15,[[],["typeid",3]]],[11,"vzip","","",15,[[]]],[11,"from","","",37,[[]]],[11,"into","","",37,[[]]],[11,"borrow","","",37,[[]]],[11,"borrow_mut","","",37,[[]]],[11,"try_from","","",37,[[],["result",4]]],[11,"try_into","","",37,[[],["result",4]]],[11,"type_id","","",37,[[],["typeid",3]]],[11,"vzip","","",37,[[]]],[11,"from","","",38,[[]]],[11,"into","","",38,[[]]],[11,"borrow","","",38,[[]]],[11,"borrow_mut","","",38,[[]]],[11,"try_from","","",38,[[],["result",4]]],[11,"try_into","","",38,[[],["result",4]]],[11,"type_id","","",38,[[],["typeid",3]]],[11,"vzip","","",38,[[]]],[11,"from","guard::api::v1::meta","",39,[[]]],[11,"into","","",39,[[]]],[11,"borrow","","",39,[[]]],[11,"borrow_mut","","",39,[[]]],[11,"try_from","","",39,[[],["result",4]]],[11,"try_into","","",39,[[],["result",4]]],[11,"type_id","","",39,[[],["typeid",3]]],[11,"vzip","","",39,[[]]],[11,"from","","",16,[[]]],[11,"into","","",16,[[]]],[11,"to_owned","","",16,[[]]],[11,"clone_into","","",16,[[]]],[11,"borrow","","",16,[[]]],[11,"borrow_mut","","",16,[[]]],[11,"try_from","","",16,[[],["result",4]]],[11,"try_into","","",16,[[],["result",4]]],[11,"type_id","","",16,[[],["typeid",3]]],[11,"vzip","","",16,[[]]],[11,"from","","",17,[[]]],[11,"into","","",17,[[]]],[11,"to_owned","","",17,[[]]],[11,"clone_into","","",17,[[]]],[11,"borrow","","",17,[[]]],[11,"borrow_mut","","",17,[[]]],[11,"try_from","","",17,[[],["result",4]]],[11,"try_into","","",17,[[],["result",4]]],[11,"type_id","","",17,[[],["typeid",3]]],[11,"vzip","","",17,[[]]],[11,"from","","",40,[[]]],[11,"into","","",40,[[]]],[11,"borrow","","",40,[[]]],[11,"borrow_mut","","",40,[[]]],[11,"try_from","","",40,[[],["result",4]]],[11,"try_into","","",40,[[],["result",4]]],[11,"type_id","","",40,[[],["typeid",3]]],[11,"vzip","","",40,[[]]],[11,"from","guard::settings","",18,[[]]],[11,"into","","",18,[[]]],[11,"to_owned","","",18,[[]]],[11,"clone_into","","",18,[[]]],[11,"borrow","","",18,[[]]],[11,"borrow_mut","","",18,[[]]],[11,"try_from","","",18,[[],["result",4]]],[11,"try_into","","",18,[[],["result",4]]],[11,"type_id","","",18,[[],["typeid",3]]],[11,"vzip","","",18,[[]]],[11,"from","","",19,[[]]],[11,"into","","",19,[[]]],[11,"to_owned","","",19,[[]]],[11,"clone_into","","",19,[[]]],[11,"borrow","","",19,[[]]],[11,"borrow_mut","","",19,[[]]],[11,"try_from","","",19,[[],["result",4]]],[11,"try_into","","",19,[[],["result",4]]],[11,"type_id","","",19,[[],["typeid",3]]],[11,"vzip","","",19,[[]]],[11,"from","","",20,[[]]],[11,"into","","",20,[[]]],[11,"to_owned","","",20,[[]]],[11,"clone_into","","",20,[[]]],[11,"borrow","","",20,[[]]],[11,"borrow_mut","","",20,[[]]],[11,"try_from","","",20,[[],["result",4]]],[11,"try_into","","",20,[[],["result",4]]],[11,"type_id","","",20,[[],["typeid",3]]],[11,"vzip","","",20,[[]]],[11,"from","","",21,[[]]],[11,"into","","",21,[[]]],[11,"to_owned","","",21,[[]]],[11,"clone_into","","",21,[[]]],[11,"borrow","","",21,[[]]],[11,"borrow_mut","","",21,[[]]],[11,"try_from","","",21,[[],["result",4]]],[11,"try_into","","",21,[[],["result",4]]],[11,"type_id","","",21,[[],["typeid",3]]],[11,"vzip","","",21,[[]]],[11,"from","","",22,[[]]],[11,"into","","",22,[[]]],[11,"to_owned","","",22,[[]]],[11,"clone_into","","",22,[[]]],[11,"borrow","","",22,[[]]],[11,"borrow_mut","","",22,[[]]],[11,"try_from","","",22,[[],["result",4]]],[11,"try_into","","",22,[[],["result",4]]],[11,"type_id","","",22,[[],["typeid",3]]],[11,"vzip","","",22,[[]]],[11,"from","guard","",23,[[]]],[11,"into","","",23,[[]]],[11,"borrow","","",23,[[]]],[11,"borrow_mut","","",23,[[]]],[11,"try_from","","",23,[[],["result",4]]],[11,"try_into","","",23,[[],["result",4]]],[11,"type_id","","",23,[[],["typeid",3]]],[11,"vzip","","",23,[[]]],[11,"from","","",24,[[]]],[11,"into","","",24,[[]]],[11,"borrow","","",24,[[]]],[11,"borrow_mut","","",24,[[]]],[11,"try_from","","",24,[[],["result",4]]],[11,"try_into","","",24,[[],["result",4]]],[11,"type_id","","",24,[[],["typeid",3]]],[11,"vzip","","",24,[[]]],[11,"from","guard::errors","",1,[[["credserror",4]],["serviceerror",4]]],[11,"from","","",1,[[["validationerrors",3]],["serviceerror",4]]],[11,"from","","",1,[[["parseerror",4]],["serviceerror",4]]],[11,"from","","",1,[[["captchaerror",4]],["serviceerror",4]]],[11,"from","","",1,[[["error",4]]]],[11,"clone","guard::data","",0,[[],["data",3]]],[11,"clone","guard::errors","",1,[[],["serviceerror",4]]],[11,"clone","guard::api::v1::auth","",3,[[],["register",3]]],[11,"clone","","",4,[[],["login",3]]],[11,"clone","guard::api::v1::mcaptcha::domains","",6,[[],["domain",3]]],[11,"clone","guard::api::v1::mcaptcha::mcaptcha","",14,[[],["mcaptchaid",3]]],[11,"clone","","",15,[[],["mcaptchadetails",3]]],[11,"clone","guard::api::v1::meta","",16,[[],["health",3]]],[11,"clone","","",17,[[],["healthbuilder",3]]],[11,"clone","guard::settings","",18,[[],["server",3]]],[11,"clone","","",19,[[],["captcha",3]]],[11,"clone","","",20,[[],["databasebuilder",3]]],[11,"clone","","",21,[[],["database",3]]],[11,"clone","","",22,[[],["settings",3]]],[11,"default","guard::api::v1::meta","",17,[[],["healthbuilder",3]]],[11,"eq","guard::errors","",1,[[["serviceerror",4]]]],[11,"ne","","",1,[[["serviceerror",4]]]],[11,"deref","guard","",23,[[],["settings",3]]],[11,"deref","","",24,[[],["string",3]]],[11,"fmt","guard::errors","",1,[[["formatter",3]],["result",6]]],[11,"fmt","guard::api::v1::auth","",3,[[["formatter",3]],["result",6]]],[11,"fmt","","",4,[[["formatter",3]],["result",6]]],[11,"fmt","guard::api::v1::mcaptcha::domains","",6,[[["formatter",3]],["result",6]]],[11,"fmt","guard::api::v1::mcaptcha::mcaptcha","",14,[[["formatter",3]],["result",6]]],[11,"fmt","","",15,[[["formatter",3]],["result",6]]],[11,"fmt","guard::api::v1::meta","",16,[[["formatter",3]],["result",6]]],[11,"fmt","guard::settings","",18,[[["formatter",3]],["result",6]]],[11,"fmt","","",19,[[["formatter",3]],["result",6]]],[11,"fmt","","",20,[[["formatter",3]],["result",6]]],[11,"fmt","","",21,[[["formatter",3]],["result",6]]],[11,"fmt","","",22,[[["formatter",3]],["result",6]]],[11,"fmt","guard::errors","",1,[[["formatter",3]],["result",6]]],[11,"source","","",1,[[],[["error",8],["option",4]]]],[11,"deserialize","","",2,[[],["result",4]]],[11,"deserialize","guard::api::v1::auth","",3,[[],["result",4]]],[11,"deserialize","","",4,[[],["result",4]]],[11,"deserialize","guard::api::v1::mcaptcha::domains","",6,[[],["result",4]]],[11,"deserialize","guard::api::v1::mcaptcha::duration","",7,[[],["result",4]]],[11,"deserialize","","",8,[[],["result",4]]],[11,"deserialize","","",9,[[],["result",4]]],[11,"deserialize","guard::api::v1::mcaptcha::levels","",10,[[],["result",4]]],[11,"deserialize","","",11,[[],["result",4]]],[11,"deserialize","","",12,[[],["result",4]]],[11,"deserialize","","",13,[[],["result",4]]],[11,"deserialize","guard::api::v1::mcaptcha::mcaptcha","",14,[[],["result",4]]],[11,"deserialize","","",15,[[],["result",4]]],[11,"deserialize","guard::api::v1::meta","",16,[[],["result",4]]],[11,"deserialize","guard::settings","",18,[[],["result",4]]],[11,"deserialize","","",19,[[],["result",4]]],[11,"deserialize","","",20,[[],["result",4]]],[11,"deserialize","","",21,[[],["result",4]]],[11,"deserialize","","",22,[[],["result",4]]],[11,"serialize","guard::errors","",2,[[],["result",4]]],[11,"serialize","guard::api::v1::auth","",3,[[],["result",4]]],[11,"serialize","","",4,[[],["result",4]]],[11,"serialize","guard::api::v1::mcaptcha::domains","",6,[[],["result",4]]],[11,"serialize","guard::api::v1::mcaptcha::duration","",7,[[],["result",4]]],[11,"serialize","","",8,[[],["result",4]]],[11,"serialize","","",9,[[],["result",4]]],[11,"serialize","guard::api::v1::mcaptcha::levels","",10,[[],["result",4]]],[11,"serialize","","",11,[[],["result",4]]],[11,"serialize","","",12,[[],["result",4]]],[11,"serialize","","",13,[[],["result",4]]],[11,"serialize","guard::api::v1::mcaptcha::mcaptcha","",14,[[],["result",4]]],[11,"serialize","","",15,[[],["result",4]]],[11,"serialize","guard::api::v1::meta","",16,[[],["result",4]]],[11,"register","guard::api::v1::auth","",25,[[["appservice",3]]]],[11,"register","","",26,[[["appservice",3]]]],[11,"register","","",27,[[["appservice",3]]]],[11,"register","","",28,[[["appservice",3]]]],[11,"register","guard::api::v1::mcaptcha::domains","",29,[[["appservice",3]]]],[11,"register","","",30,[[["appservice",3]]]],[11,"register","guard::api::v1::mcaptcha::duration","",31,[[["appservice",3]]]],[11,"register","","",32,[[["appservice",3]]]],[11,"register","guard::api::v1::mcaptcha::levels","",33,[[["appservice",3]]]],[11,"register","","",34,[[["appservice",3]]]],[11,"register","","",35,[[["appservice",3]]]],[11,"register","","",36,[[["appservice",3]]]],[11,"register","guard::api::v1::mcaptcha::mcaptcha","",37,[[["appservice",3]]]],[11,"register","","",38,[[["appservice",3]]]],[11,"register","guard::api::v1::meta","",39,[[["appservice",3]]]],[11,"register","","",40,[[["appservice",3]]]],[11,"error_response","guard::errors","",1,[[],["httpresponse",3]]],[11,"status_code","","",1,[[],["statuscode",3]]],[11,"initialize","guard","",23,[[]]],[11,"initialize","","",24,[[]]]],"p":[[3,"Data"],[4,"ServiceError"],[3,"ErrorToResponse"],[3,"Register"],[3,"Login"],[3,"Password"],[3,"Domain"],[3,"UpdateDuration"],[3,"GetDurationResp"],[3,"GetDuration"],[3,"AddLevels"],[3,"GetLevels"],[3,"Levels"],[3,"I32Levels"],[3,"MCaptchaID"],[3,"MCaptchaDetails"],[3,"Health"],[3,"HealthBuilder"],[3,"Server"],[3,"Captcha"],[3,"DatabaseBuilder"],[3,"Database"],[3,"Settings"],[3,"SETTINGS"],[3,"GIT_COMMIT_HASH"],[3,"signup"],[3,"signin"],[3,"signout"],[3,"delete_account"],[3,"add_domain"],[3,"delete_domain"],[3,"update_duration"],[3,"get_duration"],[3,"add_levels"],[3,"update_levels"],[3,"delete_levels"],[3,"get_levels"],[3,"add_mcaptcha"],[3,"delete_mcaptcha"],[3,"build_details"],[3,"health"]]},\ "tests_migrate":{"doc":"","i":[[0,"data","tests_migrate","",null,null],[3,"Data","tests_migrate::data","",null,null],[12,"db","","",0,null],[12,"creds","","",0,null],[12,"captcha","","",0,null],[11,"new","","",0,[[]]],[0,"settings","tests_migrate","",null,null],[3,"Server","tests_migrate::settings","",null,null],[12,"allow_registration","","",1,null],[12,"port","","",1,null],[12,"domain","","",1,null],[12,"cookie_secret","","",1,null],[12,"ip","","",1,null],[3,"Captcha","","",null,null],[12,"salt","","",2,null],[12,"gc","","",2,null],[11,"get_ip","","",1,[[],["string",3]]],[3,"DatabaseBuilder","","",null,null],[12,"port","","",3,null],[12,"hostname","","",3,null],[12,"username","","",3,null],[12,"password","","",3,null],[12,"name","","",3,null],[12,"url","","",3,null],[11,"extract_database_url","","",3,[[["url",3]]]],[3,"Database","","",null,null],[12,"url","","",4,null],[12,"pool","","",4,null],[3,"Settings","","",null,null],[12,"debug","","",5,null],[12,"database","","",5,null],[12,"server","","",5,null],[12,"pow","","",5,null],[11,"new","","",5,[[],[["configerror",4],["result",4]]]],[5,"set_from_database_url","","",null,[[["config",3],["databasebuilder",3]]]],[5,"set_database_url","","",null,[[["config",3]]]],[3,"Data","tests_migrate","",null,null],[12,"db","","",0,null],[12,"creds","","",0,null],[12,"captcha","","",0,null],[3,"Settings","","",null,null],[12,"debug","","",5,null],[12,"database","","",5,null],[12,"server","","",5,null],[12,"pow","","",5,null],[3,"SETTINGS","","",null,null],[12,"__private_field","","",6,null],[5,"main","","",null,[[]]],[11,"from","tests_migrate::data","",0,[[]]],[11,"into","","",0,[[]]],[11,"to_owned","","",0,[[]]],[11,"clone_into","","",0,[[]]],[11,"borrow","","",0,[[]]],[11,"borrow_mut","","",0,[[]]],[11,"try_from","","",0,[[],["result",4]]],[11,"try_into","","",0,[[],["result",4]]],[11,"type_id","","",0,[[],["typeid",3]]],[11,"vzip","","",0,[[]]],[11,"from","tests_migrate::settings","",1,[[]]],[11,"into","","",1,[[]]],[11,"to_owned","","",1,[[]]],[11,"clone_into","","",1,[[]]],[11,"borrow","","",1,[[]]],[11,"borrow_mut","","",1,[[]]],[11,"try_from","","",1,[[],["result",4]]],[11,"try_into","","",1,[[],["result",4]]],[11,"type_id","","",1,[[],["typeid",3]]],[11,"vzip","","",1,[[]]],[11,"from","","",2,[[]]],[11,"into","","",2,[[]]],[11,"to_owned","","",2,[[]]],[11,"clone_into","","",2,[[]]],[11,"borrow","","",2,[[]]],[11,"borrow_mut","","",2,[[]]],[11,"try_from","","",2,[[],["result",4]]],[11,"try_into","","",2,[[],["result",4]]],[11,"type_id","","",2,[[],["typeid",3]]],[11,"vzip","","",2,[[]]],[11,"from","","",3,[[]]],[11,"into","","",3,[[]]],[11,"to_owned","","",3,[[]]],[11,"clone_into","","",3,[[]]],[11,"borrow","","",3,[[]]],[11,"borrow_mut","","",3,[[]]],[11,"try_from","","",3,[[],["result",4]]],[11,"try_into","","",3,[[],["result",4]]],[11,"type_id","","",3,[[],["typeid",3]]],[11,"vzip","","",3,[[]]],[11,"from","","",4,[[]]],[11,"into","","",4,[[]]],[11,"to_owned","","",4,[[]]],[11,"clone_into","","",4,[[]]],[11,"borrow","","",4,[[]]],[11,"borrow_mut","","",4,[[]]],[11,"try_from","","",4,[[],["result",4]]],[11,"try_into","","",4,[[],["result",4]]],[11,"type_id","","",4,[[],["typeid",3]]],[11,"vzip","","",4,[[]]],[11,"from","","",5,[[]]],[11,"into","","",5,[[]]],[11,"to_owned","","",5,[[]]],[11,"clone_into","","",5,[[]]],[11,"borrow","","",5,[[]]],[11,"borrow_mut","","",5,[[]]],[11,"try_from","","",5,[[],["result",4]]],[11,"try_into","","",5,[[],["result",4]]],[11,"type_id","","",5,[[],["typeid",3]]],[11,"vzip","","",5,[[]]],[11,"from","tests_migrate","",6,[[]]],[11,"into","","",6,[[]]],[11,"borrow","","",6,[[]]],[11,"borrow_mut","","",6,[[]]],[11,"try_from","","",6,[[],["result",4]]],[11,"try_into","","",6,[[],["result",4]]],[11,"type_id","","",6,[[],["typeid",3]]],[11,"vzip","","",6,[[]]],[11,"clone","tests_migrate::data","",0,[[],["data",3]]],[11,"clone","tests_migrate::settings","",1,[[],["server",3]]],[11,"clone","","",2,[[],["captcha",3]]],[11,"clone","","",3,[[],["databasebuilder",3]]],[11,"clone","","",4,[[],["database",3]]],[11,"clone","","",5,[[],["settings",3]]],[11,"deref","tests_migrate","",6,[[],["settings",3]]],[11,"fmt","tests_migrate::settings","",1,[[["formatter",3]],["result",6]]],[11,"fmt","","",2,[[["formatter",3]],["result",6]]],[11,"fmt","","",3,[[["formatter",3]],["result",6]]],[11,"fmt","","",4,[[["formatter",3]],["result",6]]],[11,"fmt","","",5,[[["formatter",3]],["result",6]]],[11,"initialize","tests_migrate","",6,[[]]],[11,"deserialize","tests_migrate::settings","",1,[[],["result",4]]],[11,"deserialize","","",2,[[],["result",4]]],[11,"deserialize","","",3,[[],["result",4]]],[11,"deserialize","","",4,[[],["result",4]]],[11,"deserialize","","",5,[[],["result",4]]]],"p":[[3,"Data"],[3,"Server"],[3,"Captcha"],[3,"DatabaseBuilder"],[3,"Database"],[3,"Settings"],[3,"SETTINGS"]]}\ }'); addSearchOptions(searchIndex);initSearch(searchIndex); \ No newline at end of file diff --git a/source-files.js b/source-files.js index 897898d7..8109ff73 100644 --- a/source-files.js +++ b/source-files.js @@ -1,4 +1,4 @@ var N = null;var sourcesIndex = {}; -sourcesIndex["guard"] = {"name":"","dirs":[{"name":"api","dirs":[{"name":"v1","files":["auth.rs","mcaptcha.rs","meta.rs","mod.rs"]}],"files":["mod.rs"]}],"files":["data.rs","errors.rs","main.rs","settings.rs"]}; +sourcesIndex["guard"] = {"name":"","dirs":[{"name":"api","dirs":[{"name":"v1","dirs":[{"name":"mcaptcha","files":["domains.rs","duration.rs","levels.rs","mcaptcha.rs","mod.rs"]}],"files":["auth.rs","meta.rs","mod.rs"]}],"files":["mod.rs"]}],"files":["data.rs","errors.rs","main.rs","settings.rs"]}; sourcesIndex["tests_migrate"] = {"name":"","files":["data.rs","settings.rs","tests-migrate.rs"]}; createSourceSidebar(); diff --git a/src/guard/api/v1/mcaptcha/domains.rs.html b/src/guard/api/v1/mcaptcha/domains.rs.html new file mode 100644 index 00000000..7fc9082d --- /dev/null +++ b/src/guard/api/v1/mcaptcha/domains.rs.html @@ -0,0 +1,312 @@ +domains.rs - source + +
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+
+/*
+* Copyright (C) 2021  Aravinth Manivannan <realaravinth@batsense.net>
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Affero General Public License as
+* published by the Free Software Foundation, either version 3 of the
+* License, or (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Affero General Public License for more details.
+*
+* You should have received a copy of the GNU Affero General Public License
+* along with this program.  If not, see <https://www.gnu.org/licenses/>.
+*/
+
+use actix_identity::Identity;
+use actix_web::{post, web, HttpResponse, Responder};
+use serde::{Deserialize, Serialize};
+use url::Url;
+
+use super::is_authenticated;
+use crate::errors::*;
+use crate::Data;
+
+#[derive(Clone, Debug, Deserialize, Serialize)]
+pub struct Domain {
+    pub name: String,
+}
+
+#[post("/api/v1/mcaptcha/domain/add")]
+pub async fn add_domain(
+    payload: web::Json<Domain>,
+    data: web::Data<Data>,
+    id: Identity,
+) -> ServiceResult<impl Responder> {
+    is_authenticated(&id)?;
+    let url = Url::parse(&payload.name)?;
+    if let Some(host) = url.host_str() {
+        let user = id.identity().unwrap();
+        let res = sqlx::query!(
+            "INSERT INTO mcaptcha_domains (name, ID) VALUES  
+            ($1, (SELECT ID FROM mcaptcha_users WHERE name = ($2) ));",
+            host,
+            user
+        )
+        .execute(&data.db)
+        .await;
+        match res {
+            Err(e) => Err(dup_error(e, ServiceError::HostnameTaken)),
+            Ok(_) => Ok(HttpResponse::Ok()),
+        }
+    } else {
+        Err(ServiceError::NotAUrl)
+    }
+}
+
+#[post("/api/v1/mcaptcha/domain/delete")]
+pub async fn delete_domain(
+    payload: web::Json<Domain>,
+    data: web::Data<Data>,
+    id: Identity,
+) -> ServiceResult<impl Responder> {
+    is_authenticated(&id)?;
+    let url = Url::parse(&payload.name)?;
+    if let Some(host) = url.host_str() {
+        sqlx::query!("DELETE FROM mcaptcha_domains WHERE name = ($1)", host,)
+            .execute(&data.db)
+            .await?;
+        Ok(HttpResponse::Ok())
+    } else {
+        Err(ServiceError::NotAUrl)
+    }
+}
+
+// Workflow:
+// 1. Sign up
+// 2. Sign in
+// 3. Add domain(DNS TXT record verification? / put string at path)
+// 4. Create token
+// 5. Add levels
+// 6. Update duration
+// 7. Start syatem
+
+#[cfg(test)]
+mod tests {
+    use actix_web::http::{header, StatusCode};
+    use actix_web::test;
+
+    use super::*;
+    use crate::api::v1::services as v1_services;
+    use crate::tests::*;
+    use crate::*;
+
+    #[actix_rt::test]
+    async fn add_domains_work() {
+        const NAME: &str = "testuserdomainn";
+        const PASSWORD: &str = "longpassworddomain";
+        const EMAIL: &str = "testuserdomain@a.com";
+        const DOMAIN: &str = "http://example.com";
+        const ADD_URL: &str = "/api/v1/mcaptcha/domain/add";
+
+        {
+            let data = Data::new().await;
+            delete_user(NAME, &data).await;
+        }
+
+        register_and_signin(NAME, EMAIL, PASSWORD).await;
+
+        // 1. add domain
+        let (data, _, signin_resp) = add_domain_util(NAME, PASSWORD, DOMAIN).await;
+        let cookies = get_cookie!(signin_resp);
+        let mut app = get_app!(data).await;
+
+        let mut domain = Domain {
+            name: DOMAIN.into(),
+        };
+
+        // 2. duplicate domain
+        bad_post_req_test(
+            NAME,
+            PASSWORD,
+            ADD_URL,
+            &domain,
+            ServiceError::HostnameTaken,
+            StatusCode::BAD_REQUEST,
+        )
+        .await;
+
+        // 3. delete domain
+        let del_domain_resp = test::call_service(
+            &mut app,
+            post_request!(&domain, "/api/v1/mcaptcha/domain/delete")
+                .cookie(cookies.clone())
+                .to_request(),
+        )
+        .await;
+        assert_eq!(del_domain_resp.status(), StatusCode::OK);
+
+        // 4. not a URL test for adding domain
+        domain.name = "testing".into();
+        bad_post_req_test(
+            NAME,
+            PASSWORD,
+            ADD_URL,
+            &domain,
+            ServiceError::NotAUrl,
+            StatusCode::BAD_REQUEST,
+        )
+        .await;
+    }
+}
+
+
\ No newline at end of file diff --git a/src/guard/api/v1/mcaptcha/duration.rs.html b/src/guard/api/v1/mcaptcha/duration.rs.html new file mode 100644 index 00000000..93c53e2a --- /dev/null +++ b/src/guard/api/v1/mcaptcha/duration.rs.html @@ -0,0 +1,328 @@ +duration.rs - source + +
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+
+/*
+* Copyright (C) 2021  Aravinth Manivannan <realaravinth@batsense.net>
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Affero General Public License as
+* published by the Free Software Foundation, either version 3 of the
+* License, or (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Affero General Public License for more details.
+*
+* You should have received a copy of the GNU Affero General Public License
+* along with this program.  If not, see <https://www.gnu.org/licenses/>.
+*/
+
+use actix_identity::Identity;
+use actix_web::{post, web, HttpResponse, Responder};
+use serde::{Deserialize, Serialize};
+
+use super::is_authenticated;
+use crate::errors::*;
+use crate::Data;
+
+#[derive(Deserialize, Serialize)]
+pub struct UpdateDuration {
+    pub token_name: String,
+    pub duration: i32,
+}
+
+#[post("/api/v1/mcaptcha/domain/token/duration/update")]
+pub async fn update_duration(
+    payload: web::Json<UpdateDuration>,
+    data: web::Data<Data>,
+    id: Identity,
+) -> ServiceResult<impl Responder> {
+    is_authenticated(&id)?;
+
+    if payload.duration > 0 {
+        sqlx::query!(
+            "UPDATE mcaptcha_config  set duration = $1 WHERE 
+            name = $2;",
+            &payload.duration,
+            &payload.token_name,
+        )
+        .execute(&data.db)
+        .await?;
+
+        Ok(HttpResponse::Ok())
+    } else {
+        // when mCaptcha/mCaptcha #2 is fixed, this wont be necessary
+        Err(ServiceError::CaptchaError(
+            m_captcha::errors::CaptchaError::DifficultyFactorZero,
+        ))
+    }
+}
+
+#[derive(Deserialize, Serialize)]
+pub struct GetDurationResp {
+    pub duration: i32,
+}
+
+#[derive(Deserialize, Serialize)]
+pub struct GetDuration {
+    pub token: String,
+}
+
+#[post("/api/v1/mcaptcha/domain/token/duration/get")]
+pub async fn get_duration(
+    payload: web::Json<GetDuration>,
+    data: web::Data<Data>,
+    id: Identity,
+) -> ServiceResult<impl Responder> {
+    is_authenticated(&id)?;
+
+    let duration = sqlx::query_as!(
+        GetDurationResp,
+        "SELECT duration FROM mcaptcha_config  WHERE 
+            name = $1;",
+        &payload.token,
+    )
+    .fetch_one(&data.db)
+    .await?;
+    Ok(HttpResponse::Ok().json(duration))
+}
+
+#[cfg(test)]
+mod tests {
+    use actix_web::http::{header, StatusCode};
+    use actix_web::test;
+
+    use super::*;
+    use crate::api::v1::services as v1_services;
+    use crate::tests::*;
+    use crate::*;
+
+    #[actix_rt::test]
+    async fn update_duration() {
+        const NAME: &str = "testuserduration";
+        const PASSWORD: &str = "longpassworddomain";
+        const EMAIL: &str = "testuserduration@a.com";
+        const DOMAIN: &str = "http://duration.example.com";
+        const TOKEN_NAME: &str = "duration_routes_token";
+        const GET_URL: &str = "/api/v1/mcaptcha/domain/token/duration/get";
+        const UPDATE_URL: &str = "/api/v1/mcaptcha/domain/token/duration/update";
+
+        {
+            let data = Data::new().await;
+            delete_user(NAME, &data).await;
+        }
+
+        register_and_signin(NAME, EMAIL, PASSWORD).await;
+        let (data, _, signin_resp) = add_token_util(NAME, PASSWORD, DOMAIN, TOKEN_NAME).await;
+        let cookies = get_cookie!(signin_resp);
+        let mut app = get_app!(data).await;
+
+        let update = UpdateDuration {
+            token_name: TOKEN_NAME.into(),
+            duration: 40,
+        };
+
+        let get = GetDuration {
+            token: TOKEN_NAME.into(),
+        };
+
+        // check default
+
+        let get_level_resp = test::call_service(
+            &mut app,
+            post_request!(&get, GET_URL)
+                .cookie(cookies.clone())
+                .to_request(),
+        )
+        .await;
+        assert_eq!(get_level_resp.status(), StatusCode::OK);
+        let res_levels: GetDurationResp = test::read_body_json(get_level_resp).await;
+        assert_eq!(res_levels.duration, 30);
+
+        // update and check changes
+
+        let update_duration = test::call_service(
+            &mut app,
+            post_request!(&update, UPDATE_URL)
+                .cookie(cookies.clone())
+                .to_request(),
+        )
+        .await;
+        assert_eq!(update_duration.status(), StatusCode::OK);
+        let get_level_resp = test::call_service(
+            &mut app,
+            post_request!(&get, GET_URL)
+                .cookie(cookies.clone())
+                .to_request(),
+        )
+        .await;
+        assert_eq!(get_level_resp.status(), StatusCode::OK);
+        let res_levels: GetDurationResp = test::read_body_json(get_level_resp).await;
+        assert_eq!(res_levels.duration, 40);
+    }
+}
+
+
\ No newline at end of file diff --git a/src/guard/api/v1/mcaptcha.rs.html b/src/guard/api/v1/mcaptcha/levels.rs.html similarity index 51% rename from src/guard/api/v1/mcaptcha.rs.html rename to src/guard/api/v1/mcaptcha/levels.rs.html index 54a0d87d..85970469 100644 --- a/src/guard/api/v1/mcaptcha.rs.html +++ b/src/guard/api/v1/mcaptcha/levels.rs.html @@ -1,7 +1,7 @@ -mcaptcha.rs - source - -
  1
+levels.rs - source
+
+
  1
   2
   3
   4
@@ -324,63 +324,6 @@
 321
 322
 323
-324
-325
-326
-327
-328
-329
-330
-331
-332
-333
-334
-335
-336
-337
-338
-339
-340
-341
-342
-343
-344
-345
-346
-347
-348
-349
-350
-351
-352
-353
-354
-355
-356
-357
-358
-359
-360
-361
-362
-363
-364
-365
-366
-367
-368
-369
-370
-371
-372
-373
-374
-375
-376
-377
-378
-379
-380
 
 /*
 * Copyright (C) 2021  Aravinth Manivannan <realaravinth@batsense.net>
@@ -403,143 +346,11 @@
 use actix_web::{post, web, HttpResponse, Responder};
 use m_captcha::{defense::Level, DefenseBuilder};
 use serde::{Deserialize, Serialize};
-use url::Url;
 
-use super::auth::is_authenticated;
+use super::is_authenticated;
 use crate::errors::*;
 use crate::Data;
 
-#[derive(Clone, Debug, Deserialize, Serialize)]
-pub struct Domain {
-    pub name: String,
-}
-
-#[post("/api/v1/mcaptcha/domain/add")]
-pub async fn add_domain(
-    payload: web::Json<Domain>,
-    data: web::Data<Data>,
-    id: Identity,
-) -> ServiceResult<impl Responder> {
-    is_authenticated(&id)?;
-    let url = Url::parse(&payload.name)?;
-    if let Some(host) = url.host_str() {
-        let user = id.identity().unwrap();
-        let res = sqlx::query!(
-            "INSERT INTO mcaptcha_domains (name, ID) VALUES  
-            ($1, (SELECT ID FROM mcaptcha_users WHERE name = ($2) ));",
-            host,
-            user
-        )
-        .execute(&data.db)
-        .await;
-        match res {
-            Err(e) => Err(dup_error(e, ServiceError::HostnameTaken)),
-            Ok(_) => Ok(HttpResponse::Ok()),
-        }
-    } else {
-        Err(ServiceError::NotAUrl)
-    }
-}
-
-#[post("/api/v1/mcaptcha/domain/delete")]
-pub async fn delete_domain(
-    payload: web::Json<Domain>,
-    data: web::Data<Data>,
-    id: Identity,
-) -> ServiceResult<impl Responder> {
-    is_authenticated(&id)?;
-    let url = Url::parse(&payload.name)?;
-    if let Some(host) = url.host_str() {
-        sqlx::query!("DELETE FROM mcaptcha_domains WHERE name = ($1)", host,)
-            .execute(&data.db)
-            .await?;
-        Ok(HttpResponse::Ok())
-    } else {
-        Err(ServiceError::NotAUrl)
-    }
-}
-
-#[derive(Clone, Debug, Deserialize, Serialize)]
-pub struct CreateToken {
-    pub name: String,
-    pub domain: String,
-}
-
-#[derive(Clone, Debug, Deserialize, Serialize)]
-pub struct TokenKeyPair {
-    pub name: String,
-    pub key: String,
-}
-
-#[post("/api/v1/mcaptcha/domain/token/add")]
-pub async fn add_mcaptcha(
-    payload: web::Json<CreateToken>,
-    data: web::Data<Data>,
-    id: Identity,
-) -> ServiceResult<impl Responder> {
-    is_authenticated(&id)?;
-    let key = get_random(32);
-    let url = Url::parse(&payload.domain)?;
-    println!("got req");
-    if let Some(host) = url.host_str() {
-        let res = sqlx::query!(
-            "INSERT INTO mcaptcha_config 
-        (name, key, domain_name)
-        VALUES ($1, $2, (
-                SELECT name FROM mcaptcha_domains WHERE name = ($3)))",
-            &payload.name,
-            &key,
-            &host,
-        )
-        .execute(&data.db)
-        .await;
-
-        match res {
-            Err(e) => Err(dup_error(e, ServiceError::TokenNameTaken)),
-            Ok(_) => {
-                let resp = TokenKeyPair {
-                    key,
-                    name: payload.into_inner().name,
-                };
-
-                Ok(HttpResponse::Ok().json(resp))
-            }
-        }
-    } else {
-        Err(ServiceError::NotAUrl)
-    }
-}
-
-#[post("/api/v1/mcaptcha/domain/token/delete")]
-pub async fn delete_mcaptcha(
-    payload: web::Json<CreateToken>,
-    data: web::Data<Data>,
-    id: Identity,
-) -> ServiceResult<impl Responder> {
-    is_authenticated(&id)?;
-    sqlx::query!(
-        "DELETE FROM mcaptcha_config WHERE name = ($1)",
-        &payload.name,
-    )
-    .execute(&data.db)
-    .await?;
-    Ok(HttpResponse::Ok())
-}
-
-fn get_random(len: usize) -> String {
-    use std::iter;
-
-    use rand::{distributions::Alphanumeric, rngs::ThreadRng, thread_rng, Rng};
-
-    let mut rng: ThreadRng = thread_rng();
-
-    iter::repeat(())
-        .map(|()| rng.sample(Alphanumeric))
-        .map(char::from)
-        .take(len)
-        .collect::<String>()
-}
-
 #[derive(Serialize, Deserialize)]
 pub struct AddLevels {
     pub levels: Vec<Level>,
@@ -671,63 +482,6 @@
     Ok(HttpResponse::Ok().json(levels))
 }
 
-#[derive(Deserialize, Serialize)]
-pub struct Duration {
-    pub token_name: String,
-    pub duration: i32,
-}
-
-#[post("/api/v1/mcaptcha/domain/token/duration/update")]
-pub async fn update_duration(
-    payload: web::Json<Duration>,
-    data: web::Data<Data>,
-    id: Identity,
-) -> ServiceResult<impl Responder> {
-    is_authenticated(&id)?;
-
-    if payload.duration > 0 {
-        sqlx::query!(
-            "UPDATE mcaptcha_config  set duration = $1 WHERE 
-            name = $2;",
-            &payload.duration,
-            &payload.token_name,
-        )
-        .execute(&data.db)
-        .await?;
-
-        Ok(HttpResponse::Ok())
-    } else {
-        // when mCaptcha/mCaptcha #2 is fixed, this wont be necessary
-        Err(ServiceError::CaptchaError(
-            m_captcha::errors::CaptchaError::DifficultyFactorZero,
-        ))
-    }
-}
-
-#[derive(Deserialize, Serialize)]
-pub struct GetDuration {
-    pub duration: i32,
-}
-
-#[post("/api/v1/mcaptcha/domain/token/duration/get")]
-pub async fn get_duration(
-    payload: web::Json<GetLevels>,
-    data: web::Data<Data>,
-    id: Identity,
-) -> ServiceResult<impl Responder> {
-    is_authenticated(&id)?;
-
-    let duration = sqlx::query_as!(
-        GetDuration,
-        "SELECT duration FROM mcaptcha_config  WHERE 
-            name = $1;",
-        &payload.token,
-    )
-    .fetch_one(&data.db)
-    .await?;
-    Ok(HttpResponse::Ok().json(duration))
-}
-
 #[derive(Deserialize, Serialize)]
 pub struct Levels {
     levels: I32Levels,
@@ -754,13 +508,145 @@
     Ok(levels)
 }
 
-// Workflow:
-// 1. Sign up
-// 2. Sign in
-// 3. Add domain(DNS TXT record verification? / put string at path)
-// 4. Create token
-// 5. Add levels
-// 6. Update duration
-// 7. Start syatem
+#[cfg(test)]
+mod tests {
+    use actix_web::http::{header, StatusCode};
+    use actix_web::test;
+
+    use super::*;
+    use crate::api::v1::services as v1_services;
+    use crate::tests::*;
+    use crate::*;
+
+    #[actix_rt::test]
+    async fn level_routes_work() {
+        const NAME: &str = "testuserlevelroutes";
+        const PASSWORD: &str = "longpassworddomain";
+        const EMAIL: &str = "testuserlevelrouts@a.com";
+        const DOMAIN: &str = "http://level.example.com";
+        const TOKEN_NAME: &str = "level_routes_work";
+        const ADD_URL: &str = "/api/v1/mcaptcha/domain/token/levels/add";
+        const UPDATE_URL: &str = "/api/v1/mcaptcha/domain/token/levels/update";
+        const DEL_URL: &str = "/api/v1/mcaptcha/domain/token/levels/delete";
+        const GET_URL: &str = "/api/v1/mcaptcha/domain/token/levels/get";
+
+        let l1 = Level {
+            difficulty_factor: 50,
+            visitor_threshold: 50,
+        };
+        let l2 = Level {
+            difficulty_factor: 500,
+            visitor_threshold: 500,
+        };
+        let levels = vec![l1, l2];
+        let add_level = AddLevels {
+            levels: levels.clone(),
+            name: TOKEN_NAME.into(),
+        };
+
+        let get_level = GetLevels {
+            token: TOKEN_NAME.into(),
+        };
+
+        {
+            let data = Data::new().await;
+            delete_user(NAME, &data).await;
+        }
+
+        register_and_signin(NAME, EMAIL, PASSWORD).await;
+        let (data, _, signin_resp) = add_token_util(NAME, PASSWORD, DOMAIN, TOKEN_NAME).await;
+        let cookies = get_cookie!(signin_resp);
+        let mut app = get_app!(data).await;
+
+        // 1. add level
+        let add_token_resp = test::call_service(
+            &mut app,
+            post_request!(&add_level, ADD_URL)
+                .cookie(cookies.clone())
+                .to_request(),
+        )
+        .await;
+        assert_eq!(add_token_resp.status(), StatusCode::OK);
+
+        // 2. get level
+        let get_level_resp = test::call_service(
+            &mut app,
+            post_request!(&get_level, GET_URL)
+                .cookie(cookies.clone())
+                .to_request(),
+        )
+        .await;
+        assert_eq!(get_level_resp.status(), StatusCode::OK);
+        let res_levels: Vec<Level> = test::read_body_json(get_level_resp).await;
+        assert_eq!(res_levels, levels);
+
+        // 3. update level
+
+        let l1 = Level {
+            difficulty_factor: 10,
+            visitor_threshold: 10,
+        };
+        let l2 = Level {
+            difficulty_factor: 5000,
+            visitor_threshold: 5000,
+        };
+        let levels = vec![l1, l2];
+        let add_level = AddLevels {
+            levels: levels.clone(),
+            name: TOKEN_NAME.into(),
+        };
+        let add_token_resp = test::call_service(
+            &mut app,
+            post_request!(&add_level, UPDATE_URL)
+                .cookie(cookies.clone())
+                .to_request(),
+        )
+        .await;
+        assert_eq!(add_token_resp.status(), StatusCode::OK);
+        let get_level_resp = test::call_service(
+            &mut app,
+            post_request!(&get_level, GET_URL)
+                .cookie(cookies.clone())
+                .to_request(),
+        )
+        .await;
+        assert_eq!(get_level_resp.status(), StatusCode::OK);
+        let res_levels: Vec<Level> = test::read_body_json(get_level_resp).await;
+        assert_eq!(res_levels, levels);
+
+        // 4. delete level
+        let l1 = Level {
+            difficulty_factor: 10,
+            visitor_threshold: 10,
+        };
+        let l2 = Level {
+            difficulty_factor: 5000,
+            visitor_threshold: 5000,
+        };
+        let levels = vec![l1, l2];
+        let add_level = AddLevels {
+            levels: levels.clone(),
+            name: TOKEN_NAME.into(),
+        };
+        let add_token_resp = test::call_service(
+            &mut app,
+            post_request!(&add_level, DEL_URL)
+                .cookie(cookies.clone())
+                .to_request(),
+        )
+        .await;
+        assert_eq!(add_token_resp.status(), StatusCode::OK);
+        let get_level_resp = test::call_service(
+            &mut app,
+            post_request!(&get_level, GET_URL)
+                .cookie(cookies.clone())
+                .to_request(),
+        )
+        .await;
+        assert_eq!(get_level_resp.status(), StatusCode::OK);
+        let res_levels: Vec<Level> = test::read_body_json(get_level_resp).await;
+        assert_eq!(res_levels, Vec::new());
+    }
+}
 
-
\ No newline at end of file +
\ No newline at end of file diff --git a/src/guard/api/v1/mcaptcha/mcaptcha.rs.html b/src/guard/api/v1/mcaptcha/mcaptcha.rs.html new file mode 100644 index 00000000..8d40a8c1 --- /dev/null +++ b/src/guard/api/v1/mcaptcha/mcaptcha.rs.html @@ -0,0 +1,378 @@ +mcaptcha.rs - source + +
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+
+/*
+* Copyright (C) 2021  Aravinth Manivannan <realaravinth@batsense.net>
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Affero General Public License as
+* published by the Free Software Foundation, either version 3 of the
+* License, or (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Affero General Public License for more details.
+*
+* You should have received a copy of the GNU Affero General Public License
+* along with this program.  If not, see <https://www.gnu.org/licenses/>.
+*/
+
+use actix_identity::Identity;
+use actix_web::{post, web, HttpResponse, Responder};
+use serde::{Deserialize, Serialize};
+use url::Url;
+
+use super::is_authenticated;
+use crate::errors::*;
+use crate::Data;
+
+#[derive(Clone, Debug, Deserialize, Serialize)]
+pub struct MCaptchaID {
+    pub name: String,
+    pub domain: String,
+}
+
+#[derive(Clone, Debug, Deserialize, Serialize)]
+pub struct MCaptchaDetails {
+    pub name: String,
+    pub key: String,
+}
+
+#[post("/api/v1/mcaptcha/domain/token/add")]
+pub async fn add_mcaptcha(
+    payload: web::Json<MCaptchaID>,
+    data: web::Data<Data>,
+    id: Identity,
+) -> ServiceResult<impl Responder> {
+    is_authenticated(&id)?;
+    let key = get_random(32);
+    let url = Url::parse(&payload.domain)?;
+    println!("got req");
+    if let Some(host) = url.host_str() {
+        let res = sqlx::query!(
+            "INSERT INTO mcaptcha_config 
+        (name, key, domain_name)
+        VALUES ($1, $2, (
+                SELECT name FROM mcaptcha_domains WHERE name = ($3)))",
+            &payload.name,
+            &key,
+            &host,
+        )
+        .execute(&data.db)
+        .await;
+
+        match res {
+            Err(e) => Err(dup_error(e, ServiceError::TokenNameTaken)),
+            Ok(_) => {
+                let resp = MCaptchaDetails {
+                    key,
+                    name: payload.into_inner().name,
+                };
+
+                Ok(HttpResponse::Ok().json(resp))
+            }
+        }
+    } else {
+        Err(ServiceError::NotAUrl)
+    }
+}
+
+#[post("/api/v1/mcaptcha/domain/token/delete")]
+pub async fn delete_mcaptcha(
+    payload: web::Json<MCaptchaID>,
+    data: web::Data<Data>,
+    id: Identity,
+) -> ServiceResult<impl Responder> {
+    is_authenticated(&id)?;
+    sqlx::query!(
+        "DELETE FROM mcaptcha_config WHERE name = ($1)",
+        &payload.name,
+    )
+    .execute(&data.db)
+    .await?;
+    Ok(HttpResponse::Ok())
+}
+
+fn get_random(len: usize) -> String {
+    use std::iter;
+
+    use rand::{distributions::Alphanumeric, rngs::ThreadRng, thread_rng, Rng};
+
+    let mut rng: ThreadRng = thread_rng();
+
+    iter::repeat(())
+        .map(|()| rng.sample(Alphanumeric))
+        .map(char::from)
+        .take(len)
+        .collect::<String>()
+}
+
+// Workflow:
+// 1. Sign up
+// 2. Sign in
+// 3. Add domain(DNS TXT record verification? / put string at path)
+// 4. Create token
+// 5. Add levels
+// 6. Update duration
+// 7. Start syatem
+
+#[cfg(test)]
+mod tests {
+    use actix_web::http::{header, StatusCode};
+    use actix_web::test;
+
+    use super::*;
+    use crate::api::v1::services as v1_services;
+    use crate::tests::*;
+    use crate::*;
+
+    #[actix_rt::test]
+    async fn add_mcaptcha_works() {
+        const NAME: &str = "testusermcaptcha";
+        const PASSWORD: &str = "longpassworddomain";
+        const EMAIL: &str = "testusermcaptcha@a.com";
+        const DOMAIN: &str = "http://mcaptcha.example.com";
+        const TOKEN_NAME: &str = "add_mcaptcha_works_token";
+        const ADD_URL: &str = "/api/v1/mcaptcha/domain/token/add";
+        const DEL_URL: &str = "/api/v1/mcaptcha/domain/token/delete";
+
+        {
+            let data = Data::new().await;
+            delete_user(NAME, &data).await;
+        }
+
+        // 1. add mcaptcha token
+        register_and_signin(NAME, EMAIL, PASSWORD).await;
+        let (data, _, signin_resp) = add_token_util(NAME, PASSWORD, DOMAIN, TOKEN_NAME).await;
+        let cookies = get_cookie!(signin_resp);
+        let mut app = get_app!(data).await;
+
+        let mut domain = MCaptchaID {
+            domain: DOMAIN.into(),
+            name: TOKEN_NAME.into(),
+        };
+
+        // 2. add duplicate mcaptha
+        bad_post_req_test(
+            NAME,
+            PASSWORD,
+            ADD_URL,
+            &domain,
+            ServiceError::TokenNameTaken,
+            StatusCode::BAD_REQUEST,
+        )
+        .await;
+
+        // 4. not a URL test for adding domain
+        domain.domain = "testing".into();
+        bad_post_req_test(
+            NAME,
+            PASSWORD,
+            ADD_URL,
+            &domain,
+            ServiceError::NotAUrl,
+            StatusCode::BAD_REQUEST,
+        )
+        .await;
+
+        // 4. delete token
+        let del_token = test::call_service(
+            &mut app,
+            post_request!(&domain, DEL_URL)
+                .cookie(cookies.clone())
+                .to_request(),
+        )
+        .await;
+        assert_eq!(del_token.status(), StatusCode::OK);
+    }
+}
+
+
\ No newline at end of file diff --git a/src/guard/api/v1/mcaptcha/mod.rs.html b/src/guard/api/v1/mcaptcha/mod.rs.html new file mode 100644 index 00000000..f3f1e796 --- /dev/null +++ b/src/guard/api/v1/mcaptcha/mod.rs.html @@ -0,0 +1,52 @@ +mod.rs - source + +
 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+
+/*
+* Copyright (C) 2021  Aravinth Manivannan <realaravinth@batsense.net>
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Affero General Public License as
+* published by the Free Software Foundation, either version 3 of the
+* License, or (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Affero General Public License for more details.
+*
+* You should have received a copy of the GNU Affero General Public License
+* along with this program.  If not, see <https://www.gnu.org/licenses/>.
+*/
+
+pub mod domains;
+pub mod duration;
+pub mod levels;
+pub mod mcaptcha;
+
+pub use super::auth::is_authenticated;
+
+
\ No newline at end of file diff --git a/src/guard/api/v1/mod.rs.html b/src/guard/api/v1/mod.rs.html index 27911340..eb1d2ba2 100644 --- a/src/guard/api/v1/mod.rs.html +++ b/src/guard/api/v1/mod.rs.html @@ -53,6 +53,10 @@ 50 51 52 +53 +54 +55 +56
 /*
 * Copyright (C) 2021  Aravinth Manivannan <realaravinth@batsense.net>
@@ -85,19 +89,23 @@
     cfg.service(auth::delete_account);
 
     // mcaptcha
-    // 1. domain and mcaptcha
-    cfg.service(mcaptcha::add_domain);
-    cfg.service(mcaptcha::delete_domain);
-    cfg.service(mcaptcha::add_mcaptcha);
-    cfg.service(mcaptcha::delete_mcaptcha);
+    // domain
+    cfg.service(mcaptcha::domains::add_domain);
+    cfg.service(mcaptcha::domains::delete_domain);
+
+    // mcaptcha
+    cfg.service(mcaptcha::mcaptcha::add_mcaptcha);
+    cfg.service(mcaptcha::mcaptcha::delete_mcaptcha);
+
     // levels
-    cfg.service(mcaptcha::add_levels);
-    cfg.service(mcaptcha::update_levels);
-    cfg.service(mcaptcha::delete_levels);
-    cfg.service(mcaptcha::get_levels);
+    cfg.service(mcaptcha::levels::add_levels);
+    cfg.service(mcaptcha::levels::update_levels);
+    cfg.service(mcaptcha::levels::delete_levels);
+    cfg.service(mcaptcha::levels::get_levels);
+
     // duration
-    cfg.service(mcaptcha::update_duration);
-    cfg.service(mcaptcha::get_duration);
+    cfg.service(mcaptcha::duration::update_duration);
+    cfg.service(mcaptcha::duration::get_duration);
 
     // meta
     cfg.service(meta::build_details);