Rename the project to Echo (was fedserv)
Rebrand the daemon and workspace: the binary is now `echo`, every crate is `echo-*` (`echo-api` and the module crates), Rust imports use `echo_*`, the gRPC proto is `proto/echo.proto` with package `echo.v1`, and the log filter, gossip peer-name default, and on-disk store default (`echo.db.jsonl`) follow. Docs updated throughout. No behaviour change; crate directories and the config schema are untouched.
This commit is contained in:
parent
e7037572e5
commit
993f5b2eea
159 changed files with 660 additions and 660 deletions
|
|
@ -1,5 +1,5 @@
|
|||
use fedserv_api::Store;
|
||||
use fedserv_api::{Sender, ServiceCtx};
|
||||
use echo_api::Store;
|
||||
use echo_api::{Sender, ServiceCtx};
|
||||
|
||||
// A sane cap so a runaway list can't bloat an account or flood a user on identify.
|
||||
const MAX_AJOIN: usize = 25;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
use fedserv_api::Store;
|
||||
use fedserv_api::{Sender, ServiceCtx};
|
||||
use echo_api::Store;
|
||||
use echo_api::{Sender, ServiceCtx};
|
||||
|
||||
// ALIST: list the channels the sender's account founds or has access on.
|
||||
pub fn handle(me: &str, from: &Sender, ctx: &mut ServiceCtx, db: &dyn Store) {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
use fedserv_api::{CertError, Store};
|
||||
use fedserv_api::{Sender, ServiceCtx};
|
||||
use echo_api::{CertError, Store};
|
||||
use echo_api::{Sender, ServiceCtx};
|
||||
|
||||
// CERT ADD|DEL|LIST <password> [fingerprint]: manage the TLS certificate
|
||||
// fingerprints that may log in to your account via SASL EXTERNAL. Each
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
use fedserv_api::{CodeKind, Store};
|
||||
use fedserv_api::{Sender, ServiceCtx};
|
||||
use echo_api::{CodeKind, Store};
|
||||
use echo_api::{Sender, ServiceCtx};
|
||||
|
||||
// CONFIRM <code>: confirm your account's email with the code you were emailed.
|
||||
pub fn handle(me: &str, from: &Sender, args: &[&str], ctx: &mut ServiceCtx, db: &mut dyn Store) {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
use fedserv_api::Store;
|
||||
use fedserv_api::{Sender, ServiceCtx};
|
||||
use fedserv_api::NetView;
|
||||
use echo_api::Store;
|
||||
use echo_api::{Sender, ServiceCtx};
|
||||
use echo_api::NetView;
|
||||
|
||||
// DROP <password>: delete your account. Re-authenticates as confirmation, releases
|
||||
// and drops the channels you found, and logs you out.
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
use fedserv_api::Store;
|
||||
use fedserv_api::{Sender, ServiceCtx};
|
||||
use fedserv_api::NetView;
|
||||
use echo_api::Store;
|
||||
use echo_api::{Sender, ServiceCtx};
|
||||
use echo_api::NetView;
|
||||
|
||||
// GHOST/RECOVER <nick> [password]: rename off a session using a nick you own,
|
||||
// either by being identified to its account or giving that account's password.
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
use fedserv_api::Store;
|
||||
use fedserv_api::{Sender, ServiceCtx};
|
||||
use echo_api::Store;
|
||||
use echo_api::{Sender, ServiceCtx};
|
||||
|
||||
// GLIST: list the nicks grouped to your account.
|
||||
pub fn handle(me: &str, from: &Sender, ctx: &mut ServiceCtx, db: &dyn Store) {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
use fedserv_api::Store;
|
||||
use fedserv_api::{Sender, ServiceCtx};
|
||||
use echo_api::Store;
|
||||
use echo_api::{Sender, ServiceCtx};
|
||||
|
||||
// GROUP <account> <password>: link your current nick to an existing account, so
|
||||
// you can identify to it under this nick too.
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
use fedserv_api::{human_time, Store};
|
||||
use fedserv_api::{Sender, ServiceCtx};
|
||||
use echo_api::{human_time, Store};
|
||||
use echo_api::{Sender, ServiceCtx};
|
||||
|
||||
// IDENTIFY [account] <password>: log in. The account defaults to the current
|
||||
// nick, so both the bare-password and account+password forms work.
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
use fedserv_api::{human_time, Priv, Store};
|
||||
use fedserv_api::{Sender, ServiceCtx};
|
||||
use echo_api::{human_time, Priv, Store};
|
||||
use echo_api::{Sender, ServiceCtx};
|
||||
|
||||
// INFO [account]: show an account's registration details. The email and other
|
||||
// private fields are shown to the account's own owner, or to an oper with the
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
use fedserv_api::Store;
|
||||
use fedserv_api::{Sender, Service, ServiceCtx};
|
||||
use fedserv_api::NetView;
|
||||
use echo_api::Store;
|
||||
use echo_api::{Sender, Service, ServiceCtx};
|
||||
use echo_api::NetView;
|
||||
|
||||
#[path = "register.rs"]
|
||||
mod register;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
use fedserv_api::{Sender, ServiceCtx};
|
||||
use echo_api::{Sender, ServiceCtx};
|
||||
|
||||
// LOGOUT: log out and rename to a guest nick (prefix + a per-logout sequence).
|
||||
pub fn handle(me: &str, guest_nick: &str, guest_seq: &mut u32, from: &Sender, ctx: &mut ServiceCtx) {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
use fedserv_api::{Priv, Sender, ServiceCtx, Store};
|
||||
use echo_api::{Priv, Sender, ServiceCtx, Store};
|
||||
|
||||
// NOEXPIRE <account> {ON|OFF}: pin an account so inactivity-expiry never drops
|
||||
// it (or lift the pin). Oper-only (Priv::Admin) — protecting a record from
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
use fedserv_api::{Sender, ServiceCtx};
|
||||
use fedserv_api::RegReply;
|
||||
use echo_api::{Sender, ServiceCtx};
|
||||
use echo_api::RegReply;
|
||||
|
||||
// REGISTER <password> [email]: register the sender's current nick. The engine
|
||||
// derives the password off-thread, commits, and answers.
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
use fedserv_api::{CodeKind, Store};
|
||||
use fedserv_api::{Sender, ServiceCtx};
|
||||
use echo_api::{CodeKind, Store};
|
||||
use echo_api::{Sender, ServiceCtx};
|
||||
|
||||
// RESETPASS <account>: email a reset code to the address on file.
|
||||
// RESETPASS <account> <code> <newpassword>: complete the reset with that code.
|
||||
|
|
@ -19,7 +19,7 @@ pub fn handle(me: &str, from: &Sender, args: &[&str], ctx: &mut ServiceCtx, db:
|
|||
return;
|
||||
};
|
||||
let code = db.issue_code(&canonical, CodeKind::Reset);
|
||||
let mail = fedserv_api::email::reset(db.email_brand(), db.email_accent(), db.email_logo(), &canonical, &code);
|
||||
let mail = echo_api::email::reset(db.email_brand(), db.email_accent(), db.email_logo(), &canonical, &code);
|
||||
ctx.send_email(email, mail.subject, mail.text, Some(mail.html));
|
||||
ctx.notice(me, from.uid, format!("A reset code has been emailed to the address on file for \x02{canonical}\x02."));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
use fedserv_api::Store;
|
||||
use fedserv_api::{Sender, ServiceCtx};
|
||||
use echo_api::Store;
|
||||
use echo_api::{Sender, ServiceCtx};
|
||||
|
||||
// SET PASSWORD <newpassword> | SET EMAIL [address]: change your account settings.
|
||||
pub fn handle(me: &str, from: &Sender, args: &[&str], ctx: &mut ServiceCtx, db: &mut dyn Store) {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
use fedserv_api::{parse_duration, NetView, Priv, Sender, ServiceCtx, Store};
|
||||
use echo_api::{parse_duration, NetView, Priv, Sender, ServiceCtx, Store};
|
||||
use std::time::{SystemTime, UNIX_EPOCH};
|
||||
|
||||
// SUSPEND <account> [+expiry] [reason] / UNSUSPEND <account>: freeze or unfreeze
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
use fedserv_api::Store;
|
||||
use fedserv_api::{Sender, ServiceCtx};
|
||||
use echo_api::Store;
|
||||
use echo_api::{Sender, ServiceCtx};
|
||||
|
||||
// UNGROUP [nick]: remove a nick grouped to your account (defaults to your current nick).
|
||||
pub fn handle(me: &str, from: &Sender, args: &[&str], ctx: &mut ServiceCtx, db: &mut dyn Store) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue