Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 0 additions & 48 deletions .dockerignore

This file was deleted.

27 changes: 0 additions & 27 deletions Dockerfile

This file was deleted.

6 changes: 0 additions & 6 deletions core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,10 @@ crate-type = ["cdylib", "rlib"]
test = true

[dependencies]
anyhow = "1.0.65"
bson = { features = ["chrono-0_4", "serde_with", "uuid-0_8"], version = "2.4.0" }
chrono = "0.4.22"
config = "0.13.2"
futures = "0.3.24"
glob = "0.3.0"
hex = "0.4.3"
log = "0.4.17"
nom = "7.1.1"
rand = { features = ["serde1"], version = "0.8.5" }
ring = "0.16.20"
serde = { features = ["derive"], version = "1.0.147" }
serde_json = "1.0.87"
Expand Down
File renamed without changes.
File renamed without changes.
15 changes: 0 additions & 15 deletions core/src/core/mod.rs

This file was deleted.

File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
Description:
... Summary ...
*/
use crate::{data::models::EventModel, BsonOid, Timestamp};
use super::payload::EventModel;
use crate::{BsonOid, Timestamp};
use serde::{Deserialize, Serialize};

pub trait EventSpec {
Expand Down
5 changes: 3 additions & 2 deletions core/src/core/events/mod.rs → core/src/events/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@
Description:
... Summary ...
*/
pub use self::{event::*, variants::*};
pub use self::{event::*, payload::*, variants::*};

pub(crate) mod event;
mod variants;
pub(crate) mod payload;
pub(crate) mod variants;

#[cfg(test)]
mod tests {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
/*
Appellation: events <module>
Appellation: payload <events>
Contributors: FL03 <jo3mccain@icloud.com> (https://gitlab.com/FL03)
Description:
... Summary ...
*/
use crate::{BsonOid, Timestamp};
use crate::Timestamp;
use bson::oid::ObjectId;
use serde::{Deserialize, Serialize};

#[derive(Clone, Debug, Default, Deserialize, Eq, Hash, PartialEq, Serialize)]
pub struct EventModel {
pub id: BsonOid,
pub id: ObjectId,
pub created: Timestamp,
pub dispersed: Timestamp,
pub data: Vec<String>,
Expand Down
File renamed without changes.
12 changes: 7 additions & 5 deletions core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,11 @@
*/
#![allow(unused_imports)]
#[doc(inline)]
pub use self::core::*;
pub use self::{misc::*, times::*};

pub mod actors;
pub mod components;
pub(crate) mod core;
pub mod data;
pub mod contexts;
pub mod errors;
pub mod events;
pub(crate) mod misc;
pub mod states;
pub(crate) mod times;
10 changes: 10 additions & 0 deletions core/src/misc/mod.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/*
Appellation: core <module>
Creator: FL03 <jo3mccain@icloud.com>
Description: ... Summary ...
*/
#[doc(inline)]
pub use self::{primitives::*, utils::*};

pub(crate) mod primitives;
pub(crate) mod utils;
File renamed without changes.
1 change: 0 additions & 1 deletion core/src/core/utils.rs → core/src/misc/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
... Summary ...
*/
pub use self::{configure::*, files::*};
pub use crate::actors::{extract::utils::*, generate::utils::*, handlers::utils::*};
pub use crate::times::utils::*;

pub(crate) mod configure {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
Description:
... Summary ...
*/
use crate::{ChronoDateTime, chrono_datetime_now, chrono_into_bson};
use crate::{chrono_datetime_now, chrono_into_bson, ChronoDateTime};
use chrono::Utc;
use serde::{Deserialize, Serialize};

Expand Down
2 changes: 1 addition & 1 deletion crypto/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ itertools = "0.10.5"
rand = "0.8.5"
ring = "0.16.20"
serde = { features = ["derive"], version = "1.0.147" }
serde_json = "1.0.87"
serde_json = "1.0.87"
sha2 = "0.10.6"
typenum = "1.15.0"

Expand Down
31 changes: 18 additions & 13 deletions scsys/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,25 +20,30 @@ crypto = ["scsys-crypto"]
derive = ["scsys-derive"]
macros = ["scsys-macros"]

extras = ["anyhow", "bson", "chrono", "config", "rand", "ring"]
anyhow = ["anyhow/default"]
bson = ["bson/default", "bson/chrono-0_4", "bson/serde_with", "bson/uuid-0_8"]
chrono = ["chrono/default"]
config = ["config/default"]
rand = ["rand/default"]
ring = ["ring/default"]
extras = []

[lib]
crate-type = ["cdylib", "rlib"]
test = true

[dependencies]
anyhow = { optional = true, features = ["default"], version = "1.0.65" }
bson = { features = ["chrono-0_4", "serde_with", "uuid-0_8"], optional = true, version = "2.4.0" }
chrono = { optional = true, version = "0.4.22" }
config = { optional = true, version = "0.13.2" }
rand = { optional = true, version = "0.8.5" }
ring = { optional = true, version = "0.16.20" }
anyhow = "1.0.65"
bson = { features = ["chrono-0_4", "serde_with", "uuid-0_8"], version = "2.4.0" }
chrono = "0.4.22"
config = "0.13.2"
futures = "0.3.24"
glob = "0.3.0"
hex = "0.4.3"
log = "0.4.17"
nom = "7.1.1"
rand = { features = ["getrandom", "serde1"], version = "0.8.5" }
ring = "0.16.20"
serde = { features = ["derive"], version = "1.0.147" }
serde_json = "1.0.87"
strum = { features = ["derive"], version = "0.24.1" }
tracing = "0.1.36"
tracing-subscriber = "0.3.15"
url = "2.3.1"

[dependencies.scsys-core]
optional = true
Expand Down
4 changes: 2 additions & 2 deletions core/src/actors/actor.rs → scsys/src/actors/actor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
Description:
... Summary ...
*/
use crate::components::identities::Appellation;
use crate::{components::identities::Appellation, core::BoxResult};

pub trait Transformation<S> {
fn data(&self) -> Vec<S>;
fn transform<T>(&self, catalyst: fn(&S) -> T) -> crate::BoxResult<Vec<T>> {
fn transform<T>(&self, catalyst: fn(&S) -> T) -> BoxResult<Vec<T>> {
let res = self.data().iter().map(|i| catalyst(i)).collect::<Vec<_>>();
Ok(res)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Appellation: configuration <module>
Contributors: FL03 <jo3mccain@icloud.com> (https://gitlab.com/FL03)
*/
use crate::{collect_config_files, DefaultConfigBuilder};
use crate::core::{collect_config_files, DefaultConfigBuilder};

use config::{Config, ConfigError};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
Appellation: configurations <module>
Contributors: FL03 <jo3mccain@icloud.com> (https://gitlab.com/FL03)
*/

pub use self::configure::AppConfig;

mod configure;
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
Description:
... Summary ...
*/
use crate::{generate_random_string, Timestamp};
use super::generate_random_string;
use crate::core::Timestamp;
use serde::{Deserialize, Serialize};

#[derive(Clone, Debug, Deserialize, Eq, Hash, PartialEq, Serialize)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
Description:
... Summary ...
*/
use crate::generate_random_number;
use super::generate_random_number;
use rand::{distributions, prelude::Distribution};
use serde::{Deserialize, Serialize};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
Description:
... Summary ...
*/
pub use self::{alphabet::*, digits::*};
pub use self::{alphabet::*, digits::*, utils::*};

mod alphabet;
mod digits;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,16 @@
Description:
... Summary ...
*/
use crate::core::BoxResult;

#[derive(Clone, Debug, Eq, Hash, PartialEq, serde::Deserialize, serde::Serialize)]
pub struct FileHandler {
pub path: String,
}

impl FileHandler {
fn constructor(path: String) -> Result<Self, crate::BoxError> {
Ok(Self { path })
}
pub fn new(path: String) -> Self {
match Self::constructor(path) {
Ok(v) => v,
Err(e) => panic!("FileHandler Error: {}", e),
}
Self { path }
}
}

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
Description:
... Summary ...
*/
use crate::BsonOid;
use crate::core::BsonOid;
use serde::{Deserialize, Serialize};
use strum::{EnumString, EnumVariantNames};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ pub(crate) mod ids;

pub(crate) mod interface {
use super::Id;
use crate::times::Timestamp;
use crate::core::Timestamp;
use serde_json::Value;

pub trait Identitfiable {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
Description:
... Summary ...
*/
use crate::Timestamp;
use crate::core::Timestamp;
use bson::oid::ObjectId;
use serde::{Deserialize, Serialize};

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
Description:
... Summary ...
*/
use crate::core::Result;
use serde::{Deserialize, Serialize};

#[derive(Clone, Debug, Default, Deserialize, Eq, Hash, PartialEq, Serialize)]
Expand All @@ -22,7 +23,7 @@ impl S3Credential {
pub fn from_env(
access: Option<&str>,
secret: Option<&str>,
) -> crate::Result<Self, std::env::VarError> {
) -> Result<Self, std::env::VarError> {
let access = match access {
Some(v) => std::env::var(v),
None => std::env::var("S3_ACCESS_KEY"),
Expand Down Expand Up @@ -54,7 +55,7 @@ impl S3Region {
pub fn from_env(
endpoint: Option<&str>,
region: Option<&str>,
) -> crate::Result<Self, std::env::VarError> {
) -> Result<Self, std::env::VarError> {
let endpoint = match endpoint {
Some(v) => std::env::var(v),
None => std::env::var("S3_ENDPOINT"),
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading