Skip to content

Commit d327d15

Browse files
committed
Added VirtualHostId
Signed-off-by: cafalchio <mcafalchio@gmail.com>
1 parent 02ac728 commit d327d15

1 file changed

Lines changed: 8 additions & 7 deletions

File tree

crates/contextforge-data-plane-apis/src/user_store.rs

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,13 @@ use std::collections::HashMap;
33
use schemars::JsonSchema;
44
use serde::{Deserialize, Serialize};
55

6+
pub type DownstreamBackendName = String;
7+
pub type DownstreamToolName = String;
8+
pub type DownstreamResourceName = String;
9+
pub type DownstreamResourceTemplateName = String;
10+
pub type DownstreamPromptName = String;
11+
pub type VirtualHostId = String;
12+
613
#[derive(Debug, Clone, Deserialize, Serialize, JsonSchema, Default)]
714
pub enum IntegrationType {
815
#[serde(rename = "REST")]
@@ -37,12 +44,6 @@ pub struct ServiceRoute {
3744
pub upstream_name: String,
3845
}
3946

40-
pub type DownstreamBackendName = String;
41-
pub type DownstreamToolName = String;
42-
pub type DownstreamResourceName = String;
43-
pub type DownstreamResourceTemplateName = String;
44-
pub type DownstreamPromptName = String;
45-
4647
#[derive(Debug, Clone, Deserialize, Serialize, JsonSchema)]
4748
pub struct VirtualHost {
4849
pub backends: HashMap<DownstreamBackendName, BackendMCPGateway>,
@@ -58,5 +59,5 @@ pub struct VirtualHost {
5859

5960
#[derive(Debug, Clone, Deserialize, Serialize, JsonSchema)]
6061
pub struct UserConfig {
61-
pub virtual_hosts: HashMap<String, VirtualHost>,
62+
pub virtual_hosts: HashMap<VirtualHostId, VirtualHost>,
6263
}

0 commit comments

Comments
 (0)