repo stringlengths 6 65 | file_url stringlengths 81 311 | file_path stringlengths 6 227 | content stringlengths 0 32.8k | language stringclasses 1
value | license stringclasses 7
values | commit_sha stringlengths 40 40 | retrieved_at stringdate 2026-01-04 15:31:58 2026-01-04 20:25:31 | truncated bool 2
classes |
|---|---|---|---|---|---|---|---|---|
ymgyt/syndicationd | https://github.com/ymgyt/syndicationd/blob/956bec58fcb6dbd9e8740d925649772b1670ead9/crates/synd_feed/src/feed/cache/mod.rs | crates/synd_feed/src/feed/cache/mod.rs | use std::{sync::Arc, time::Duration};
use async_trait::async_trait;
use crate::{
feed::service::{FetchFeed, FetchFeedResult},
types::{self, FeedUrl},
};
mod periodic_refresher;
pub use periodic_refresher::PeriodicRefresher;
type Cache = moka::future::Cache<FeedUrl, Arc<types::Feed>>;
#[derive(Clone, Copy)]... | rust | Apache-2.0 | 956bec58fcb6dbd9e8740d925649772b1670ead9 | 2026-01-04T20:11:26.769763Z | false |
ymgyt/syndicationd | https://github.com/ymgyt/syndicationd/blob/956bec58fcb6dbd9e8740d925649772b1670ead9/crates/synd_api/src/config.rs | crates/synd_api/src/config.rs | pub const USER_AGENT: &str = concat!(env!("CARGO_PKG_NAME"), "/", env!("CARGO_PKG_VERSION"));
pub mod app {
pub const VERSION: &str = env!("CARGO_PKG_VERSION");
pub const NAME: &str = env!("CARGO_PKG_NAME");
}
pub const PORT: u16 = 5959;
pub mod env {
macro_rules! env_key {
($key:expr) => {
... | rust | Apache-2.0 | 956bec58fcb6dbd9e8740d925649772b1670ead9 | 2026-01-04T20:11:26.769763Z | false |
ymgyt/syndicationd | https://github.com/ymgyt/syndicationd/blob/956bec58fcb6dbd9e8740d925649772b1670ead9/crates/synd_api/src/lib.rs | crates/synd_api/src/lib.rs | //! syndicationd graphql api server crate
#![allow(clippy::new_without_default)]
#![warn(rustdoc::broken_intra_doc_links)]
pub mod cli;
pub mod client;
pub mod config;
pub mod dependency;
pub(crate) mod gql;
pub mod monitor;
pub(crate) mod principal;
pub mod repository;
pub mod serve;
pub mod shutdown;
pub mod usecase... | rust | Apache-2.0 | 956bec58fcb6dbd9e8740d925649772b1670ead9 | 2026-01-04T20:11:26.769763Z | false |
ymgyt/syndicationd | https://github.com/ymgyt/syndicationd/blob/956bec58fcb6dbd9e8740d925649772b1670ead9/crates/synd_api/src/shutdown.rs | crates/synd_api/src/shutdown.rs | use std::{future::Future, io, net::SocketAddr, time::Duration};
use axum_server::Handle;
use tokio_util::sync::CancellationToken;
/// `CancellationToken` wrapper
pub struct Shutdown {
root: CancellationToken,
handle: Handle<SocketAddr>,
}
impl Shutdown {
/// When the given signal Future is resolved, call... | rust | Apache-2.0 | 956bec58fcb6dbd9e8740d925649772b1670ead9 | 2026-01-04T20:11:26.769763Z | false |
ymgyt/syndicationd | https://github.com/ymgyt/syndicationd/blob/956bec58fcb6dbd9e8740d925649772b1670ead9/crates/synd_api/src/dependency.rs | crates/synd_api/src/dependency.rs | use std::sync::Arc;
use anyhow::Context;
use axum_server::tls_rustls::RustlsConfig;
use synd_feed::feed::{
cache::{CacheConfig, CacheLayer},
service::FeedService,
};
use tokio_util::sync::CancellationToken;
use crate::{
cli::{self, CacheOptions, TlsOptions},
config,
monitor::Monitors,
reposito... | rust | Apache-2.0 | 956bec58fcb6dbd9e8740d925649772b1670ead9 | 2026-01-04T20:11:26.769763Z | false |
ymgyt/syndicationd | https://github.com/ymgyt/syndicationd/blob/956bec58fcb6dbd9e8740d925649772b1670ead9/crates/synd_api/src/cli.rs | crates/synd_api/src/cli.rs | use std::{ffi::OsString, net::IpAddr, path::PathBuf, str::FromStr, time::Duration};
use clap::{ArgAction, Parser};
use synd_stdx::time::humantime;
use crate::{
config::{self, env::env_key},
serve,
};
#[derive(Parser, Debug)]
#[command(version, propagate_version = true, disable_help_subcommand = true)]
pub st... | rust | Apache-2.0 | 956bec58fcb6dbd9e8740d925649772b1670ead9 | 2026-01-04T20:11:26.769763Z | false |
ymgyt/syndicationd | https://github.com/ymgyt/syndicationd/blob/956bec58fcb6dbd9e8740d925649772b1670ead9/crates/synd_api/src/monitor.rs | crates/synd_api/src/monitor.rs | use std::time::Duration;
use synd_o11y::metric;
use tokio_metrics::{RuntimeMetrics, RuntimeMonitor, TaskMetrics, TaskMonitor};
use tokio_util::sync::CancellationToken;
struct Metrics {
runtime_total_polls_count: u64,
runtime_busy_duration_secs: f64,
gql_mean_poll_duration_secs: f64,
gql_mean_slow_poll... | rust | Apache-2.0 | 956bec58fcb6dbd9e8740d925649772b1670ead9 | 2026-01-04T20:11:26.769763Z | false |
ymgyt/syndicationd | https://github.com/ymgyt/syndicationd/blob/956bec58fcb6dbd9e8740d925649772b1670ead9/crates/synd_api/src/main.rs | crates/synd_api/src/main.rs | use std::env;
use fdlimit::Outcome;
use synd_o11y::{
opentelemetry::OpenTelemetryGuard, tracing_subscriber::initializer::TracingInitializer,
};
use synd_stdx::io::color::{ColorSupport, is_color_supported};
use tracing::{error, info};
use synd_api::{
cli::{self, Args, ObservabilityOptions},
config,
dep... | rust | Apache-2.0 | 956bec58fcb6dbd9e8740d925649772b1670ead9 | 2026-01-04T20:11:26.769763Z | false |
ymgyt/syndicationd | https://github.com/ymgyt/syndicationd/blob/956bec58fcb6dbd9e8740d925649772b1670ead9/crates/synd_api/src/principal.rs | crates/synd_api/src/principal.rs | use std::{
collections::hash_map::DefaultHasher,
hash::{Hash, Hasher},
};
#[derive(Clone, Debug)]
pub enum Principal {
User(User),
}
impl Principal {
#[allow(clippy::unnecessary_wraps)]
pub fn user_id(&self) -> Option<&str> {
match self {
Principal::User(User { id, .. }) => Som... | rust | Apache-2.0 | 956bec58fcb6dbd9e8740d925649772b1670ead9 | 2026-01-04T20:11:26.769763Z | false |
ymgyt/syndicationd | https://github.com/ymgyt/syndicationd/blob/956bec58fcb6dbd9e8740d925649772b1670ead9/crates/synd_api/src/gql/scalar.rs | crates/synd_api/src/gql/scalar.rs | use async_graphql::{InputValueError, Scalar, ScalarType, Value};
use chrono::Utc;
/// RFC3339 Time
pub struct Rfc3339Time(synd_feed::types::Time);
#[Scalar]
impl ScalarType for Rfc3339Time {
fn parse(value: async_graphql::Value) -> async_graphql::InputValueResult<Self> {
let Value::String(value) = value e... | rust | Apache-2.0 | 956bec58fcb6dbd9e8740d925649772b1670ead9 | 2026-01-04T20:11:26.769763Z | false |
ymgyt/syndicationd | https://github.com/ymgyt/syndicationd/blob/956bec58fcb6dbd9e8740d925649772b1670ead9/crates/synd_api/src/gql/mod.rs | crates/synd_api/src/gql/mod.rs | mod query;
pub(crate) use query::Query;
mod mutation;
use async_graphql::{EmptySubscription, Schema, SchemaBuilder};
pub(crate) use mutation::Mutation;
use crate::{gql::mutation::ResponseCode, principal::Principal, usecase};
pub(crate) mod object;
pub(crate) mod scalar;
pub(crate) type SyndSchema = Schema<Query, Mu... | rust | Apache-2.0 | 956bec58fcb6dbd9e8740d925649772b1670ead9 | 2026-01-04T20:11:26.769763Z | false |
ymgyt/syndicationd | https://github.com/ymgyt/syndicationd/blob/956bec58fcb6dbd9e8740d925649772b1670ead9/crates/synd_api/src/gql/query.rs | crates/synd_api/src/gql/query.rs | use std::borrow::Cow;
use async_graphql::{
Context, Object, Result, SimpleObject,
connection::{Connection, Edge},
};
use synd_feed::types::FeedUrl;
use crate::{
gql::{
object::{self, Entry, id},
run_usecase,
},
usecase::{
FetchEntries, FetchEntriesError, FetchEntriesInput, ... | rust | Apache-2.0 | 956bec58fcb6dbd9e8740d925649772b1670ead9 | 2026-01-04T20:11:26.769763Z | false |
ymgyt/syndicationd | https://github.com/ymgyt/syndicationd/blob/956bec58fcb6dbd9e8740d925649772b1670ead9/crates/synd_api/src/gql/mutation/unsubscribe_feed.rs | crates/synd_api/src/gql/mutation/unsubscribe_feed.rs | use async_graphql::{InputObject, Object, Union};
use synd_feed::types::FeedUrl;
use crate::{gql::mutation::ResponseStatus, usecase};
#[derive(InputObject)]
pub struct UnsubscribeFeedInput {
/// Feed url to unsubscribe
pub url: FeedUrl,
}
impl From<UnsubscribeFeedInput> for usecase::UnsubscribeFeedInput {
... | rust | Apache-2.0 | 956bec58fcb6dbd9e8740d925649772b1670ead9 | 2026-01-04T20:11:26.769763Z | false |
ymgyt/syndicationd | https://github.com/ymgyt/syndicationd/blob/956bec58fcb6dbd9e8740d925649772b1670ead9/crates/synd_api/src/gql/mutation/subscribe_feed.rs | crates/synd_api/src/gql/mutation/subscribe_feed.rs | use async_graphql::{InputObject, Object, Union};
use synd_feed::{
feed::service::FetchFeedError,
types::{Category, FeedUrl, Requirement},
};
use crate::{
gql::{
mutation::ResponseStatus,
object::{self, Feed},
},
usecase::{self, SubscribeFeedError as UsecaseSubscribeFeedError},
};
#... | rust | Apache-2.0 | 956bec58fcb6dbd9e8740d925649772b1670ead9 | 2026-01-04T20:11:26.769763Z | false |
ymgyt/syndicationd | https://github.com/ymgyt/syndicationd/blob/956bec58fcb6dbd9e8740d925649772b1670ead9/crates/synd_api/src/gql/mutation/mod.rs | crates/synd_api/src/gql/mutation/mod.rs | use async_graphql::{Context, Enum, Interface, Object, SimpleObject};
use crate::{
gql::run_usecase,
usecase::{SubscribeFeed, SubscribeFeedError, UnsubscribeFeed},
};
pub mod subscribe_feed;
pub mod unsubscribe_feed;
#[derive(Enum, PartialEq, Eq, Clone, Copy, Debug)]
pub(crate) enum ResponseCode {
/// Ope... | rust | Apache-2.0 | 956bec58fcb6dbd9e8740d925649772b1670ead9 | 2026-01-04T20:11:26.769763Z | false |
ymgyt/syndicationd | https://github.com/ymgyt/syndicationd/blob/956bec58fcb6dbd9e8740d925649772b1670ead9/crates/synd_api/src/gql/object/id.rs | crates/synd_api/src/gql/object/id.rs | use std::convert::Infallible;
use async_graphql::connection::CursorType;
use synd_feed::types;
pub(crate) struct FeedIdV1(String);
impl FeedIdV1 {
pub fn new(url: impl AsRef<str>) -> Self {
let url = url.as_ref();
Self(format!("v1:feed:{url}"))
}
}
impl From<FeedIdV1> for async_graphql::ID {... | rust | Apache-2.0 | 956bec58fcb6dbd9e8740d925649772b1670ead9 | 2026-01-04T20:11:26.769763Z | false |
ymgyt/syndicationd | https://github.com/ymgyt/syndicationd/blob/956bec58fcb6dbd9e8740d925649772b1670ead9/crates/synd_api/src/gql/object/mod.rs | crates/synd_api/src/gql/object/mod.rs | use std::{borrow::Cow, sync::Arc};
use async_graphql::{
ID, Object, SimpleObject,
connection::{Connection, ConnectionNameType, Edge, EdgeNameType, EmptyFields},
};
use feed_rs::model as feedrs;
use synd_feed::types::{self, Annotated, Category, FeedType, FeedUrl, Requirement};
use crate::gql::scalar;
use self... | rust | Apache-2.0 | 956bec58fcb6dbd9e8740d925649772b1670ead9 | 2026-01-04T20:11:26.769763Z | false |
ymgyt/syndicationd | https://github.com/ymgyt/syndicationd/blob/956bec58fcb6dbd9e8740d925649772b1670ead9/crates/synd_api/src/usecase/fetch_subscribed_feeds.rs | crates/synd_api/src/usecase/fetch_subscribed_feeds.rs | use std::sync::Arc;
use synd_feed::{
feed::{cache::FetchCachedFeed, service::FetchFeedError},
types::{self, Annotated, FeedUrl},
};
use thiserror::Error;
use crate::{
principal::Principal,
repository::{SubscriptionRepository, types::SubscribedFeeds},
usecase::{Error, Input, MakeUsecase, Output, Us... | rust | Apache-2.0 | 956bec58fcb6dbd9e8740d925649772b1670ead9 | 2026-01-04T20:11:26.769763Z | false |
ymgyt/syndicationd | https://github.com/ymgyt/syndicationd/blob/956bec58fcb6dbd9e8740d925649772b1670ead9/crates/synd_api/src/usecase/authorize.rs | crates/synd_api/src/usecase/authorize.rs | use std::ops::Deref;
use crate::principal::Principal;
use super::Usecase;
pub struct Authorized<T> {
principal: T,
}
impl Authorized<Principal> {
fn new(principal: Principal) -> Self {
Self { principal }
}
}
impl<T> Deref for Authorized<T> {
type Target = T;
fn deref(&self) -> &Self::T... | rust | Apache-2.0 | 956bec58fcb6dbd9e8740d925649772b1670ead9 | 2026-01-04T20:11:26.769763Z | false |
ymgyt/syndicationd | https://github.com/ymgyt/syndicationd/blob/956bec58fcb6dbd9e8740d925649772b1670ead9/crates/synd_api/src/usecase/unsubscribe_feed.rs | crates/synd_api/src/usecase/unsubscribe_feed.rs | use std::sync::Arc;
use synd_feed::types::FeedUrl;
use synd_o11y::metric;
use crate::{
principal::Principal,
repository::{self, SubscriptionRepository},
usecase::{Input, Output},
};
use super::{Usecase, authorize::Unauthorized};
pub struct UnsubscribeFeed {
pub repository: Arc<dyn SubscriptionReposi... | rust | Apache-2.0 | 956bec58fcb6dbd9e8740d925649772b1670ead9 | 2026-01-04T20:11:26.769763Z | false |
ymgyt/syndicationd | https://github.com/ymgyt/syndicationd/blob/956bec58fcb6dbd9e8740d925649772b1670ead9/crates/synd_api/src/usecase/fetch_entries.rs | crates/synd_api/src/usecase/fetch_entries.rs | use std::{cmp::Ordering, collections::HashMap, sync::Arc};
use futures_util::{StreamExt, stream::FuturesUnordered};
use synd_feed::{
feed::{cache::FetchCachedFeed, service::FetchFeedError},
types::{self, Annotated, Entry, EntryId, FeedMeta, FeedUrl},
};
use thiserror::Error;
use crate::{
principal::Princi... | rust | Apache-2.0 | 956bec58fcb6dbd9e8740d925649772b1670ead9 | 2026-01-04T20:11:26.769763Z | false |
ymgyt/syndicationd | https://github.com/ymgyt/syndicationd/blob/956bec58fcb6dbd9e8740d925649772b1670ead9/crates/synd_api/src/usecase/subscribe_feed.rs | crates/synd_api/src/usecase/subscribe_feed.rs | use std::sync::Arc;
use synd_feed::{
feed::{cache::FetchCachedFeed, service::FetchFeedError},
types::{Annotated, Category, Feed, FeedUrl, Requirement},
};
use synd_o11y::metric;
use thiserror::Error;
use crate::{
principal::Principal,
repository::{self, SubscriptionRepository},
usecase::{Input, Ou... | rust | Apache-2.0 | 956bec58fcb6dbd9e8740d925649772b1670ead9 | 2026-01-04T20:11:26.769763Z | false |
ymgyt/syndicationd | https://github.com/ymgyt/syndicationd/blob/956bec58fcb6dbd9e8740d925649772b1670ead9/crates/synd_api/src/usecase/mod.rs | crates/synd_api/src/usecase/mod.rs | mod subscribe_feed;
pub use subscribe_feed::{
SubscribeFeed, SubscribeFeedError, SubscribeFeedInput, SubscribeFeedOutput,
};
mod unsubscribe_feed;
pub use unsubscribe_feed::{UnsubscribeFeed, UnsubscribeFeedInput, UnsubscribeFeedOutput};
mod fetch_subscribed_feeds;
pub use fetch_subscribed_feeds::{
FetchSubscr... | rust | Apache-2.0 | 956bec58fcb6dbd9e8740d925649772b1670ead9 | 2026-01-04T20:11:26.769763Z | false |
ymgyt/syndicationd | https://github.com/ymgyt/syndicationd/blob/956bec58fcb6dbd9e8740d925649772b1670ead9/crates/synd_api/src/repository/kvsd.rs | crates/synd_api/src/repository/kvsd.rs | use std::{collections::HashMap, io::ErrorKind, time::Duration};
use anyhow::Context;
use async_trait::async_trait;
use futures_util::TryFutureExt;
use kvsd::{
Key, Value,
client::{Api, tcp::Client},
};
use thiserror::Error;
use tokio::sync::Mutex;
use tokio::{net::TcpStream, sync::MutexGuard};
use crate::repo... | rust | Apache-2.0 | 956bec58fcb6dbd9e8740d925649772b1670ead9 | 2026-01-04T20:11:26.769763Z | false |
ymgyt/syndicationd | https://github.com/ymgyt/syndicationd/blob/956bec58fcb6dbd9e8740d925649772b1670ead9/crates/synd_api/src/repository/subscription.rs | crates/synd_api/src/repository/subscription.rs | use async_trait::async_trait;
use crate::repository::{self, types::SubscribedFeeds};
use super::RepositoryError;
pub type RepositoryResult<T> = std::result::Result<T, RepositoryError>;
#[async_trait]
pub trait SubscriptionRepository: Send + Sync {
async fn put_feed_subscription(
&self,
feed: rep... | rust | Apache-2.0 | 956bec58fcb6dbd9e8740d925649772b1670ead9 | 2026-01-04T20:11:26.769763Z | false |
ymgyt/syndicationd | https://github.com/ymgyt/syndicationd/blob/956bec58fcb6dbd9e8740d925649772b1670ead9/crates/synd_api/src/repository/types.rs | crates/synd_api/src/repository/types.rs | use std::collections::HashMap;
use kvsd::Value;
use serde::{Deserialize, Serialize};
use sqlx::prelude::FromRow;
use synd_feed::types::{Category, FeedUrl, Requirement};
use crate::repository::RepositoryError;
#[derive(Debug, Clone)]
pub struct Feed {
pub url: String,
pub title: Option<String>,
}
#[derive(De... | rust | Apache-2.0 | 956bec58fcb6dbd9e8740d925649772b1670ead9 | 2026-01-04T20:11:26.769763Z | false |
ymgyt/syndicationd | https://github.com/ymgyt/syndicationd/blob/956bec58fcb6dbd9e8740d925649772b1670ead9/crates/synd_api/src/repository/mod.rs | crates/synd_api/src/repository/mod.rs | mod subscription;
use ::kvsd::KvsdError;
pub use subscription::SubscriptionRepository;
pub mod kvsd;
pub mod sqlite;
pub mod types;
#[derive(thiserror::Error, Debug)]
pub enum RepositoryError {
#[error("internal error: {0}")]
Internal(#[from] anyhow::Error),
#[error(transparent)]
Migrate(#[from] sqlx:... | rust | Apache-2.0 | 956bec58fcb6dbd9e8740d925649772b1670ead9 | 2026-01-04T20:11:26.769763Z | false |
ymgyt/syndicationd | https://github.com/ymgyt/syndicationd/blob/956bec58fcb6dbd9e8740d925649772b1670ead9/crates/synd_api/src/repository/sqlite/mod.rs | crates/synd_api/src/repository/sqlite/mod.rs | use std::{collections::HashMap, path::Path};
use async_trait::async_trait;
use sqlx::{SqlitePool, sqlite::SqliteConnectOptions};
use tracing::info;
use crate::repository::{
self, RepositoryError, SubscriptionRepository,
subscription::RepositoryResult,
types::{FeedAnnotations, SubscribedFeeds},
};
pub str... | rust | Apache-2.0 | 956bec58fcb6dbd9e8740d925649772b1670ead9 | 2026-01-04T20:11:26.769763Z | false |
ymgyt/syndicationd | https://github.com/ymgyt/syndicationd/blob/956bec58fcb6dbd9e8740d925649772b1670ead9/crates/synd_api/src/client/mod.rs | crates/synd_api/src/client/mod.rs | pub mod github;
| rust | Apache-2.0 | 956bec58fcb6dbd9e8740d925649772b1670ead9 | 2026-01-04T20:11:26.769763Z | false |
ymgyt/syndicationd | https://github.com/ymgyt/syndicationd/blob/956bec58fcb6dbd9e8740d925649772b1670ead9/crates/synd_api/src/client/github/client.rs | crates/synd_api/src/client/github/client.rs | use std::{fmt::Debug, time::Duration};
use graphql_client::{GraphQLQuery, Response};
use reqwest::header::{self, HeaderValue};
use serde::{Serialize, de::DeserializeOwned};
use crate::{client::github::query, config};
#[derive(Clone)]
pub struct GithubClient {
client: reqwest::Client,
endpoint: Option<&'stati... | rust | Apache-2.0 | 956bec58fcb6dbd9e8740d925649772b1670ead9 | 2026-01-04T20:11:26.769763Z | false |
ymgyt/syndicationd | https://github.com/ymgyt/syndicationd/blob/956bec58fcb6dbd9e8740d925649772b1670ead9/crates/synd_api/src/client/github/mod.rs | crates/synd_api/src/client/github/mod.rs | mod client;
pub use client::GithubClient;
#[path = "generated/query.rs"]
pub mod query;
| rust | Apache-2.0 | 956bec58fcb6dbd9e8740d925649772b1670ead9 | 2026-01-04T20:11:26.769763Z | false |
ymgyt/syndicationd | https://github.com/ymgyt/syndicationd/blob/956bec58fcb6dbd9e8740d925649772b1670ead9/crates/synd_api/src/client/github/generated/query.rs | crates/synd_api/src/client/github/generated/query.rs | #![allow(clippy::all, warnings)]
pub struct Authenticate;
pub mod authenticate {
#![allow(dead_code)]
use std::result::Result;
pub const OPERATION_NAME: &str = "Authenticate";
pub const QUERY: &str = "query Authenticate {\n viewer {\n email,\n }\n}\n";
use super::*;
use serde::{Deserialize,... | rust | Apache-2.0 | 956bec58fcb6dbd9e8740d925649772b1670ead9 | 2026-01-04T20:11:26.769763Z | false |
ymgyt/syndicationd | https://github.com/ymgyt/syndicationd/blob/956bec58fcb6dbd9e8740d925649772b1670ead9/crates/synd_api/src/serve/auth.rs | crates/synd_api/src/serve/auth.rs | use std::time::Duration;
use futures_util::future::BoxFuture;
use moka::future::Cache;
use synd_auth::jwt::google::JwtService as GoogleJwtService;
use tracing::warn;
use crate::{
client::github::GithubClient,
principal::{Principal, User},
serve::layer::authenticate::Authenticate,
};
#[derive(Clone)]
pub ... | rust | Apache-2.0 | 956bec58fcb6dbd9e8740d925649772b1670ead9 | 2026-01-04T20:11:26.769763Z | false |
ymgyt/syndicationd | https://github.com/ymgyt/syndicationd/blob/956bec58fcb6dbd9e8740d925649772b1670ead9/crates/synd_api/src/serve/mod.rs | crates/synd_api/src/serve/mod.rs | use std::{net::IpAddr, time::Duration};
use axum::{
BoxError, Extension, Router,
error_handling::HandleErrorLayer,
http::{StatusCode, header::AUTHORIZATION},
response::IntoResponse,
routing::{get, post},
};
use tokio::net::TcpListener;
use tokio_metrics::TaskMonitor;
use tower::{ServiceBuilder, lim... | rust | Apache-2.0 | 956bec58fcb6dbd9e8740d925649772b1670ead9 | 2026-01-04T20:11:26.769763Z | false |
ymgyt/syndicationd | https://github.com/ymgyt/syndicationd/blob/956bec58fcb6dbd9e8740d925649772b1670ead9/crates/synd_api/src/serve/probe.rs | crates/synd_api/src/serve/probe.rs | use axum::{
Json,
http::{StatusCode, header},
response::IntoResponse,
};
use synd_o11y::health_check::Health;
use crate::config;
pub async fn healthcheck() -> impl IntoResponse {
(
StatusCode::OK,
[(header::CONTENT_TYPE, Health::CONTENT_TYPE)],
Json(
Health::pass()
... | rust | Apache-2.0 | 956bec58fcb6dbd9e8740d925649772b1670ead9 | 2026-01-04T20:11:26.769763Z | false |
ymgyt/syndicationd | https://github.com/ymgyt/syndicationd/blob/956bec58fcb6dbd9e8740d925649772b1670ead9/crates/synd_api/src/serve/layer/trace.rs | crates/synd_api/src/serve/layer/trace.rs | use tower_http::trace::HttpMakeClassifier;
use tracing::Level;
#[derive(Clone)]
pub struct MakeSpan;
impl<B> tower_http::trace::MakeSpan<B> for MakeSpan {
fn make_span(&mut self, request: &axum::http::Request<B>) -> tracing::Span {
use synd_o11y::opentelemetry::extension::*;
let cx = synd_o11y::op... | rust | Apache-2.0 | 956bec58fcb6dbd9e8740d925649772b1670ead9 | 2026-01-04T20:11:26.769763Z | false |
ymgyt/syndicationd | https://github.com/ymgyt/syndicationd/blob/956bec58fcb6dbd9e8740d925649772b1670ead9/crates/synd_api/src/serve/layer/mod.rs | crates/synd_api/src/serve/layer/mod.rs | //! Module for tower layer
pub(crate) mod authenticate;
pub(crate) mod request_metrics;
pub(crate) mod trace;
| rust | Apache-2.0 | 956bec58fcb6dbd9e8740d925649772b1670ead9 | 2026-01-04T20:11:26.769763Z | false |
ymgyt/syndicationd | https://github.com/ymgyt/syndicationd/blob/956bec58fcb6dbd9e8740d925649772b1670ead9/crates/synd_api/src/serve/layer/request_metrics.rs | crates/synd_api/src/serve/layer/request_metrics.rs | use std::{
convert::Infallible,
pin::Pin,
task::{Context, Poll},
time::Instant,
};
use axum::{extract::Request, http::Method, response::Response};
use futures_util::Future;
use synd_o11y::metric;
use tower::{Layer, Service};
use crate::config;
#[derive(Clone)]
pub struct RequestMetricsLayer {}
impl ... | rust | Apache-2.0 | 956bec58fcb6dbd9e8740d925649772b1670ead9 | 2026-01-04T20:11:26.769763Z | false |
ymgyt/syndicationd | https://github.com/ymgyt/syndicationd/blob/956bec58fcb6dbd9e8740d925649772b1670ead9/crates/synd_api/src/serve/layer/authenticate/mod.rs | crates/synd_api/src/serve/layer/authenticate/mod.rs | use std::{
convert::Infallible,
future::Future,
pin::Pin,
task::{Context, Poll},
};
use axum::{
extract::Request,
http::StatusCode,
response::{IntoResponse, Response},
};
use pin_project::pin_project;
use tower::{Layer, Service};
use crate::principal::Principal;
pub trait Authenticate {
... | rust | Apache-2.0 | 956bec58fcb6dbd9e8740d925649772b1670ead9 | 2026-01-04T20:11:26.769763Z | false |
ymgyt/syndicationd | https://github.com/ymgyt/syndicationd/blob/956bec58fcb6dbd9e8740d925649772b1670ead9/crates/synd_api/tests/integration.rs | crates/synd_api/tests/integration.rs | #[cfg(feature = "integration")]
mod test {
#[tokio::test(flavor = "multi_thread")]
async fn api_command_test() -> anyhow::Result<()> {
let _kvsd_client = synd_test::kvsd::run_kvsd(
"localhost".into(),
45000,
"test".into(),
"test".into(),
synd_... | rust | Apache-2.0 | 956bec58fcb6dbd9e8740d925649772b1670ead9 | 2026-01-04T20:11:26.769763Z | false |
ymgyt/syndicationd | https://github.com/ymgyt/syndicationd/blob/956bec58fcb6dbd9e8740d925649772b1670ead9/crates/synd_term/src/lib.rs | crates/synd_term/src/lib.rs | #![allow(clippy::new_without_default)]
#![warn(rustdoc::broken_intra_doc_links)]
pub mod application;
pub mod auth;
pub mod cli;
pub mod client;
pub(crate) mod command;
pub mod config;
pub mod filesystem;
pub mod interact;
pub mod job;
pub mod keymap;
pub mod matcher;
pub mod terminal;
pub mod types;
pub mod ui;
#[cf... | rust | Apache-2.0 | 956bec58fcb6dbd9e8740d925649772b1670ead9 | 2026-01-04T20:11:26.769763Z | false |
ymgyt/syndicationd | https://github.com/ymgyt/syndicationd/blob/956bec58fcb6dbd9e8740d925649772b1670ead9/crates/synd_term/src/command.rs | crates/synd_term/src/command.rs | use std::{fmt::Display, sync::Arc};
use synd_auth::device_flow::DeviceAuthorizationResponse;
use synd_feed::types::{Category, FeedUrl};
use crate::{
application::{Direction, Populate, RequestSequence},
auth::{AuthenticationProvider, Credential, Verified},
client::{
github::{FetchNotificationsParams... | rust | Apache-2.0 | 956bec58fcb6dbd9e8740d925649772b1670ead9 | 2026-01-04T20:11:26.769763Z | false |
ymgyt/syndicationd | https://github.com/ymgyt/syndicationd/blob/956bec58fcb6dbd9e8740d925649772b1670ead9/crates/synd_term/src/filesystem.rs | crates/synd_term/src/filesystem.rs | #[cfg(test)]
pub(crate) mod mock {
use std::{
collections::HashMap,
fs::File,
io,
path::{Path, PathBuf},
};
use synd_stdx::fs::FileSystem;
#[derive(Default, Clone)]
pub(crate) struct MockFileSystem {
remove_errors: HashMap<PathBuf, io::ErrorKind>,
}
... | rust | Apache-2.0 | 956bec58fcb6dbd9e8740d925649772b1670ead9 | 2026-01-04T20:11:26.769763Z | false |
ymgyt/syndicationd | https://github.com/ymgyt/syndicationd/blob/956bec58fcb6dbd9e8740d925649772b1670ead9/crates/synd_term/src/integration.rs | crates/synd_term/src/integration.rs | use std::io;
use tokio::sync::mpsc::UnboundedSender;
use tokio_stream::wrappers::UnboundedReceiverStream;
pub struct UnboundedSenderWrapper {
inner: UnboundedSender<io::Result<crossterm::event::Event>>,
}
impl UnboundedSenderWrapper {
pub fn send(&self, event: crossterm::event::Event) {
self.inner.se... | rust | Apache-2.0 | 956bec58fcb6dbd9e8740d925649772b1670ead9 | 2026-01-04T20:11:26.769763Z | false |
ymgyt/syndicationd | https://github.com/ymgyt/syndicationd/blob/956bec58fcb6dbd9e8740d925649772b1670ead9/crates/synd_term/src/main.rs | crates/synd_term/src/main.rs | use std::{future, path::PathBuf, process::ExitCode};
use anyhow::Context as _;
use futures_util::TryFutureExt as _;
use synd_stdx::fs::fsimpl::FileSystem;
use synd_term::{
application::{Application, Cache, Config, Features},
cli::{self, Args},
client::{github::GithubClient, synd_api::Client},
config::{... | rust | Apache-2.0 | 956bec58fcb6dbd9e8740d925649772b1670ead9 | 2026-01-04T20:11:26.769763Z | false |
ymgyt/syndicationd | https://github.com/ymgyt/syndicationd/blob/956bec58fcb6dbd9e8740d925649772b1670ead9/crates/synd_term/src/matcher.rs | crates/synd_term/src/matcher.rs | use std::{cell::RefCell, fmt, rc::Rc};
use nucleo::{
Utf32Str,
pattern::{AtomKind, CaseMatching, Normalization, Pattern},
};
#[derive(Clone)]
pub struct Matcher {
#[expect(clippy::struct_field_names)]
matcher: Rc<RefCell<nucleo::Matcher>>,
needle: Option<Pattern>,
// For Utf32 conversion
b... | rust | Apache-2.0 | 956bec58fcb6dbd9e8740d925649772b1670ead9 | 2026-01-04T20:11:26.769763Z | false |
ymgyt/syndicationd | https://github.com/ymgyt/syndicationd/blob/956bec58fcb6dbd9e8740d925649772b1670ead9/crates/synd_term/src/job.rs | crates/synd_term/src/job.rs | use std::{collections::VecDeque, num::NonZero};
use futures_util::{StreamExt as _, future::BoxFuture, stream::FuturesUnordered};
use crate::command::Command;
pub(crate) type JobFuture = BoxFuture<'static, anyhow::Result<Command>>;
pub(crate) struct Jobs {
futures: FuturesUnordered<JobFuture>,
delay_queue: V... | rust | Apache-2.0 | 956bec58fcb6dbd9e8740d925649772b1670ead9 | 2026-01-04T20:11:26.769763Z | false |
ymgyt/syndicationd | https://github.com/ymgyt/syndicationd/blob/956bec58fcb6dbd9e8740d925649772b1670ead9/crates/synd_term/src/auth/mod.rs | crates/synd_term/src/auth/mod.rs | use std::{
borrow::Borrow,
cmp::Ordering,
fmt,
ops::{Deref, Sub},
};
use chrono::{DateTime, Utc};
use serde::{Deserialize, Serialize};
use synd_auth::jwt::google::JwtError;
use thiserror::Error;
use tracing::debug;
use crate::{
application::{Cache, JwtService, LoadCacheError, PersistCacheError},
... | rust | Apache-2.0 | 956bec58fcb6dbd9e8740d925649772b1670ead9 | 2026-01-04T20:11:26.769763Z | false |
ymgyt/syndicationd | https://github.com/ymgyt/syndicationd/blob/956bec58fcb6dbd9e8740d925649772b1670ead9/crates/synd_term/src/auth/authenticator.rs | crates/synd_term/src/auth/authenticator.rs | use std::ops::Add;
use synd_auth::{
device_flow::{DeviceAuthorizationResponse, DeviceFlow, provider},
jwt,
};
use crate::{
auth::{AuthenticationProvider, Credential, CredentialError, Verified},
config,
types::Time,
};
#[derive(Clone)]
pub struct DeviceFlows {
pub github: DeviceFlow<provider::G... | rust | Apache-2.0 | 956bec58fcb6dbd9e8740d925649772b1670ead9 | 2026-01-04T20:11:26.769763Z | false |
ymgyt/syndicationd | https://github.com/ymgyt/syndicationd/blob/956bec58fcb6dbd9e8740d925649772b1670ead9/crates/synd_term/src/application/builder.rs | crates/synd_term/src/application/builder.rs | use crate::{
application::{Application, Authenticator, Cache, Clock, Config},
client::{github::GithubClient, synd_api::Client},
config::Categories,
interact::Interact,
terminal::Terminal,
ui::theme::Theme,
};
pub struct ApplicationBuilder<
Terminal = (),
Client = (),
Categories = ()... | rust | Apache-2.0 | 956bec58fcb6dbd9e8740d925649772b1670ead9 | 2026-01-04T20:11:26.769763Z | false |
ymgyt/syndicationd | https://github.com/ymgyt/syndicationd/blob/956bec58fcb6dbd9e8740d925649772b1670ead9/crates/synd_term/src/application/state.rs | crates/synd_term/src/application/state.rs | use crate::command::Command;
use bitflags::bitflags;
bitflags! {
pub(super) struct Should: u64 {
const Render = 1 << 0;
const Quit = 1 << 1;
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub(crate) enum TerminalFocus {
Gained,
Lost,
}
pub(super) struct State {
pub(super) flag... | rust | Apache-2.0 | 956bec58fcb6dbd9e8740d925649772b1670ead9 | 2026-01-04T20:11:26.769763Z | false |
ymgyt/syndicationd | https://github.com/ymgyt/syndicationd/blob/956bec58fcb6dbd9e8740d925649772b1670ead9/crates/synd_term/src/application/clock.rs | crates/synd_term/src/application/clock.rs | use chrono::{DateTime, Utc};
pub trait Clock {
fn now(&self) -> DateTime<Utc>;
}
pub struct SystemClock;
impl Clock for SystemClock {
fn now(&self) -> DateTime<Utc> {
Utc::now()
}
}
| rust | Apache-2.0 | 956bec58fcb6dbd9e8740d925649772b1670ead9 | 2026-01-04T20:11:26.769763Z | false |
ymgyt/syndicationd | https://github.com/ymgyt/syndicationd/blob/956bec58fcb6dbd9e8740d925649772b1670ead9/crates/synd_term/src/application/input_parser.rs | crates/synd_term/src/application/input_parser.rs | use nom_language::error::{VerboseError, VerboseErrorKind};
use thiserror::Error;
use crate::{
client::synd_api::mutation::subscribe_feed::SubscribeFeedInput,
config::Categories,
types::{self},
};
type NomError<'s> = VerboseError<&'s str>;
const CTX_REQUIREMENT: &str = "requirement";
const CTX_CATEGORY: &... | rust | Apache-2.0 | 956bec58fcb6dbd9e8740d925649772b1670ead9 | 2026-01-04T20:11:26.769763Z | false |
ymgyt/syndicationd | https://github.com/ymgyt/syndicationd/blob/956bec58fcb6dbd9e8740d925649772b1670ead9/crates/synd_term/src/application/mod.rs | crates/synd_term/src/application/mod.rs | use std::{
collections::VecDeque,
future,
num::NonZero,
ops::{ControlFlow, Sub},
pin::Pin,
sync::Arc,
time::Duration,
};
use chrono::{DateTime, Utc};
use crossterm::event::{Event as CrosstermEvent, KeyEvent, KeyEventKind};
use either::Either;
use futures_util::{FutureExt, Stream, StreamExt}... | rust | Apache-2.0 | 956bec58fcb6dbd9e8740d925649772b1670ead9 | 2026-01-04T20:11:26.769763Z | true |
ymgyt/syndicationd | https://github.com/ymgyt/syndicationd/blob/956bec58fcb6dbd9e8740d925649772b1670ead9/crates/synd_term/src/application/direction.rs | crates/synd_term/src/application/direction.rs | #[derive(Debug, PartialEq, Eq, Clone, Copy)]
pub(crate) enum Direction {
Up,
Down,
Left,
Right,
}
#[derive(PartialEq, Eq, Clone, Copy, Debug)]
pub(crate) enum IndexOutOfRange {
Wrapping,
#[allow(dead_code)]
Saturating,
}
impl Direction {
#[allow(
clippy::cast_sign_loss,
... | rust | Apache-2.0 | 956bec58fcb6dbd9e8740d925649772b1670ead9 | 2026-01-04T20:11:26.769763Z | false |
ymgyt/syndicationd | https://github.com/ymgyt/syndicationd/blob/956bec58fcb6dbd9e8740d925649772b1670ead9/crates/synd_term/src/application/app_config.rs | crates/synd_term/src/application/app_config.rs | use std::time::Duration;
use crate::config;
#[derive(Debug, Clone, Default)]
pub struct Features {
pub enable_github_notification: bool,
}
#[derive(Debug, Clone)]
pub struct Config {
pub idle_timer_interval: Duration,
pub throbber_timer_interval: Duration,
pub entries_limit: usize,
pub entries_pe... | rust | Apache-2.0 | 956bec58fcb6dbd9e8740d925649772b1670ead9 | 2026-01-04T20:11:26.769763Z | false |
ymgyt/syndicationd | https://github.com/ymgyt/syndicationd/blob/956bec58fcb6dbd9e8740d925649772b1670ead9/crates/synd_term/src/application/in_flight.rs | crates/synd_term/src/application/in_flight.rs | use std::{
collections::HashMap,
pin::Pin,
sync::atomic::{AtomicU64, Ordering},
time::Duration,
};
use tokio::time::{Instant, Sleep};
use crate::types::github::{IssueId, NotificationId, PullRequestId};
pub type RequestSequence = u64;
#[derive(Clone, Copy, PartialEq, Eq)]
pub(crate) enum RequestId {
... | rust | Apache-2.0 | 956bec58fcb6dbd9e8740d925649772b1670ead9 | 2026-01-04T20:11:26.769763Z | false |
ymgyt/syndicationd | https://github.com/ymgyt/syndicationd/blob/956bec58fcb6dbd9e8740d925649772b1670ead9/crates/synd_term/src/application/cache/mod.rs | crates/synd_term/src/application/cache/mod.rs | use std::{
borrow::Borrow,
io,
path::{Path, PathBuf},
};
use serde::{Serialize, de::DeserializeOwned};
use synd_stdx::fs::{FileSystem, fsimpl};
use thiserror::Error;
use crate::{
auth::{Credential, Unverified},
config,
ui::components::gh_notifications::GhNotificationFilterOptions,
};
#[derive... | rust | Apache-2.0 | 956bec58fcb6dbd9e8740d925649772b1670ead9 | 2026-01-04T20:11:26.769763Z | false |
ymgyt/syndicationd | https://github.com/ymgyt/syndicationd/blob/956bec58fcb6dbd9e8740d925649772b1670ead9/crates/synd_term/src/application/event/mod.rs | crates/synd_term/src/application/event/mod.rs | use crate::command::Command;
mod key_handlers;
pub use key_handlers::{KeyHandler, KeyHandlers};
#[expect(clippy::large_enum_variant)]
pub(crate) enum KeyEventResult {
Consumed {
command: Option<Command>,
should_render: bool,
},
Ignored,
}
impl KeyEventResult {
pub(super) fn is_consume... | rust | Apache-2.0 | 956bec58fcb6dbd9e8740d925649772b1670ead9 | 2026-01-04T20:11:26.769763Z | false |
ymgyt/syndicationd | https://github.com/ymgyt/syndicationd/blob/956bec58fcb6dbd9e8740d925649772b1670ead9/crates/synd_term/src/application/event/key_handlers.rs | crates/synd_term/src/application/event/key_handlers.rs | use std::{cell::RefCell, ops::ControlFlow, rc::Rc};
use crossterm::event::KeyEvent;
use crate::{application::event::KeyEventResult, keymap::Keymaps, ui::widgets::prompt::Prompt};
pub enum KeyHandler {
Prompt(Rc<RefCell<Prompt>>),
Keymaps(Keymaps),
}
impl KeyHandler {
fn handle(&mut self, event: &KeyEven... | rust | Apache-2.0 | 956bec58fcb6dbd9e8740d925649772b1670ead9 | 2026-01-04T20:11:26.769763Z | false |
ymgyt/syndicationd | https://github.com/ymgyt/syndicationd/blob/956bec58fcb6dbd9e8740d925649772b1670ead9/crates/synd_term/src/types/time.rs | crates/synd_term/src/types/time.rs | pub type Time = synd_feed::types::Time;
pub trait TimeExt {
fn local_ymd(&self) -> String;
fn local_ymd_hm(&self) -> String;
}
#[cfg(feature = "integration")]
impl TimeExt for Time {
fn local_ymd(&self) -> String {
self.format("%Y-%m-%d").to_string()
}
fn local_ymd_hm(&self) -> String {
... | rust | Apache-2.0 | 956bec58fcb6dbd9e8740d925649772b1670ead9 | 2026-01-04T20:11:26.769763Z | false |
ymgyt/syndicationd | https://github.com/ymgyt/syndicationd/blob/956bec58fcb6dbd9e8740d925649772b1670ead9/crates/synd_term/src/types/requirement_ext.rs | crates/synd_term/src/types/requirement_ext.rs | use ratatui::{style::Style, text::Span};
use synd_feed::types::Requirement;
use crate::ui::theme::RequirementLabelTheme;
pub trait RequirementExt {
fn label(&self, theme: &RequirementLabelTheme) -> Span<'static>;
}
impl RequirementExt for Requirement {
fn label(&self, theme: &RequirementLabelTheme) -> Span<'... | rust | Apache-2.0 | 956bec58fcb6dbd9e8740d925649772b1670ead9 | 2026-01-04T20:11:26.769763Z | false |
ymgyt/syndicationd | https://github.com/ymgyt/syndicationd/blob/956bec58fcb6dbd9e8740d925649772b1670ead9/crates/synd_term/src/types/mod.rs | crates/synd_term/src/types/mod.rs | use chrono::DateTime;
use schemars::JsonSchema;
use serde::{Deserialize, Serialize};
use synd_feed::types::{Category, FeedType, FeedUrl, Requirement};
use tracing::warn;
use crate::{
client::synd_api::{
mutation,
query::{self},
},
ui,
};
mod time;
pub use time::{Time, TimeExt};
mod page_i... | rust | Apache-2.0 | 956bec58fcb6dbd9e8740d925649772b1670ead9 | 2026-01-04T20:11:26.769763Z | false |
ymgyt/syndicationd | https://github.com/ymgyt/syndicationd/blob/956bec58fcb6dbd9e8740d925649772b1670ead9/crates/synd_term/src/types/github.rs | crates/synd_term/src/types/github.rs | use std::{fmt::Display, ops::Deref, str::FromStr};
use either::Either;
use octocrab::models::{self, activity::Subject};
use ratatui::{
style::{Color, Stylize},
text::Span,
};
use serde::{Deserialize, Serialize};
use synd_feed::types::Category;
use url::Url;
use crate::{
client::github::{issue_query, pull_... | rust | Apache-2.0 | 956bec58fcb6dbd9e8740d925649772b1670ead9 | 2026-01-04T20:11:26.769763Z | false |
ymgyt/syndicationd | https://github.com/ymgyt/syndicationd/blob/956bec58fcb6dbd9e8740d925649772b1670ead9/crates/synd_term/src/types/page_info.rs | crates/synd_term/src/types/page_info.rs | use crate::client::synd_api::query;
#[derive(Debug, Clone)]
pub struct PageInfo {
pub has_next_page: bool,
pub end_cursor: Option<String>,
}
impl From<query::entries::PageInfo> for PageInfo {
fn from(v: query::entries::PageInfo) -> Self {
Self {
has_next_page: v.has_next_page,
... | rust | Apache-2.0 | 956bec58fcb6dbd9e8740d925649772b1670ead9 | 2026-01-04T20:11:26.769763Z | false |
ymgyt/syndicationd | https://github.com/ymgyt/syndicationd/blob/956bec58fcb6dbd9e8740d925649772b1670ead9/crates/synd_term/src/terminal/integration_backend.rs | crates/synd_term/src/terminal/integration_backend.rs | use ratatui::backend::TestBackend;
pub type Buffer = ratatui::buffer::Buffer;
pub type TerminalBackend = TestBackend;
pub fn new_backend() -> TerminalBackend {
TestBackend::new(10, 10)
}
| rust | Apache-2.0 | 956bec58fcb6dbd9e8740d925649772b1670ead9 | 2026-01-04T20:11:26.769763Z | false |
ymgyt/syndicationd | https://github.com/ymgyt/syndicationd/blob/956bec58fcb6dbd9e8740d925649772b1670ead9/crates/synd_term/src/terminal/backend.rs | crates/synd_term/src/terminal/backend.rs | use ratatui::backend::CrosstermBackend;
pub type TerminalBackend = CrosstermBackend<std::io::Stdout>;
pub fn new_backend() -> TerminalBackend {
CrosstermBackend::new(std::io::stdout())
}
| rust | Apache-2.0 | 956bec58fcb6dbd9e8740d925649772b1670ead9 | 2026-01-04T20:11:26.769763Z | false |
ymgyt/syndicationd | https://github.com/ymgyt/syndicationd/blob/956bec58fcb6dbd9e8740d925649772b1670ead9/crates/synd_term/src/terminal/mod.rs | crates/synd_term/src/terminal/mod.rs | use crossterm::{
ExecutableCommand,
event::{EnableFocusChange, EventStream},
terminal::{self, EnterAlternateScreen, LeaveAlternateScreen},
};
use futures_util::{Stream, future::Either, stream};
use ratatui::Frame;
use std::io::{self, IsTerminal};
#[cfg(not(feature = "integration"))]
mod backend;
#[cfg(not(... | rust | Apache-2.0 | 956bec58fcb6dbd9e8740d925649772b1670ead9 | 2026-01-04T20:11:26.769763Z | false |
ymgyt/syndicationd | https://github.com/ymgyt/syndicationd/blob/956bec58fcb6dbd9e8740d925649772b1670ead9/crates/synd_term/src/keymap/default.rs | crates/synd_term/src/keymap/default.rs | use crate::keymap::{KeymapsConfig, macros::keymap};
pub fn default() -> KeymapsConfig {
let login = keymap!({
"enter" => authenticate,
"k" | "up" => move_up_authentication_provider,
"j" | "down" => move_down_authentication_provider,
});
let tabs = keymap!({
"tab" => move_rig... | rust | Apache-2.0 | 956bec58fcb6dbd9e8740d925649772b1670ead9 | 2026-01-04T20:11:26.769763Z | false |
ymgyt/syndicationd | https://github.com/ymgyt/syndicationd/blob/956bec58fcb6dbd9e8740d925649772b1670ead9/crates/synd_term/src/keymap/macros.rs | crates/synd_term/src/keymap/macros.rs | macro_rules! keymap {
( @count $token:tt ) => { () };
( @trie $cmd:ident ) => { $crate::keymap::KeyTrie::Command($crate::command::Command::$cmd()) };
(@trie
{ $( $($key:literal)|+ => $value:tt, )+ }
) => {
keymap!({ $( $($key)|+ => $value, )+ })
};
(
{ $( $($key:liter... | rust | Apache-2.0 | 956bec58fcb6dbd9e8740d925649772b1670ead9 | 2026-01-04T20:11:26.769763Z | false |
ymgyt/syndicationd | https://github.com/ymgyt/syndicationd/blob/956bec58fcb6dbd9e8740d925649772b1670ead9/crates/synd_term/src/keymap/mod.rs | crates/synd_term/src/keymap/mod.rs | use std::{collections::HashMap, ops::ControlFlow};
use anyhow::{anyhow, bail};
use crossterm::event::{KeyCode, KeyEvent, KeyModifiers};
mod default;
pub mod macros;
use crate::{application::event::KeyEventResult, command::Command};
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub(crate) enum KeymapId {
Global ... | rust | Apache-2.0 | 956bec58fcb6dbd9e8740d925649772b1670ead9 | 2026-01-04T20:11:26.769763Z | false |
ymgyt/syndicationd | https://github.com/ymgyt/syndicationd/blob/956bec58fcb6dbd9e8740d925649772b1670ead9/crates/synd_term/src/config/parse.rs | crates/synd_term/src/config/parse.rs | pub(crate) mod flag {
use std::time::Duration;
use synd_stdx::time::humantime::{DurationError, parse_duration};
pub(crate) fn parse_duration_opt(s: &str) -> Result<Duration, DurationError> {
parse_duration(s)
}
}
| rust | Apache-2.0 | 956bec58fcb6dbd9e8740d925649772b1670ead9 | 2026-01-04T20:11:26.769763Z | false |
ymgyt/syndicationd | https://github.com/ymgyt/syndicationd/blob/956bec58fcb6dbd9e8740d925649772b1670ead9/crates/synd_term/src/config/categories.rs | crates/synd_term/src/config/categories.rs | use std::{collections::HashMap, path::Path};
use anyhow::Context;
use ratatui::style::Color;
use serde::{Deserialize, Serialize};
use synd_feed::types::Category;
#[derive(Clone, Deserialize, Debug)]
pub struct Categories {
categories: HashMap<String, Entry>,
#[serde(skip)]
aliases: HashMap<String, String>... | rust | Apache-2.0 | 956bec58fcb6dbd9e8740d925649772b1670ead9 | 2026-01-04T20:11:26.769763Z | false |
ymgyt/syndicationd | https://github.com/ymgyt/syndicationd/blob/956bec58fcb6dbd9e8740d925649772b1670ead9/crates/synd_term/src/config/file.rs | crates/synd_term/src/config/file.rs | use std::{collections::HashMap, io, path::PathBuf, time::Duration};
use serde::{Deserialize, Serialize};
use thiserror::Error;
use url::Url;
use crate::{cli::Palette, config::categories};
#[derive(Debug, Serialize, Deserialize)]
pub struct CacheEntry {
pub(super) directory: Option<PathBuf>,
}
#[derive(Debug, Se... | rust | Apache-2.0 | 956bec58fcb6dbd9e8740d925649772b1670ead9 | 2026-01-04T20:11:26.769763Z | false |
ymgyt/syndicationd | https://github.com/ymgyt/syndicationd/blob/956bec58fcb6dbd9e8740d925649772b1670ead9/crates/synd_term/src/config/mod.rs | crates/synd_term/src/config/mod.rs | use std::{path::PathBuf, sync::OnceLock};
use directories::ProjectDirs;
mod categories;
pub use categories::{Categories, Icon, IconColor};
mod file;
pub use file::INIT_CONFIG;
pub(crate) mod parse;
mod resolver;
pub use resolver::ConfigResolver;
pub mod api {
pub const ENDPOINT: &str = "https://api.syndicationd... | rust | Apache-2.0 | 956bec58fcb6dbd9e8740d925649772b1670ead9 | 2026-01-04T20:11:26.769763Z | false |
ymgyt/syndicationd | https://github.com/ymgyt/syndicationd/blob/956bec58fcb6dbd9e8740d925649772b1670ead9/crates/synd_term/src/config/resolver.rs | crates/synd_term/src/config/resolver.rs | use std::{
io::{self, ErrorKind},
path::PathBuf,
time::Duration,
};
use synd_stdx::{
conf::Entry,
fs::{FileSystem, fsimpl},
};
use thiserror::Error;
use url::Url;
use crate::{
cli::{self, ApiOptions, FeedOptions, GithubOptions},
config::{
self, Categories,
file::{ConfigFile... | rust | Apache-2.0 | 956bec58fcb6dbd9e8740d925649772b1670ead9 | 2026-01-04T20:11:26.769763Z | false |
ymgyt/syndicationd | https://github.com/ymgyt/syndicationd/blob/956bec58fcb6dbd9e8740d925649772b1670ead9/crates/synd_term/src/cli/port.rs | crates/synd_term/src/cli/port.rs | use std::{path::PathBuf, time::Duration};
use anyhow::anyhow;
use url::Url;
use crate::{
application::{Cache, Clock, JwtService, SystemClock},
auth,
client::synd_api::Client,
};
pub(super) struct PortContext {
pub(super) client: Client,
}
impl PortContext {
pub(super) async fn new(endpoint: Url,... | rust | Apache-2.0 | 956bec58fcb6dbd9e8740d925649772b1670ead9 | 2026-01-04T20:11:26.769763Z | false |
ymgyt/syndicationd | https://github.com/ymgyt/syndicationd/blob/956bec58fcb6dbd9e8740d925649772b1670ead9/crates/synd_term/src/cli/mod.rs | crates/synd_term/src/cli/mod.rs | use std::{path::PathBuf, time::Duration};
use clap::{Parser, Subcommand};
use serde::{Deserialize, Serialize};
use url::Url;
use crate::{config, ui::theme};
mod command;
mod port;
#[derive(Copy, Clone, PartialEq, Eq, Debug, clap::ValueEnum, Serialize, Deserialize)]
#[serde(rename_all(deserialize = "kebab-case"))]
p... | rust | Apache-2.0 | 956bec58fcb6dbd9e8740d925649772b1670ead9 | 2026-01-04T20:11:26.769763Z | false |
ymgyt/syndicationd | https://github.com/ymgyt/syndicationd/blob/956bec58fcb6dbd9e8740d925649772b1670ead9/crates/synd_term/src/cli/command/check.rs | crates/synd_term/src/cli/command/check.rs | use std::{io, path::Path, process::ExitCode, time::Duration};
use anyhow::Context;
use clap::Args;
use synd_o11y::health_check::Health;
use crate::{client::synd_api::Client, config::ConfigResolver};
#[derive(Copy, Clone, PartialEq, Eq, Debug, clap::ValueEnum)]
pub enum CheckFormat {
Human,
Json,
}
/// Check... | rust | Apache-2.0 | 956bec58fcb6dbd9e8740d925649772b1670ead9 | 2026-01-04T20:11:26.769763Z | false |
ymgyt/syndicationd | https://github.com/ymgyt/syndicationd/blob/956bec58fcb6dbd9e8740d925649772b1670ead9/crates/synd_term/src/cli/command/mod.rs | crates/synd_term/src/cli/command/mod.rs | pub mod check;
pub mod clean;
pub mod config;
pub mod export;
pub mod import;
| rust | Apache-2.0 | 956bec58fcb6dbd9e8740d925649772b1670ead9 | 2026-01-04T20:11:26.769763Z | false |
ymgyt/syndicationd | https://github.com/ymgyt/syndicationd/blob/956bec58fcb6dbd9e8740d925649772b1670ead9/crates/synd_term/src/cli/command/export.rs | crates/synd_term/src/cli/command/export.rs | use std::{path::PathBuf, process::ExitCode};
use clap::Args;
use schemars::JsonSchema;
use serde::Serialize;
use url::Url;
use crate::{cli::port::PortContext, config, types::ExportedFeed};
#[derive(Serialize, JsonSchema)]
struct Export {
feeds: Vec<ExportedFeed>,
}
/// Export subscribed feeds
#[derive(Args, Deb... | rust | Apache-2.0 | 956bec58fcb6dbd9e8740d925649772b1670ead9 | 2026-01-04T20:11:26.769763Z | false |
ymgyt/syndicationd | https://github.com/ymgyt/syndicationd/blob/956bec58fcb6dbd9e8740d925649772b1670ead9/crates/synd_term/src/cli/command/import.rs | crates/synd_term/src/cli/command/import.rs | use std::{
io,
path::{Path, PathBuf},
process::ExitCode,
time::Duration,
};
use clap::Args;
use either::Either;
use schemars::JsonSchema;
use serde::{Deserialize, Serialize};
use url::Url;
use crate::{
cli::port::PortContext,
client::synd_api::{
Client, SubscribeFeedError, SyndApiError... | rust | Apache-2.0 | 956bec58fcb6dbd9e8740d925649772b1670ead9 | 2026-01-04T20:11:26.769763Z | false |
ymgyt/syndicationd | https://github.com/ymgyt/syndicationd/blob/956bec58fcb6dbd9e8740d925649772b1670ead9/crates/synd_term/src/cli/command/clean.rs | crates/synd_term/src/cli/command/clean.rs | use std::{
io::ErrorKind,
path::{Path, PathBuf},
process::ExitCode,
};
use anyhow::Context;
use clap::Args;
use synd_stdx::fs::FileSystem;
use crate::{application::Cache, config};
/// Clean cache and logs
#[derive(Args, Debug)]
pub struct CleanCommand {
/// Cache directory
#[arg(
long,
... | rust | Apache-2.0 | 956bec58fcb6dbd9e8740d925649772b1670ead9 | 2026-01-04T20:11:26.769763Z | false |
ymgyt/syndicationd | https://github.com/ymgyt/syndicationd/blob/956bec58fcb6dbd9e8740d925649772b1670ead9/crates/synd_term/src/cli/command/config/mod.rs | crates/synd_term/src/cli/command/config/mod.rs | use std::process::ExitCode;
use clap::{Args, Subcommand};
mod init;
/// Manage configurations
#[derive(Args, Debug)]
pub struct ConfigCommand {
#[command(subcommand)]
pub command: ConfigSubcommand,
}
#[derive(Subcommand, Debug)]
pub enum ConfigSubcommand {
Init(init::ConfigInitCommand),
}
impl ConfigCo... | rust | Apache-2.0 | 956bec58fcb6dbd9e8740d925649772b1670ead9 | 2026-01-04T20:11:26.769763Z | false |
ymgyt/syndicationd | https://github.com/ymgyt/syndicationd/blob/956bec58fcb6dbd9e8740d925649772b1670ead9/crates/synd_term/src/cli/command/config/init.rs | crates/synd_term/src/cli/command/config/init.rs | use std::process::ExitCode;
use clap::Args;
use crate::config;
/// Print configuration template
#[derive(Args, Debug)]
pub struct ConfigInitCommand {}
impl ConfigInitCommand {
#[allow(clippy::unused_self)]
pub fn run(self) -> ExitCode {
print!("{}", config::INIT_CONFIG.trim_start().trim_end());
... | rust | Apache-2.0 | 956bec58fcb6dbd9e8740d925649772b1670ead9 | 2026-01-04T20:11:26.769763Z | false |
ymgyt/syndicationd | https://github.com/ymgyt/syndicationd/blob/956bec58fcb6dbd9e8740d925649772b1670ead9/crates/synd_term/src/client/mod.rs | crates/synd_term/src/client/mod.rs | pub mod github;
pub mod synd_api;
| rust | Apache-2.0 | 956bec58fcb6dbd9e8740d925649772b1670ead9 | 2026-01-04T20:11:26.769763Z | false |
ymgyt/syndicationd | https://github.com/ymgyt/syndicationd/blob/956bec58fcb6dbd9e8740d925649772b1670ead9/crates/synd_term/src/client/github/mod.rs | crates/synd_term/src/client/github/mod.rs | use graphql_client::GraphQLQuery;
use octocrab::Octocrab;
use serde::{Deserialize, Serialize};
use thiserror::Error;
use crate::{
config,
types::github::{
IssueContext, IssueId, Notification, NotificationContext, NotificationId,
PullRequestContext, PullRequestId, RepositoryKey, ThreadId,
},... | rust | Apache-2.0 | 956bec58fcb6dbd9e8740d925649772b1670ead9 | 2026-01-04T20:11:26.769763Z | false |
ymgyt/syndicationd | https://github.com/ymgyt/syndicationd/blob/956bec58fcb6dbd9e8740d925649772b1670ead9/crates/synd_term/src/client/synd_api/scalar.rs | crates/synd_term/src/client/synd_api/scalar.rs | pub type Category = synd_feed::types::Category<'static>;
pub type FeedUrl = synd_feed::types::FeedUrl;
pub type Rfc3339Time = String;
| rust | Apache-2.0 | 956bec58fcb6dbd9e8740d925649772b1670ead9 | 2026-01-04T20:11:26.769763Z | false |
ymgyt/syndicationd | https://github.com/ymgyt/syndicationd/blob/956bec58fcb6dbd9e8740d925649772b1670ead9/crates/synd_term/src/client/synd_api/mod.rs | crates/synd_term/src/client/synd_api/mod.rs | use std::{fmt::Debug, time::Duration};
use anyhow::anyhow;
use graphql_client::{GraphQLQuery, Response};
use reqwest::header::{self, HeaderValue};
use serde::{Serialize, de::DeserializeOwned};
use synd_o11y::{health_check::Health, opentelemetry::extension::*};
use thiserror::Error;
use tracing::Span;
use url::Url;
us... | rust | Apache-2.0 | 956bec58fcb6dbd9e8740d925649772b1670ead9 | 2026-01-04T20:11:26.769763Z | false |
ymgyt/syndicationd | https://github.com/ymgyt/syndicationd/blob/956bec58fcb6dbd9e8740d925649772b1670ead9/crates/synd_term/src/client/synd_api/payload.rs | crates/synd_term/src/client/synd_api/payload.rs | use crate::{client::synd_api::query, types};
#[derive(Debug, Clone)]
pub struct FetchEntriesPayload {
pub entries: Vec<types::Entry>,
pub page_info: types::PageInfo,
}
impl From<query::entries::EntriesOutput> for FetchEntriesPayload {
fn from(v: query::entries::EntriesOutput) -> Self {
let page_in... | rust | Apache-2.0 | 956bec58fcb6dbd9e8740d925649772b1670ead9 | 2026-01-04T20:11:26.769763Z | false |
ymgyt/syndicationd | https://github.com/ymgyt/syndicationd/blob/956bec58fcb6dbd9e8740d925649772b1670ead9/crates/synd_term/src/client/synd_api/generated/mutation.rs | crates/synd_term/src/client/synd_api/generated/mutation.rs | #![allow(clippy::all, warnings)]
pub struct SubscribeFeed;
pub mod subscribe_feed {
#![allow(dead_code)]
use std::result::Result;
pub const OPERATION_NAME: &str = "SubscribeFeed";
pub const QUERY: &str = "mutation SubscribeFeed($subscribeInput: SubscribeFeedInput!) {\n subscribeFeed(input: $subscribeIn... | rust | Apache-2.0 | 956bec58fcb6dbd9e8740d925649772b1670ead9 | 2026-01-04T20:11:26.769763Z | false |
ymgyt/syndicationd | https://github.com/ymgyt/syndicationd/blob/956bec58fcb6dbd9e8740d925649772b1670ead9/crates/synd_term/src/client/synd_api/generated/query.rs | crates/synd_term/src/client/synd_api/generated/query.rs | #![allow(clippy::all, warnings)]
pub struct Subscription;
pub mod subscription {
#![allow(dead_code)]
use std::result::Result;
pub const OPERATION_NAME: &str = "Subscription";
pub const QUERY: &str = "query Subscription($after: String, $first: Int) {\n output: subscription {\n feeds(after: $after, f... | rust | Apache-2.0 | 956bec58fcb6dbd9e8740d925649772b1670ead9 | 2026-01-04T20:11:26.769763Z | false |
ymgyt/syndicationd | https://github.com/ymgyt/syndicationd/blob/956bec58fcb6dbd9e8740d925649772b1670ead9/crates/synd_term/src/ui/icon.rs | crates/synd_term/src/ui/icon.rs | #[rustfmt::skip]
macro_rules! icon {
(browse) => { "" };
(feeds) => { "" };
(feedsoff) => { "" };
(entries) => { "" };
(category) => { "" };
(calendar) => { "" };
(chat) => { "" };
(check) =>... | rust | Apache-2.0 | 956bec58fcb6dbd9e8740d925649772b1670ead9 | 2026-01-04T20:11:26.769763Z | false |
ymgyt/syndicationd | https://github.com/ymgyt/syndicationd/blob/956bec58fcb6dbd9e8740d925649772b1670ead9/crates/synd_term/src/ui/theme.rs | crates/synd_term/src/ui/theme.rs | use ratatui::style::{Color, Modifier, Style};
#[derive(Clone)]
pub struct Theme {
pub name: &'static str,
pub base: Style,
pub application_title: Style,
pub login: LoginTheme,
pub tabs: Style,
pub tabs_selected: Style,
pub prompt: PromptTheme,
pub subscription: SubscriptionTheme,
pu... | rust | Apache-2.0 | 956bec58fcb6dbd9e8740d925649772b1670ead9 | 2026-01-04T20:11:26.769763Z | false |
ymgyt/syndicationd | https://github.com/ymgyt/syndicationd/blob/956bec58fcb6dbd9e8740d925649772b1670ead9/crates/synd_term/src/ui/extension.rs | crates/synd_term/src/ui/extension.rs | use ratatui::{
buffer::Buffer,
prelude::{Constraint, Direction, Layout, Rect},
};
pub(super) trait RectExt {
/// Create centered Rect
fn centered(self, percent_x: u16, percent_y: u16) -> Rect;
/// Reset this area
fn reset(&self, buf: &mut Buffer);
}
impl RectExt for Rect {
fn centered(sel... | rust | Apache-2.0 | 956bec58fcb6dbd9e8740d925649772b1670ead9 | 2026-01-04T20:11:26.769763Z | false |
ymgyt/syndicationd | https://github.com/ymgyt/syndicationd/blob/956bec58fcb6dbd9e8740d925649772b1670ead9/crates/synd_term/src/ui/mod.rs | crates/synd_term/src/ui/mod.rs | use std::{str::FromStr, sync::OnceLock};
use ratatui::style::{Color, Modifier};
use synd_feed::types::{Category, Requirement};
use crate::{
application::{InFlight, TerminalFocus},
config::{Categories, Icon, IconColor},
types::Time,
ui::{components::tabs::Tab, theme::Theme},
};
pub mod components;
pub... | rust | Apache-2.0 | 956bec58fcb6dbd9e8740d925649772b1670ead9 | 2026-01-04T20:11:26.769763Z | false |
ymgyt/syndicationd | https://github.com/ymgyt/syndicationd/blob/956bec58fcb6dbd9e8740d925649772b1670ead9/crates/synd_term/src/ui/components/tabs.rs | crates/synd_term/src/ui/components/tabs.rs | use ratatui::{
prelude::{Buffer, Constraint, Layout, Rect},
text::Span,
widgets::{Paragraph, Tabs as TuiTabs, Widget},
};
use crate::{
application::{Direction, Features, IndexOutOfRange},
ui::{Context, icon},
};
#[derive(PartialEq, Eq, Debug, Clone, Copy)]
pub enum Tab {
Entries,
Feeds,
... | rust | Apache-2.0 | 956bec58fcb6dbd9e8740d925649772b1670ead9 | 2026-01-04T20:11:26.769763Z | false |
ymgyt/syndicationd | https://github.com/ymgyt/syndicationd/blob/956bec58fcb6dbd9e8740d925649772b1670ead9/crates/synd_term/src/ui/components/status.rs | crates/synd_term/src/ui/components/status.rs | use std::borrow::Cow;
use ratatui::{
prelude::{Alignment, Buffer, Constraint, Layout, Rect},
text::{Line, Span},
widgets::{Paragraph, StatefulWidget, Widget, Wrap},
};
use crate::{
application::RequestId,
ui::{
Context, icon,
widgets::throbber::{
Throbber, ThrobberState... | rust | Apache-2.0 | 956bec58fcb6dbd9e8740d925649772b1670ead9 | 2026-01-04T20:11:26.769763Z | false |
ymgyt/syndicationd | https://github.com/ymgyt/syndicationd/blob/956bec58fcb6dbd9e8740d925649772b1670ead9/crates/synd_term/src/ui/components/root.rs | crates/synd_term/src/ui/components/root.rs | use ratatui::{
prelude::{Buffer, Constraint, Layout, Rect},
widgets::{Block, Widget},
};
use crate::ui::{
Context,
components::{Components, filter::FilterContext, tabs::Tab},
};
pub struct Root<'a> {
components: &'a Components,
cx: Context<'a>,
}
impl<'a> Root<'a> {
pub fn new(components:... | rust | Apache-2.0 | 956bec58fcb6dbd9e8740d925649772b1670ead9 | 2026-01-04T20:11:26.769763Z | false |
ymgyt/syndicationd | https://github.com/ymgyt/syndicationd/blob/956bec58fcb6dbd9e8740d925649772b1670ead9/crates/synd_term/src/ui/components/entries.rs | crates/synd_term/src/ui/components/entries.rs | use std::borrow::Cow;
use crate::{
application::{Direction, Populate},
client::synd_api::payload,
types::{self, RequirementExt, TimeExt},
ui::{
self, Context,
components::{collections::FilterableVec, filter::FeedFilterer},
icon,
widgets::{scrollbar::Scrollbar, table::Tab... | rust | Apache-2.0 | 956bec58fcb6dbd9e8740d925649772b1670ead9 | 2026-01-04T20:11:26.769763Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.