1 Commits
0.1 ... 0.1.1

Author SHA1 Message Date
caf17a7254 change dependencies to be more sharable 2026-01-14 12:01:09 +00:00
6 changed files with 19 additions and 13 deletions

6
Cargo.lock generated
View File

@@ -588,7 +588,7 @@ dependencies = [
[[package]]
name = "dns-comunications"
version = "0.1.1"
source = "git+ssh://git@rochegmr.com/groche97/dns_manager.git#f2e6d7102d4804568bfa1882bf8eabe9ac0105a9"
source = "git+https://rochegmr.com/git/groche97/dns_manager.git#f2e6d7102d4804568bfa1882bf8eabe9ac0105a9"
dependencies = [
"base64 0.21.7",
"dns-config",
@@ -598,7 +598,7 @@ dependencies = [
[[package]]
name = "dns-config"
version = "0.1.1"
source = "git+ssh://git@rochegmr.com/groche97/dns_manager.git#f2e6d7102d4804568bfa1882bf8eabe9ac0105a9"
source = "git+https://rochegmr.com/git/groche97/dns_manager.git#f2e6d7102d4804568bfa1882bf8eabe9ac0105a9"
dependencies = [
"toml",
]
@@ -620,7 +620,7 @@ dependencies = [
[[package]]
name = "dns_manager"
version = "0.1.1"
source = "git+ssh://git@rochegmr.com/groche97/dns_manager.git#f2e6d7102d4804568bfa1882bf8eabe9ac0105a9"
source = "git+https://rochegmr.com/git/groche97/dns_manager.git#f2e6d7102d4804568bfa1882bf8eabe9ac0105a9"
dependencies = [
"dns-comunications",
"dns-config",

View File

@@ -16,7 +16,7 @@ serde = "*"
serde_json = "*"
fallible-iterator = "*"
toml = "0.9"
dns_manager = { git = "ssh://git@rochegmr.com/groche97/dns_manager.git"}
dns_manager = { git = "https://rochegmr.com/git/groche97/dns_manager.git"}
[target.x86_64-unknown-linux-gnu]
rustflags = [

View File

@@ -1,12 +1,18 @@
use crate::controller::Controller;
impl Controller {
pub async fn add_domain_to_dns(&self, domain: &str) -> Result<(), Box<dyn std::error::Error>> {
pub(in crate::controller) async fn add_domain_to_dns(
&self,
domain: &str,
) -> Result<(), Box<dyn std::error::Error>> {
self.dns_manager.add_domain(domain, self.pub_addr).await?;
Ok(())
}
pub async fn del_domain_to_dns(&self, domain: &str) -> Result<(), Box<dyn std::error::Error>> {
pub(in crate::controller) async fn del_domain_to_dns(
&self,
domain: &str,
) -> Result<(), Box<dyn std::error::Error>> {
self.dns_manager.del_domain(domain).await?;
Ok(())
}

View File

@@ -6,7 +6,7 @@ use crate::{
};
impl Controller {
pub async fn load_container(
pub(in crate::controller) async fn load_container(
&self,
docker_id: Option<String>,
domain: String,
@@ -31,7 +31,7 @@ impl Controller {
self.started
}
pub async fn prune_given_container(
pub(in crate::controller) async fn prune_given_container(
&self,
container: Container,
) -> Result<String, Box<dyn Error>> {
@@ -41,7 +41,7 @@ impl Controller {
}
}
pub async fn stop_given_container(
pub(in crate::controller) async fn stop_given_container(
&self,
container: Container,
) -> Result<String, bollard::errors::Error> {

View File

@@ -6,7 +6,7 @@ use crate::{
use log::error;
impl Controller {
pub async fn load_container_and_bind(
pub(in crate::controller) async fn load_container_and_bind(
&self,
docker_id: Option<String>,
domain: String,
@@ -39,7 +39,7 @@ impl Controller {
}
}
pub async fn start_container_from_instance(&self, instance: Instance) {
pub(in crate::controller) async fn start_container_from_instance(&self, instance: Instance) {
let image = match self
.storage
.lock()

View File

@@ -1,7 +1,7 @@
use crate::{controller::Controller, mcproxy_client};
impl Controller {
pub async fn bind_container_in_proxy(
pub(in crate::controller) async fn bind_container_in_proxy(
&self,
domain: &str,
ip: &str,
@@ -12,7 +12,7 @@ impl Controller {
Ok(())
}
pub async fn unbind_container_in_proxy(
pub(in crate::controller) async fn unbind_container_in_proxy(
&self,
domain: &str,
) -> Result<(), Box<dyn std::error::Error>> {