move clients

This commit is contained in:
mbecker20
2023-07-04 03:20:11 +00:00
parent 99c2d6195d
commit 2bf2901dcd
13 changed files with 40 additions and 6 deletions

View File

@@ -1,6 +1,5 @@
[workspace]
members = ["core", "periphery", "tests", "lib/*"]
exclude = ["lib/ts_client"]
members = ["core", "periphery", "tests", "client/rs", "lib/*"]
[workspace.package]
version = "1.0.0"
@@ -12,7 +11,7 @@ license = "GPL-3.0-or-later"
# local
monitor_macros = { path = "lib/macros" }
monitor_types = { path = "lib/types" }
monitor_client = { path = "lib/rs_client" }
monitor_client = { path = "client/rs" }
periphery_client = { path = "lib/periphery_client" }
monitor_periphery = { path = "periphery" }
# external

View File

@@ -95,6 +95,14 @@ pub enum ApiRequest {
// ACTIONS
RunBuild(RunBuild),
// ==== BUILDER ====
GetBuilder(GetBuilder),
ListBuilders(ListBuilders),
// CRUD
CreateBuilder(CreateBuilder),
DeleteBuilder(DeleteBuilder),
UpdateBuilder(UpdateBuilder),
// ==== REPO ====
GetRepo(GetRepo),
ListRepos(ListRepos),

View File

@@ -4,7 +4,7 @@ use typeshare::typeshare;
use crate::{
entities::{
build::{Build, PartialBuildConfig},
build::{Build, PartialBuildConfig, BuildActionState},
update::Update,
},
MongoDocument,
@@ -28,6 +28,15 @@ pub struct ListBuilds {
//
#[typeshare]
#[derive(Serialize, Deserialize, Debug, Clone, Request)]
#[response(BuildActionState)]
pub struct GetBuildActionState {
pub id: String,
}
//
#[typeshare]
#[derive(Serialize, Deserialize, Debug, Clone, Request)]
#[response(Build)]

View File

@@ -7,7 +7,7 @@ use typeshare::typeshare;
use crate::{
entities::{
deployment::{
Deployment, DockerContainerStats, PartialDeploymentConfig, TerminationSignal,
Deployment, DockerContainerStats, PartialDeploymentConfig, TerminationSignal, DeploymentActionState,
},
update::{Log, Update},
},
@@ -71,6 +71,15 @@ pub struct GetDeploymentStats {
//
#[typeshare]
#[derive(Serialize, Deserialize, Debug, Clone, Request)]
#[response(DeploymentActionState)]
pub struct GetDeploymentActionState {
pub id: String,
}
//
#[typeshare]
#[derive(Serialize, Deserialize, Debug, Clone, Request)]
#[response(Deployment)]

View File

@@ -4,7 +4,7 @@ use typeshare::typeshare;
use crate::{
entities::{
repo::{PartialRepoConfig, Repo},
repo::{PartialRepoConfig, Repo, RepoActionState},
update::Update,
},
MongoDocument,
@@ -30,6 +30,15 @@ pub struct ListRepos {
//
#[typeshare]
#[derive(Serialize, Deserialize, Debug, Clone, Request)]
#[response(RepoActionState)]
pub struct GetRepoActionState {
pub id: String,
}
//
#[typeshare]
#[derive(Serialize, Deserialize, Debug, Clone, Request)]
#[response(Repo)]