Skip to content

Commit 1c484fc

Browse files
committed
Move code commit
1 parent 6259398 commit 1c484fc

File tree

7 files changed

+32
-37
lines changed

7 files changed

+32
-37
lines changed

Cargo.toml

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,18 @@
1-
[workspace]
2-
members = [
3-
"vss-accessor",
4-
]
1+
[package]
2+
name = "vss-client"
3+
version = "0.1.0"
4+
edition = "2021"
5+
build = "build.rs"
6+
7+
[dependencies]
8+
prost = "0.11.9"
9+
reqwest = { version = "0.11.13", features = ["rustls-tls"] }
10+
11+
[dev-dependencies]
12+
13+
[build-dependencies]
14+
prost-build = { version = "0.11.3" }
15+
reqwest = { version = "0.11.13", features = ["blocking"] }
16+
17+
[features]
18+
genproto = []

vss-accessor/build.rs renamed to build.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1+
#[cfg(feature = "genproto")]
12
extern crate prost_build;
2-
3-
use std::fs::File;
4-
use std::path::Path;
5-
use std::{env, fs};
3+
#[cfg(feature = "genproto")]
4+
use std::{env, fs, fs::File, path::Path};
65

76
/// To generate updated proto objects:
87
/// 1. Place `vss.proto` file in `src/proto/`

src/lib.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#![deny(rustdoc::broken_intra_doc_links)]
2+
#![deny(rustdoc::private_intra_doc_links)]
3+
4+
mod vss_client;
5+
mod vss_error;
6+
7+
/// Import auto-generated objects from protobuf specification of VSS
8+
pub mod vss {
9+
include!("generated-src/org.vss.rs");
10+
}

vss-accessor/src/lib.rs renamed to src/vss_client.rs

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
#![deny(rustdoc::broken_intra_doc_links)]
2-
#![deny(rustdoc::private_intra_doc_links)]
3-
41
use std::error::Error;
52

63
use ::prost::Message;
@@ -13,13 +10,6 @@ use crate::vss::{
1310
};
1411
use crate::vss_error::VssError;
1512

16-
mod vss_error;
17-
18-
/// Import auto-generated code related to request/response objects of VSS
19-
pub mod vss {
20-
include!("generated-src/org.vss.rs");
21-
}
22-
2313
/// Thin-client to access a hosted instance of Versioned Storage Service (VSS).
2414
/// The provided [`VssClient`] API is minimalistic and is congruent to the VSS server-side API.
2515
pub struct VssClient {

vss-accessor/src/vss_error.rs renamed to src/vss_error.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ pub enum VssError {
1717
}
1818

1919
impl VssError {
20-
/// Create new instance of VssError
20+
/// Create new instance of `VssError`
2121
pub fn new(status: StatusCode, payload: Bytes) -> VssError {
2222
match ErrorResponse::decode(&payload[..]) {
2323
Ok(error_response) => VssError::from(error_response),

vss-accessor/Cargo.toml

Lines changed: 0 additions & 18 deletions
This file was deleted.

0 commit comments

Comments
 (0)