Skip to content

Commit 348c194

Browse files
committed
listmonk: remove
1 parent 8eaca6a commit 348c194

File tree

13 files changed

+281
-504
lines changed

13 files changed

+281
-504
lines changed

Cargo.lock

Lines changed: 270 additions & 190 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,18 @@ version = "0.1.0"
44
edition = "2021"
55

66
[dependencies]
7-
tokio = { version = "1.37", default-features = false, features = ["macros", "rt-multi-thread", "net", "fs", "sync", "time"] }
7+
tokio = { version = "1.39", default-features = false, features = ["macros", "rt-multi-thread", "net", "fs", "sync", "time"] }
88
reqwest = { version = "0.12", features = ["json", "rustls-tls-webpki-roots"], default-features = false }
99
axum = { version = "0.7", default-features = false, features = ["tokio", "http1", "json", "query","macros"] }
1010
time = { version = "0.3", default-features = false, features = ["serde", "std", "formatting", "parsing"] }
1111
tracing-subscriber = { version = "0.3", default-features = false, features = ["fmt", "ansi"] }
1212
tower-http = { version = "0.5", default-features = false, features = ["cors", "fs"] }
1313
serde = { version = "1.0", default-features = false, features = ["derive", "rc"] }
1414
serde_yaml = { version = "0.9", default-features = false }
15-
clap = { version = "=4.4.18", features = ["derive", "env"] }
15+
clap = { version = "4.5", features = ["derive", "env"] }
1616
url = { version = "2.5", features = ["serde"], default-features = false }
1717
serde_json = { version = "1.0" }
18-
markdown = "1.0.0-alpha.17"
19-
email_address = "0.2"
18+
markdown = "1.0.0-alpha.19"
2019
async-trait = "0.1"
2120
tracing = "0.1"
2221
anyhow = "1.0"

flake.lock

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
inputs = {
3-
nixpkgs.url = "github:NixOS/nixpkgs/release-23.11";
3+
nixpkgs.url = "github:NixOS/nixpkgs/release-24.05";
44
flake-utils.url = "github:numtide/flake-utils";
55
};
66

module.nix

Lines changed: 0 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -30,42 +30,6 @@ in
3030
'';
3131
};
3232
};
33-
listmonk = {
34-
host = lib.mkOption {
35-
type = lib.types.str;
36-
default = "http://127.0.0.1";
37-
description = ''
38-
At which host is listmonk listening
39-
'';
40-
};
41-
port = lib.mkOption {
42-
type = lib.types.port;
43-
default = 8081;
44-
description = ''
45-
At which port is listmonk listening
46-
'';
47-
};
48-
user = lib.mkOption {
49-
type = lib.types.str;
50-
default = "admin";
51-
description = ''
52-
username of listmonk user
53-
'';
54-
};
55-
passwordFile = lib.mkOption {
56-
type = lib.types.path;
57-
description = ''
58-
path from where the user password can be read
59-
'';
60-
};
61-
allowed_lists = lib.mkOption {
62-
type = lib.types.listOf lib.types.int;
63-
default = [ ];
64-
description = ''
65-
list of allowed mailing list ids
66-
'';
67-
};
68-
};
6933
logLevel = lib.mkOption {
7034
type = lib.types.str;
7135
default = "info";
@@ -96,10 +60,6 @@ in
9660
WEBSITE_CONTENT_API_LISTEN_ADDR = "${cfg.http.host}:${toString cfg.http.port}";
9761
WEBSITE_CONTENT_API_CONTENT_DIRECTORY = "${pkgs.website-content}/content/";
9862
WEBSITE_CONTENT_API_BASE_URL = cfg.url;
99-
WEBSITE_CONTENT_API_LISTMONK_URL = "${cfg.listmonk.host}:${toString cfg.listmonk.port}";
100-
WEBSITE_CONTENT_API_LISTMONK_USER = cfg.listmonk.user;
101-
WEBSITE_CONTENT_API_LISTMONK_PASSWORD_FILE = "%d/listmonk_pw";
102-
WEBSITE_CONTENT_API_LISTMONK_LISTS = "${builtins.toJSON cfg.listmonk.allowed_lists}";
10363
WEBSITE_CONTENT_API_PROMETHEUS_URL = cfg.prometheusUrl;
10464
WEBSITE_CONTENT_API_IXP_MANAGER_URL = cfg.ixpManagerUrl;
10565
};

src/args.rs

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -30,30 +30,6 @@ pub(crate) struct Args {
3030
)]
3131
pub(crate) base_url: Url,
3232

33-
#[clap(
34-
long,
35-
env = "WEBSITE_CONTENT_API_LISTMONK_URL",
36-
default_value = "http://localhost:8090/"
37-
)]
38-
pub(crate) listmonk_url: Url,
39-
40-
#[clap(
41-
long,
42-
env = "WEBSITE_CONTENT_API_LISTMONK_USER",
43-
default_value = "listmonk"
44-
)]
45-
pub(crate) listmonk_user: String,
46-
47-
#[clap(
48-
long,
49-
env = "WEBSITE_CONTENT_API_LISTMONK_PASSWORD_FILE",
50-
default_value = "/run/secret/listmonk"
51-
)]
52-
pub(crate) listmonk_password_file: PathBuf,
53-
54-
#[clap(long, env = "WEBSITE_CONTENT_API_LISTMONK_LISTS", default_value = "[]")]
55-
pub(crate) listmonk_lists: String,
56-
5733
#[clap(
5834
long,
5935
env = "WEBSITE_CONTENT_API_PROMETHEUS_URL",

src/blog.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ impl Blog {
8989

9090
let body = if is_rst_file {
9191
let mut buffer: Vec<u8> = Vec::new();
92-
let parsed_rst = parse(&text)
92+
let parsed_rst = parse(text)
9393
.map_err(|e| {
9494
eprintln!("cannot parse rst file {} with error {}", &file_name, e);
9595
})

src/event.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,7 @@ use std::sync::Arc;
33

44
use crate::lang::Language;
55
use serde::{Deserialize, Serialize};
6-
use time::{Date, OffsetDateTime};
7-
8-
#[derive(Debug, Copy, Clone, PartialEq, Eq)]
9-
struct MyDate(Date);
6+
use time::OffsetDateTime;
107

118
#[derive(Debug, Clone)]
129
pub(crate) struct EventHandler {

src/lists.rs

Lines changed: 0 additions & 190 deletions
This file was deleted.

src/main.rs

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ use crate::bird::Bird;
1111
use crate::blog::Blog;
1212
use crate::documents::Documents;
1313
use crate::event::EventHandler;
14-
use crate::lists::MailingLists;
1514
use crate::peers::NetworkService;
1615
use crate::routes::{route, ContentPaths};
1716
use crate::state::FoundationState;
@@ -26,7 +25,6 @@ mod cache;
2625
mod documents;
2726
mod event;
2827
mod lang;
29-
mod lists;
3028
mod peers;
3129
mod routes;
3230
mod state;
@@ -59,13 +57,6 @@ async fn main() -> anyhow::Result<()> {
5957
.await?,
6058
documents: Documents::load(&args.content_directory.join("documents")).await?,
6159
team: Team::load(&args.content_directory.join("team")).await?,
62-
lists: MailingLists::load(
63-
&args.listmonk_url,
64-
&args.listmonk_user,
65-
&args.listmonk_password_file,
66-
&args.listmonk_lists,
67-
)
68-
.await?,
6960
stats: Stats::new(args.prometheus_url),
7061
peers: NetworkService::new(
7162
&args.content_directory.join("supporter"),

0 commit comments

Comments
 (0)