mirror of
https://github.com/pfzetto/rebacs
synced 2024-11-23 03:32:49 +01:00
renamed proto file
This commit is contained in:
parent
0e6eb1668c
commit
47ab190761
8 changed files with 20 additions and 40 deletions
28
Cargo.lock
generated
28
Cargo.lock
generated
|
@ -571,20 +571,6 @@ version = "2.2.0"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "478c572c3d73181ff3c2539045f6eb99e5491218eae919370993b890cdbdd98e"
|
||||
|
||||
[[package]]
|
||||
name = "permission"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"dotenvy",
|
||||
"log",
|
||||
"pretty_env_logger",
|
||||
"prost",
|
||||
"serde",
|
||||
"tokio",
|
||||
"tonic",
|
||||
"tonic-build",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "petgraph"
|
||||
version = "0.6.3"
|
||||
|
@ -988,6 +974,20 @@ dependencies = [
|
|||
"winapi-util",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "themis"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"dotenvy",
|
||||
"log",
|
||||
"pretty_env_logger",
|
||||
"prost",
|
||||
"serde",
|
||||
"tokio",
|
||||
"tonic",
|
||||
"tonic-build",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tokio"
|
||||
version = "1.27.0"
|
||||
|
|
2
build.rs
2
build.rs
|
@ -1,6 +1,6 @@
|
|||
fn main() {
|
||||
tonic_build::configure()
|
||||
.build_server(true)
|
||||
.compile(&["proto/graph.proto"], &["proto"])
|
||||
.compile(&["proto/themis.proto"], &["proto"])
|
||||
.unwrap();
|
||||
}
|
||||
|
|
|
@ -1,20 +0,0 @@
|
|||
syntax = "proto3";
|
||||
package eu.zettoit.graph;
|
||||
|
||||
message Object{
|
||||
string namespace = 1;
|
||||
string id = 2;
|
||||
}
|
||||
message ObjectSet{
|
||||
Object object = 1;
|
||||
string relation = 2;
|
||||
}
|
||||
|
||||
|
||||
message Relation{
|
||||
oneof src{
|
||||
Object object = 1;
|
||||
ObjectSet object_set = 2;
|
||||
}
|
||||
ObjectSet dst = 3;
|
||||
}
|
|
@ -1,5 +1,5 @@
|
|||
syntax = "proto3";
|
||||
package eu.zettoit.graph;
|
||||
package eu.zettoit.themis;
|
||||
|
||||
service ObjectService{
|
||||
rpc Create(Object) returns (Empty);
|
|
@ -1 +0,0 @@
|
|||
tonic::include_proto!("eu.zettoit.graph");
|
|
@ -6,7 +6,7 @@ use tokio::sync::Mutex;
|
|||
use tonic::{Request, Response, Status};
|
||||
|
||||
use crate::graph::{self, Graph, ObjectRelation};
|
||||
use crate::graph_permissions::{
|
||||
use crate::themis_proto::{
|
||||
object_service_server::ObjectService, query_service_server::QueryService, relation::Src,
|
||||
relation_service_server::RelationService, Empty, ExistsResponse, GetRelatedToResponse,
|
||||
GetRelationsRequest, GetRelationsResponse, IsRelatedToResponse, Object, Relation, Set,
|
||||
|
|
|
@ -10,10 +10,10 @@ use tokio::{
|
|||
use tonic::transport::Server;
|
||||
|
||||
pub mod graph;
|
||||
pub mod graph_permissions;
|
||||
pub mod grpc_service;
|
||||
pub mod themis_proto;
|
||||
|
||||
use crate::graph_permissions::{
|
||||
use crate::themis_proto::{
|
||||
object_service_server::ObjectServiceServer, query_service_server::QueryServiceServer,
|
||||
relation_service_server::RelationServiceServer,
|
||||
};
|
||||
|
|
1
src/themis_proto.rs
Normal file
1
src/themis_proto.rs
Normal file
|
@ -0,0 +1 @@
|
|||
tonic::include_proto!("eu.zettoit.themis");
|
Loading…
Reference in a new issue