Plugin
This commit is contained in:
@@ -2,7 +2,7 @@
|
|||||||
use std::path::PathBuf;
|
use std::path::PathBuf;
|
||||||
|
|
||||||
pub mod general;
|
pub mod general;
|
||||||
pub mod strategy;
|
pub mod plugin;
|
||||||
pub mod terminal;
|
pub mod terminal;
|
||||||
pub mod units;
|
pub mod units;
|
||||||
|
|
||||||
@@ -10,7 +10,7 @@ pub mod prelude {
|
|||||||
pub use crate::PulseWire;
|
pub use crate::PulseWire;
|
||||||
pub use crate::general::*;
|
pub use crate::general::*;
|
||||||
pub use crate::server_path;
|
pub use crate::server_path;
|
||||||
pub use crate::strategy::*;
|
pub use crate::plugin::*;
|
||||||
pub use crate::terminal::*;
|
pub use crate::terminal::*;
|
||||||
pub use crate::units::*;
|
pub use crate::units::*;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
use crate::{
|
use crate::{
|
||||||
PulseWire,
|
PulseWire,
|
||||||
general::{EventLog, MarketTrend, Position, Signal},
|
general::{EventLog, MarketTrend, Position, Signal},
|
||||||
strategy::{RiskManifest, StrategyManifest},
|
plugin::{RiskManifest, StrategyManifest},
|
||||||
units::{Symbol, TimeFrame, USD, Volatility},
|
units::{Symbol, TimeFrame, USD, Volatility},
|
||||||
};
|
};
|
||||||
use pulse_macros::pwp;
|
use pulse_macros::pwp;
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ use std::path::PathBuf;
|
|||||||
|
|
||||||
pub mod accounts;
|
pub mod accounts;
|
||||||
pub mod config;
|
pub mod config;
|
||||||
|
pub mod plugin;
|
||||||
|
|
||||||
pub fn home_dir() -> tokio::io::Result<PathBuf> {
|
pub fn home_dir() -> tokio::io::Result<PathBuf> {
|
||||||
std::env::home_dir().ok_or_else(|| {
|
std::env::home_dir().ok_or_else(|| {
|
||||||
@@ -13,6 +14,14 @@ pub fn pulse_directory() -> tokio::io::Result<PathBuf> {
|
|||||||
Ok(home_dir()?.join(".config").join("pulse-trader"))
|
Ok(home_dir()?.join(".config").join("pulse-trader"))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn pulse_plugins_directory() -> tokio::io::Result<PathBuf> {
|
||||||
|
Ok(pulse_directory()?.join("plugins"))
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn pulse_plugin(id: &str) -> tokio::io::Result<PathBuf> {
|
||||||
|
Ok(pulse_directory()?.join("plugins").join(id))
|
||||||
|
}
|
||||||
|
|
||||||
pub fn pulse_config_file() -> tokio::io::Result<PathBuf> {
|
pub fn pulse_config_file() -> tokio::io::Result<PathBuf> {
|
||||||
Ok(pulse_directory()?.join("config.toml"))
|
Ok(pulse_directory()?.join("config.toml"))
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
pub struct Plugin();
|
||||||
Reference in New Issue
Block a user