omg_api/
purl.rs

1use clap::Subcommand;
2
3#[derive(Debug, Subcommand)]
4pub enum Purl {
5    /// Create a new PURL for an omg.lol address
6    Create {
7        /// Name of the PURL to create
8        name: String,
9        /// URL for the PURL to redirect to
10        url: String,
11    },
12    /// Get a specific PURL for an omg.lol address
13    Get {
14        /// Name of the PURL to get
15        name: String,
16    },
17    /// List all PURLs for an omg.lol address
18    List,
19    /// Delete a PURL for an omg.lol address
20    Delete {
21        /// Name of the PURL to delete
22        name: String,
23    },
24}
25
26impl Purl {
27    pub fn process(&self, _address: &str) {
28        match self {
29            Purl::Create { name: _, url: _ } => todo!(),
30            Purl::Get { name: _ } => todo!(),
31            Purl::List => todo!(),
32            Purl::Delete { name: _ } => todo!(),
33        }
34    }
35}