keybase-protocol 0.1.1

Provides the Keybase types defined in the Keybase AVDL Protocol files for Rust.
Documentation
// Namespace: "keybase.1"
// Protocol: "proveCommon"
#![allow(dead_code)]
#![allow(non_snake_case)]
#![allow(non_camel_case_types)]
#![allow(unused_imports)]
use serde::{Serialize, Deserialize};
use serde_repr::{Deserialize_repr, Serialize_repr};use super::*;

#[derive(Serialize_repr, Deserialize_repr, Debug, Hash, PartialEq, Eq)]
#[repr(u8)]
pub enum ProofState {
  None_0,
  Ok_1,
  Temp_failure_2,
  Perm_failure_3,
  Looking_4,
  Superseded_5,
  Posted_6,
  Revoked_7,
  Deleted_8,
  Unknown_type_9,
  Sig_hint_missing_10,
  Unchecked_11,
}

#[derive(Serialize_repr, Deserialize_repr, Debug, Hash, PartialEq, Eq)]
#[repr(u8)]
pub enum ProofStatus {
  None_0,
  Ok_1,
  Local_2,
  Found_3,
  Base_error_100,
  Host_unreachable_101,
  Permission_denied_103,
  Failed_parse_106,
  Dns_error_107,
  Auth_failed_108,
  Http_429_129,
  Http_500_150,
  Timeout_160,
  Internal_error_170,
  Unchecked_171,
  Missing_pvl_172,
  Base_hard_error_200,
  Not_found_201,
  Content_failure_202,
  Bad_username_203,
  Bad_remote_id_204,
  Text_not_found_205,
  Bad_args_206,
  Content_missing_207,
  Title_not_found_208,
  Service_error_209,
  Tor_skipped_210,
  Tor_incompatible_211,
  Http_300_230,
  Http_400_240,
  Http_other_260,
  Empty_json_270,
  Deleted_301,
  Service_dead_302,
  Bad_signature_303,
  Bad_api_url_304,
  Unknown_type_305,
  No_hint_306,
  Bad_hint_text_307,
  Invalid_pvl_308,
}

#[derive(Serialize_repr, Deserialize_repr, Debug, Hash, PartialEq, Eq)]
#[repr(u8)]
pub enum ProofType {
  None_0,
  Keybase_1,
  Twitter_2,
  Github_3,
  Reddit_4,
  Coinbase_5,
  Hackernews_6,
  Facebook_8,
  Generic_social_9,
  Generic_web_site_1000,
  Dns_1001,
  Pgp_1002,
  Rooter_100001,
}

pub struct SelectorEntry {
  pub isIndex: bool,
  pub index: i32,
  pub isKey: bool,
  pub key: Option<String>,
  pub isAll: bool,
  pub isContents: bool,
}

pub struct ParamProofJSON {
  pub sigHash: SigID,
  pub kbUsername: Option<String>,
}

pub struct ParamProofUsernameConfig {
  pub re: Option<String>,
  pub min: i32,
  pub max: i32,
}

pub struct ParamProofLogoConfig {
  pub svgBlack: Option<String>,
  pub svgFull: Option<String>,
}

pub struct ParamProofServiceConfig {
  pub version: i32,
  pub domain: Option<String>,
  pub displayName: Option<String>,
  pub logo: Option<ParamProofLogoConfig>,
  pub description: Option<String>,
  pub usernameConfig: ParamProofUsernameConfig,
  pub brandColor: Option<String>,
  pub prefillUrl: Option<String>,
  pub profileUrl: Option<String>,
  pub checkUrl: Option<String>,
  pub checkPath: Option<Vec<SelectorEntry>>,
  pub avatarPath: Option<Vec<SelectorEntry>>,
}

pub struct ServiceDisplayConfig {
  pub creationDisabled: bool,
  pub priority: i32,
  pub key: Option<String>,
  pub group: Option<String>,
  pub new: bool,
  pub logoKey: Option<String>,
}

pub struct ExternalServiceConfig {
  pub schemaVersion: i32,
  pub display: Option<ServiceDisplayConfig>,
  pub config: Option<ParamProofServiceConfig>,
}