-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #45 from go-bazzinga/9-add-login-page
Storing keypair in cloudflare kv
- Loading branch information
Showing
21 changed files
with
270 additions
and
108 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,7 +18,3 @@ impl Credentials { | |
} | ||
} | ||
} | ||
|
||
pub trait AuthClient { | ||
fn client(&mut self, credentials: &Credentials) -> &Self; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,9 @@ | ||
mod delete_kv; | ||
mod read_kv; | ||
mod read_metadata; | ||
mod write_kv_with_metadata; | ||
|
||
pub use self::delete_kv::DeleteKV; | ||
pub use self::read_kv::ReadKV; | ||
pub use self::read_metadata::ReadMetadata; | ||
pub use self::write_kv_with_metadata::WriteKVWithMetadata; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
use crate::{connect::EndPoint, endpoints::CloudflareResponse}; | ||
use reqwest::Method; | ||
use std::collections::HashMap; | ||
|
||
// https://developers.cloudflare.com/api/operations/workers-kv-namespace-read-the-metadata-for-a-key | ||
#[derive(Debug)] | ||
pub struct ReadMetadata<'a> { | ||
pub account_identifier: &'a str, | ||
pub namespace_identifier: &'a str, | ||
pub key_name: &'a str, | ||
} | ||
|
||
impl<'a> EndPoint<CloudflareResponse<HashMap<String, String>>> for ReadMetadata<'a> { | ||
fn method(&self) -> Method { | ||
Method::GET | ||
} | ||
|
||
fn path(&self) -> String { | ||
format!( | ||
"/accounts/{}/storage/kv/namespaces/{}/metadata/{}", | ||
self.account_identifier, self.namespace_identifier, self.key_name, | ||
) | ||
} | ||
} |
11 changes: 6 additions & 5 deletions
11
cloudflare-api/src/endpoints/storage_kv/write_kv_with_metadata.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.