This repository has been archived by the owner on Oct 6, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 63
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 #8 from MindFlavor/work
Lease blob
- Loading branch information
Showing
16 changed files
with
188 additions
and
92 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,12 @@ | ||
[package] | ||
name = "azure_sdk_for_rust" | ||
version = "0.1.0" | ||
version = "0.1.1" | ||
authors = ["Francesco Cogno <[email protected]>"] | ||
|
||
[[bin]] | ||
name = "main" | ||
doc = false | ||
|
||
[dependencies] | ||
chrono = "*" | ||
rust-crypto = "^0.2" | ||
|
@@ -11,6 +15,7 @@ RustyXML = "*" | |
mime = "*" | ||
log = "0.3" | ||
env_logger = "0.3" | ||
uuid = "^0.1" | ||
|
||
[dependencies.hyper] | ||
version = "*" | ||
|
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,36 @@ | ||
use std::str::FromStr; | ||
use std::string::ParseError; | ||
use std::fmt::{Display, Formatter}; | ||
use std::fmt; | ||
use azure::core::enumerations; | ||
use azure::core::errors::TraversingError; | ||
use azure::core::parsing::FromStringOptional; | ||
use uuid::Uuid; | ||
|
||
create_enum!(LeaseStatus, | ||
(Locked, "locked"), | ||
(Unlocked, "unlocked") | ||
); | ||
|
||
create_enum!(LeaseState, | ||
(Available, "available"), | ||
(Leased, "leased"), | ||
(Expired, "expired"), | ||
(Breaking, "breaking"), | ||
(Broken, "broken") | ||
); | ||
|
||
create_enum!(LeaseDuration, | ||
(Infinite, "infinite"), | ||
(Fixed, "fixed") | ||
); | ||
|
||
create_enum!(LeaseAction, | ||
(Acquire, "acquire"), | ||
(Renew, "renew "), | ||
(Change, "change"), | ||
(Release, "release "), | ||
(Break, "break") | ||
); | ||
|
||
pub type LeaseId = Uuid; |
This file was deleted.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
use azure::core::lease::LeaseId; | ||
|
||
#[derive(Debug, Clone, PartialEq)] | ||
pub struct LeaseBlobOptions { | ||
pub lease_id: Option<LeaseId>, | ||
pub timeout: Option<u64>, | ||
pub lease_break_period: Option<u32>, | ||
pub lease_duration: Option<u32>, | ||
pub proposed_lease_id: Option<LeaseId>, | ||
pub request_id: Option<String>, | ||
} | ||
|
||
pub const LEASE_BLOB_OPTIONS_DEFAULT: LeaseBlobOptions = LeaseBlobOptions { | ||
lease_id: None, | ||
timeout: None, | ||
lease_break_period: None, | ||
lease_duration: None, | ||
proposed_lease_id: None, | ||
request_id: None, | ||
}; |
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,28 +1,3 @@ | ||
pub mod client; | ||
pub mod container; | ||
pub mod blob; | ||
|
||
use std::fmt; | ||
use std::str::FromStr; | ||
use azure::core::enumerations; | ||
|
||
use azure::core::errors::TraversingError; | ||
use azure::core::parsing::FromStringOptional; | ||
|
||
create_enum!(LeaseStatus, | ||
(Locked, "locked"), | ||
(Unlocked, "unlocked") | ||
); | ||
|
||
create_enum!(LeaseState, | ||
(Available, "available"), | ||
(Leased, "leased"), | ||
(Expired, "expired"), | ||
(Breaking, "breaking"), | ||
(Broken, "broken") | ||
); | ||
|
||
create_enum!(LeaseDuration, | ||
(Infinite, "infinite"), | ||
(Fixed, "fixed") | ||
); |
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.