Skip to content

Commit

Permalink
chore: rename lib/types -> lib/types-proto
Browse files Browse the repository at this point in the history
  • Loading branch information
MasterPtato committed Jul 12, 2024
1 parent b4f9d73 commit 3aa4d70
Show file tree
Hide file tree
Showing 40 changed files with 59 additions and 57 deletions.
2 changes: 1 addition & 1 deletion lib/api-helper/build/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ tracing-subscriber = { version = "0.3", default-features = false, features = [
"json",
"ansi",
] }
types = { path = "../../types/core" }
types-proto = { path = "../../types-proto/core" }
url = "2.2.2"
uuid = { version = "1", features = ["v4"] }

Expand Down
2 changes: 1 addition & 1 deletion lib/api-helper/build/src/ctx.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use std::net::IpAddr;

use chirp_workflow::ctx::ApiCtx;
use rivet_operation::OperationContext;
use types::rivet::backend;
use types_proto::rivet::backend;
use url::Url;

use crate::auth;
Expand Down
2 changes: 1 addition & 1 deletion lib/cache/build/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ serde_json = "1.0"
thiserror = "1.0"
tokio = { version = "1.29", features = ["full"] }
tracing = "0.1"
types = { path = "../../types/core" }
types-proto = { path = "../../types-proto/core" }
uuid = { version = "1", features = ["v4"] }

[dependencies.redis]
Expand Down
2 changes: 1 addition & 1 deletion lib/chirp/client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ thiserror = "1.0"
tokio = { version = "1.29", features = ["full"] }
tokio-util = "0.7"
tracing = "0.1"
types = { path = "../../types/core" }
types-proto = { path = "../../types-proto/core" }
urlencoding = "2.1"
uuid = { version = "1", features = ["v4"] }

Expand Down
2 changes: 1 addition & 1 deletion lib/chirp/client/src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ use rivet_util::Backoff;
use tokio::task::JoinSet;
use tokio_util::sync::{CancellationToken, DropGuard};
use tracing::Instrument;
use types::rivet::chirp;
use types_proto::rivet::chirp;
use uuid::Uuid;

use crate::{
Expand Down
2 changes: 1 addition & 1 deletion lib/chirp/client/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ pub mod prelude;
pub mod redis_keys;

pub use client::*;
pub use types::rivet::chirp::{RequestDebug, RunContext, TraceEntry};
pub use types_proto::rivet::chirp::{RequestDebug, RunContext, TraceEntry};
8 changes: 4 additions & 4 deletions lib/chirp/client/src/message.rs
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,9 @@ where
#[tracing::instrument(skip(buf))]
pub(crate) fn decode_inner(
buf: &[u8],
) -> Result<(types::rivet::chirp::Message, Vec<TraceEntry>), ClientError> {
) -> Result<(types_proto::rivet::chirp::Message, Vec<TraceEntry>), ClientError> {
// Decode the message and trace
let message = <types::rivet::chirp::Message as prost::Message>::decode(buf)
let message = <types_proto::rivet::chirp::Message as prost::Message>::decode(buf)
.map_err(ClientError::DecodeMessage)?;

let trace = message
Expand Down Expand Up @@ -167,10 +167,10 @@ impl TraceEntry {
}
}

impl TryFrom<types::rivet::chirp::TraceEntry> for TraceEntry {
impl TryFrom<types_proto::rivet::chirp::TraceEntry> for TraceEntry {
type Error = ClientError;

fn try_from(value: types::rivet::chirp::TraceEntry) -> Result<Self, ClientError> {
fn try_from(value: types_proto::rivet::chirp::TraceEntry) -> Result<Self, ClientError> {
Ok(TraceEntry {
context_name: value.context_name.clone(),
req_id: value
Expand Down
2 changes: 1 addition & 1 deletion lib/chirp/perf/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ license = "Apache-2.0"
[dependencies]
lazy_static = "1.4"
prost = "0.10"
types = { path = "../../types/core" }
types-proto = { path = "../../types-proto/core" }
rivet-metrics = { path = "../../metrics" }
rivet-pools = { path = "../../pools" }
thiserror = "1.0"
Expand Down
2 changes: 1 addition & 1 deletion lib/chirp/perf/src/ctx.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use std::{
use rivet_pools::prelude::*;
use tokio::sync::RwLock;
use tracing::Instrument;
use types::rivet::perf;
use types_proto::rivet::perf;
use uuid::Uuid;

#[derive(thiserror::Error, Debug)]
Expand Down
2 changes: 1 addition & 1 deletion lib/chirp/worker/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ serde_json = "1.0"
thiserror = "1.0"
tokio = { version = "1.29", features = ["full", "tracing"] }
tracing = "0.1"
types = { path = "../../types/core" }
types-proto = { path = "../../types-proto/core" }
tracing-subscriber = { version = "0.3", optional = true, default-features = false, features = [
"fmt",
"json",
Expand Down
2 changes: 1 addition & 1 deletion lib/chirp/worker/src/manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ use rivet_pools::prelude::*;
use rivet_util::CleanExit;
use tokio::time;
use tracing::Instrument;
use types::rivet::chirp;
use types_proto::rivet::chirp;

use crate::{
config::{Config, WorkerKind},
Expand Down
2 changes: 1 addition & 1 deletion lib/chirp/worker/src/prelude.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,4 @@ pub use thiserror;
pub use tokio;
#[doc(hidden)]
pub use tracing;
pub use types::{self, rivet as proto, rivet::common};
pub use types_proto::{self, rivet as proto, rivet::common};
2 changes: 1 addition & 1 deletion lib/claims/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ license = "Apache-2.0"
base64 = "0.13"
jsonwebtoken = "8.2.0"
global-error = { path = "../global-error" }
types = { path = "../types/core" }
types-proto = { path = "../types-proto/core" }
lazy_static = "1.4"
prost = "0.10"
rivet-util = { path = "../util/core" }
Expand Down
2 changes: 1 addition & 1 deletion lib/claims/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use jsonwebtoken::{Algorithm, DecodingKey};
use prost::Message;

mod schema {
pub use types::rivet::{backend, claims::*};
pub use types_proto::rivet::{backend, claims::*};
}

pub const ALGORITHM: Algorithm = Algorithm::EdDSA;
Expand Down
2 changes: 1 addition & 1 deletion lib/convert/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ rivet-operation = { path = "../operation/core" }
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
chrono = "0.4"
types = { path = "../types/core" }
types-proto = { path = "../types-proto/core" }
util-mm = { package = "rivet-util-mm", path = "../../svc/pkg/mm/util" }

cdn-namespace-get = { path = "../../svc/pkg/cdn/ops/namespace-get" }
Expand Down
2 changes: 1 addition & 1 deletion lib/convert/src/convert/game.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use rivet_api::models;
use rivet_operation::prelude::*;
use types::rivet::backend;
use types_proto::rivet::backend;

use crate::{convert, fetch, ApiTryInto};

Expand Down
2 changes: 1 addition & 1 deletion lib/convert/src/convert/group.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use std::convert::TryInto;

use rivet_api::models;
use rivet_operation::prelude::*;
use types::rivet::backend::{self, pkg::*};
use types_proto::rivet::backend::{self, pkg::*};

use crate::ApiInto;

Expand Down
2 changes: 1 addition & 1 deletion lib/convert/src/convert/identity.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use rivet_api::models;
use rivet_operation::prelude::*;
use types::rivet::{
use types_proto::rivet::{
backend::{self, pkg::*},
common,
};
Expand Down
2 changes: 1 addition & 1 deletion lib/convert/src/convert/mod.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// This module converts proto data information into smithy models. It's important to separate fetching
// from building models so that we can convert already existing data without having to re-fetch it.
use rivet_operation::prelude::*;
use types::rivet::backend;
use types_proto::rivet::backend;

pub mod game;
pub mod group;
Expand Down
2 changes: 1 addition & 1 deletion lib/convert/src/fetch/game.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use std::collections::HashMap;

use rivet_api::models;
use rivet_operation::prelude::*;
use types::rivet::{
use types_proto::rivet::{
backend::{self, pkg::*},
common,
};
Expand Down
6 changes: 3 additions & 3 deletions lib/global-error/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ edition = "2021"
license = "Apache-2.0"

[features]
protobuf-src = ["types/protobuf-src"]
chirp = ["types"]
protobuf-src = ["types-proto/protobuf-src"]
chirp = ["types-proto"]

[dependencies]
async-trait = "0.1"
formatted-error = { path = "../formatted-error" }
types = { path = "../types/core", optional = true }
types-proto = { path = "../types-proto/core", optional = true }
http = "0.2"
reqwest = "0.11"
serde = { version = "1.0", features = ["derive"] }
Expand Down
2 changes: 1 addition & 1 deletion lib/global-error/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use std::{collections::HashMap, fmt::Display};
use http::StatusCode;
use serde::Serialize;
#[cfg(feature = "chirp")]
use types::rivet::chirp;
use types_proto::rivet::chirp;

pub type GlobalResult<T> = Result<T, GlobalError>;

Expand Down
2 changes: 1 addition & 1 deletion lib/operation/core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ serde_json = "1.0"
thiserror = "1.0"
tokio = { version = "1.29", features = ["full", "tracing"] }
tracing = "0.1"
types = { path = "../../types/core" }
types-proto = { path = "../../types-proto/core" }
2 changes: 1 addition & 1 deletion lib/operation/core/src/prelude.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,6 @@ pub use thiserror;
pub use tokio;
#[doc(hidden)]
pub use tracing;
pub use types::{self, rivet as proto, rivet::common};
pub use types_proto::{self, rivet as proto, rivet::common};

pub use crate::OperationContext;
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "types-build"
name = "types-proto-build"
version = "0.1.0"
edition = "2021"
authors = ["Rivet Gaming, LLC <developer@rivet.gg>"]
Expand Down
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions lib/types/core/Cargo.toml → lib/types-proto/core/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
[package]
name = "types"
name = "types-proto"
version = "0.1.0"
edition = "2021"
authors = ["Rivet Gaming, LLC <developer@rivet.gg>"]
license = "Apache-2.0"

[features]
protobuf-src = ["types-build/protobuf-src"]
protobuf-src = ["types-proto-build/protobuf-src"]

[dependencies]
chirp-types = { path = "../../chirp/types" }
Expand All @@ -19,4 +19,4 @@ thiserror = "1.0"
http = "0.2"

[build-dependencies]
types-build = { path = "../build" }
types-proto-build = { path = "../build" }
4 changes: 2 additions & 2 deletions lib/types/core/build.rs → lib/types-proto/core/build.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use types_build;
use types_proto_build;

fn main() -> std::io::Result<()> {
// Build schema
types_build::compile()
types_proto_build::compile()
}
File renamed without changes.
2 changes: 1 addition & 1 deletion lib/util/core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ tokio = { version = "1.29", default-features = false, features = [
"test-util",
"macros",
] }
types = { path = "../../types/core" }
types-proto = { path = "../../types-proto/core" }
uuid = { version = "1", features = ["v4", "serde"] }

aws-smithy-client = "^0.41.0"
Expand Down
2 changes: 1 addition & 1 deletion lib/util/core/src/glob.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use std::{

use global_error::prelude::*;
use regex;
use types::rivet::common;
use types_proto::rivet::common;

#[derive(Debug, Clone, PartialEq, Eq, Hash)]
pub enum GlobToken {
Expand Down
2 changes: 1 addition & 1 deletion lib/util/core/src/route.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use types::rivet::backend;
use types_proto::rivet::backend;
use uuid::Uuid;
use global_error::prelude::*;

Expand Down
2 changes: 1 addition & 1 deletion lib/util/env/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ serde = { version = "1.0.193", features = ["derive"] }
serde_json = "1.0.109"
thiserror = "1.0"
uuid = { version = "1", features = ["v4"] }
types = { path = "../../types/core" }
types-proto = { path = "../../types-proto/core" }
4 changes: 2 additions & 2 deletions lib/util/env/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,11 +108,11 @@ pub fn support_deprecated_subdomains() -> bool {
*SUPPORT_DEPRECATED_SUBDOMAINS
}

pub fn test_id_param() -> Vec<types::rivet::backend::job::Parameter> {
pub fn test_id_param() -> Vec<types_proto::rivet::backend::job::Parameter> {
TEST_ID
.as_ref()
.iter()
.map(|x| types::rivet::backend::job::Parameter {
.map(|x| types_proto::rivet::backend::job::Parameter {
key: "rivet_test_id".to_string(),
value: x.to_string(),
})
Expand Down
Loading

0 comments on commit 3aa4d70

Please sign in to comment.