Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
90 changes: 33 additions & 57 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
// compiling protos using path on build time
.compile_protos(
&[
"proto/wireguard/gateway.proto",
"proto/enterprise/firewall/firewall.proto",
"proto/v2/wireguard/gateway.proto",
"proto/enterprise/v2/firewall/firewall.proto",
],
&["proto/wireguard", "proto/enterprise/firewall"],
&["proto"],
)?;
println!("cargo:rerun-if-changed=proto");
Ok(())
Expand Down
12 changes: 6 additions & 6 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 21 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,32 @@ pub mod gateway;
pub mod server;
mod version;

pub mod generated {
pub mod defguard {
pub mod gateway {
pub mod v2 {

tonic::include_proto!("defguard.gateway.v2");
}
}
pub mod enterprise {
pub mod firewall {
pub mod v2 {

tonic::include_proto!("defguard.enterprise.firewall.v2");
}
}
}
}
}

pub mod proto {
pub mod gateway {
tonic::include_proto!("gateway");
pub use crate::generated::defguard::gateway::v2::*;
}
pub mod enterprise {
pub mod firewall {
tonic::include_proto!("enterprise.firewall");
pub use crate::generated::defguard::enterprise::firewall::v2::*;
}
}
}
Expand Down
Loading