blob: a919fd813ef2ab8acc99236a08292ce921638d07 (
plain) (
tree)
|
|
#![warn(missing_docs)]
//! Small things that couldn't fit elsewhere in Kittybox, yet may be
//! useful on their own or in multiple Kittybox crates.
//!
//! Some things are gated behind features, namely:
//! - `fs` - enables use of filesystem-related utilities
use serde::{Deserialize, Serialize};
#[derive(Clone, Serialize, Deserialize)]
pub struct IndiewebEndpoints {
pub authorization_endpoint: String,
pub token_endpoint: String,
pub webmention: Option<String>,
pub microsub: Option<String>,
}
#[derive(Debug, Default)]
/// Common types of webmentions.
pub enum MentionType {
/// Corresponds to a `u-in-reply-to` link.
Reply,
/// Corresponds to a `u-like-of` link.
Like,
/// Corresponds to a `u-repost-of` link.
Repost,
/// Corresponds to a `u-bookmark-of` link.
Bookmark,
/// A plain link without MF2 annotations.
#[default]
Mention
}
/// Common data-types useful in creating smart authentication systems.
pub mod auth {
#[derive(PartialEq, Eq, Hash, Clone, Copy)]
pub enum EnrolledCredential {
/// An indicator that a password is enrolled. Passwords can be
/// used to recover from a lost token.
Password,
/// An indicator that one or more WebAuthn credentials were
/// enrolled.
WebAuthn
}
}
pub mod micropub;
/// A collection of traits for implementing a robust job queue.
pub mod queue;
#[cfg(feature = "fs")]
/// Commonly-used operations with the file system in Kittybox's
/// underlying storage mechanisms.
pub mod fs;
|