Restructure CLI to use subcommands
This commit is contained in:
parent
42f2fa5f80
commit
b6707e34b8
5 changed files with 341 additions and 253 deletions
36
src/bin/xpkey/keys.rs
Normal file
36
src/bin/xpkey/keys.rs
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
use std::collections::HashMap;
|
||||
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
#[derive(Serialize, Deserialize)]
|
||||
pub struct Keys {
|
||||
#[serde(rename = "Products")]
|
||||
pub products: HashMap<String, Product>,
|
||||
#[serde(rename = "BINK")]
|
||||
pub bink: HashMap<String, Bink>,
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize)]
|
||||
pub struct Product {
|
||||
#[serde(rename = "BINK")]
|
||||
pub bink: Vec<String>,
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize)]
|
||||
pub struct Bink {
|
||||
pub p: String,
|
||||
pub a: String,
|
||||
pub b: String,
|
||||
pub g: Point,
|
||||
#[serde(rename = "pub")]
|
||||
pub public: Point,
|
||||
pub n: String,
|
||||
#[serde(rename = "priv")]
|
||||
pub private: String,
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize)]
|
||||
pub struct Point {
|
||||
pub x: String,
|
||||
pub y: String,
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue