Skip to content

Commit

Permalink
Better example, less warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
GamePad64 committed Nov 17, 2024
1 parent 29a9e23 commit 47941ea
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 8 deletions.
2 changes: 2 additions & 0 deletions .idea/notifico.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 17 additions & 1 deletion example/credentials.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,22 @@
[smtp.mailer1]
[smtp.mail1]
tls = true
host = "YOUR_SMTP_SERVER"
port = 587
username = "YOUR_SMTP_USERNAME"
password = "YOUR_SMTP_PASSWORD"

[smpp.sms1]
host = "YOUR_SMPP_SERVER"
port = 2775
username = "YOUR_SMPP_SYSTEM_ID"
password = "YOUR_SMPP_PASSWORD"

[telegram_bot.telegram1]
token = "YOUR_TELEGRAM_TOKEN"

[whatsapp_business.whatsapp1]
phone_id = 123_456_789_0 # Your Phone ID
token = "YOUR_WHATSAPP_TOKEN"

[slack.slack1]
token = "xoxb-YOUR_SLACK_BOT_TOKEN"
10 changes: 4 additions & 6 deletions example/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: "3"
services:
apiserver:
image: notificohq/notifico-apiserver
environment:
environment: &environment
NOTIFICO_AMQP_URL: amqp://guest:guest@rabbitmq:5672/
NOTIFICO_SECRET_KEY: weak-secret-key
NOTIFICO_DB_URL: sqlite:///var/lib/notifico/db.sqlite3
Expand All @@ -14,14 +14,12 @@ services:
- "./db.sqlite3:/var/lib/notifico/db.sqlite3"
worker:
image: notificohq/notifico-worker
environment:
NOTIFICO_AMQP_URL: amqp://guest:guest@rabbitmq:5672/
NOTIFICO_SECRET_KEY: weak-secret-key
NOTIFICO_DB_URL: postgres://postgres:1q2w3e4r@postgres:5432/postgres
NOTIFICO_CLIENT_API_URL: http://127.0.0.1:9000/
environment: *environment # Same environment as in apiserver
volumes:
- "./credentials.toml:/var/lib/notifico/credentials.toml"
- "./db.sqlite3:/var/lib/notifico/db.sqlite3"

# Other services
rabbitmq:
image: rabbitmq:4.0
ports:
Expand Down
1 change: 1 addition & 0 deletions notifico-dbpipeline/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ use serde::Deserialize;
use std::collections::HashSet;
use std::error::Error;

#[allow(unused_imports)]
mod entity;

pub struct DbPipelineStorage {
Expand Down
1 change: 1 addition & 0 deletions notifico-project/migration/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
pub use sea_orm_migration::prelude::*;

#[allow(unused_imports)]
mod entity;
mod m20220101_000001_create_table;

Expand Down
1 change: 1 addition & 0 deletions notifico-project/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ use serde::Serialize;
use std::error::Error;
use uuid::Uuid;

#[allow(unused_imports)]
mod entity;

#[derive(Clone, Debug, Serialize)]
Expand Down
2 changes: 1 addition & 1 deletion notifico-template/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ pub enum TemplaterError {
}

impl From<TemplaterError> for EngineError {
fn from(value: TemplaterError) -> Self {
fn from(_value: TemplaterError) -> Self {
EngineError::TemplateRenderingError
}
}
Expand Down

0 comments on commit 47941ea

Please sign in to comment.