Web API, Web UI #86

Merged
projectmoon merged 37 commits from web-api into master 2021-07-15 15:04:54 +00:00
3 changed files with 105 additions and 551 deletions
Showing only changes of commit 7a59e6246f - Show all commits

648
Cargo.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -9,13 +9,10 @@ log = "0.4"
tracing-subscriber = "0.2" tracing-subscriber = "0.2"
tonic = { version = "0.4" } tonic = { version = "0.4" }
prost = "0.7" prost = "0.7"
once_cell = "1.7"
tenebrous-rpc = { path = "../rpc" } tenebrous-rpc = { path = "../rpc" }
juniper = { git = "https://github.com/graphql-rust/juniper", branch = "master" } juniper = { git = "https://github.com/graphql-rust/juniper", branch = "master" }
juniper_rocket_async = { git = "https://github.com/graphql-rust/juniper", branch = "master" } juniper_rocket_async = { git = "https://github.com/graphql-rust/juniper", branch = "master" }
rocket = { git = "https://github.com/SergioBenitez/Rocket", branch = "master" } rocket = { git = "https://github.com/SergioBenitez/Rocket", branch = "master" }
warp = "0.2"
#tokio-stream = { version = "0.1", features = ["net"] } # needed for grpc-web?
# [dependencies.tokio] # [dependencies.tokio]
# version = "1" # version = "1"

View File

@ -1,12 +1,9 @@
use juniper::{ use juniper::{
graphql_object, EmptyMutation, EmptySubscription, FieldError, FieldResult, GraphQLInputObject, graphql_object, EmptyMutation, EmptySubscription, FieldResult, GraphQLInputObject,
GraphQLObject, RootNode, GraphQLObject, RootNode,
}; };
use once_cell::sync::OnceCell;
use rocket::{response::content, Rocket, State}; use rocket::{response::content, Rocket, State};
use std::cell::RefCell;
use std::env; use std::env;
use std::sync::{Arc, RwLock};
use tenebrous_rpc::protos::dicebot::dicebot_client::DicebotClient; use tenebrous_rpc::protos::dicebot::dicebot_client::DicebotClient;
use tenebrous_rpc::protos::dicebot::GetVariableRequest; use tenebrous_rpc::protos::dicebot::GetVariableRequest;
use tonic::{metadata::MetadataValue, transport::Channel as TonicChannel, Request as TonicRequest}; use tonic::{metadata::MetadataValue, transport::Channel as TonicChannel, Request as TonicRequest};