use crate::models;
use serde::{Deserialize, Serialize};
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum PluginType {
#[serde(rename = "format_handler")]
FormatHandler,
#[serde(rename = "storage_backend")]
StorageBackend,
#[serde(rename = "authentication")]
Authentication,
#[serde(rename = "authorization")]
Authorization,
#[serde(rename = "webhook")]
Webhook,
#[serde(rename = "custom")]
Custom,
}
impl std::fmt::Display for PluginType {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
match self {
Self::FormatHandler => write!(f, "format_handler"),
Self::StorageBackend => write!(f, "storage_backend"),
Self::Authentication => write!(f, "authentication"),
Self::Authorization => write!(f, "authorization"),
Self::Webhook => write!(f, "webhook"),
Self::Custom => write!(f, "custom"),
}
}
}
impl Default for PluginType {
fn default() -> PluginType {
Self::FormatHandler
}
}