Initial commit
This commit is contained in:
@@ -0,0 +1,49 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2020 Stalwart Labs LLC <[email protected]>
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0 OR MIT
|
||||
*/
|
||||
|
||||
#![allow(dead_code, unused_imports)]
|
||||
|
||||
pub mod baikal;
|
||||
pub mod cyrus;
|
||||
pub mod data;
|
||||
pub mod dav_client;
|
||||
pub mod dovecot;
|
||||
pub mod error;
|
||||
pub mod imap_client;
|
||||
pub mod layouts;
|
||||
pub mod radicale;
|
||||
pub mod sieve_client;
|
||||
pub mod stalwart;
|
||||
pub mod validate;
|
||||
pub mod webdav;
|
||||
|
||||
pub use error::{ContainerError, ContainerResult};
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct Endpoint {
|
||||
pub host: String,
|
||||
pub port: u16,
|
||||
}
|
||||
|
||||
impl Endpoint {
|
||||
pub fn new(host: impl Into<String>, port: u16) -> Self {
|
||||
Self {
|
||||
host: host.into(),
|
||||
port,
|
||||
}
|
||||
}
|
||||
|
||||
pub fn http_base(&self) -> String {
|
||||
format!("http://{}:{}", self.host, self.port)
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct Account {
|
||||
pub username: String,
|
||||
pub password: String,
|
||||
pub layout: layouts::Layout,
|
||||
}
|
||||
Reference in New Issue
Block a user