pub trait BinderProtocol {
Show 19 methods // Required methods fn authenticate<'life0, 'async_trait>( &'life0 self, auth_req: AuthRequest ) -> Pin<Box<dyn Future<Output = Result<AuthResponse, AuthError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn authenticate_v2<'life0, 'async_trait>( &'life0 self, auth_req: AuthRequestV2 ) -> Pin<Box<dyn Future<Output = Result<AuthResponseV2, AuthError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn get_login_url<'life0, 'async_trait>( &'life0 self, credentials: Credentials ) -> Pin<Box<dyn Future<Output = Result<String, AuthError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn validate<'life0, 'async_trait>( &'life0 self, token: BlindToken ) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn get_captcha<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = Result<Captcha, MiscFatalError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn register_user<'life0, 'async_trait>( &'life0 self, username: SmolStr, password: SmolStr, captcha_id: SmolStr, captcha_soln: SmolStr ) -> Pin<Box<dyn Future<Output = Result<(), RegisterError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn register_user_v2<'life0, 'async_trait>( &'life0 self, credentials: Credentials, captcha_id: SmolStr, captcha_soln: SmolStr ) -> Pin<Box<dyn Future<Output = Result<(), RegisterError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn delete_user<'life0, 'async_trait>( &'life0 self, username: SmolStr, password: SmolStr ) -> Pin<Box<dyn Future<Output = Result<(), AuthError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn delete_user_v2<'life0, 'async_trait>( &'life0 self, credentials: Credentials ) -> Pin<Box<dyn Future<Output = Result<(), AuthError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn add_bridge_route<'life0, 'async_trait>( &'life0 self, descriptor: BridgeDescriptor ) -> Pin<Box<dyn Future<Output = Result<(), MiscFatalError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn get_summary<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = MasterSummary> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn get_bridges<'life0, 'async_trait>( &'life0 self, token: BlindToken, exit: SmolStr ) -> Pin<Box<dyn Future<Output = Vec<BridgeDescriptor>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn get_bridges_v2<'life0, 'async_trait>( &'life0 self, token: BlindToken, exit: SmolStr ) -> Pin<Box<dyn Future<Output = Vec<BridgeDescriptor>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn get_mizaru_pk<'life0, 'async_trait>( &'life0 self, level: Level ) -> Pin<Box<dyn Future<Output = PublicKey> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn get_mizaru_epoch_key<'life0, 'async_trait>( &'life0 self, level: Level, epoch: u16 ) -> Pin<Box<dyn Future<Output = RSAPublicKey> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn get_announcements<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = String> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn reverse_proxy_melnode<'life0, 'async_trait>( &'life0 self, req: JrpcRequest ) -> Pin<Box<dyn Future<Output = Result<JrpcResponse, RpcError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn add_metric<'life0, 'async_trait>( &'life0 self, session: i64, data: Value ) -> Pin<Box<dyn Future<Output = Result<(), MiscFatalError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn get_user_info<'life0, 'async_trait>( &'life0 self, auth_req: Credentials ) -> Pin<Box<dyn Future<Output = Result<UserInfoV2, AuthError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait;
}

Required Methods§

source

fn authenticate<'life0, 'async_trait>( &'life0 self, auth_req: AuthRequest ) -> Pin<Box<dyn Future<Output = Result<AuthResponse, AuthError>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

Authenticates a 24-hour-long session for a user. NOTE: This is a legacy method, and will be deprecated later.

source

fn authenticate_v2<'life0, 'async_trait>( &'life0 self, auth_req: AuthRequestV2 ) -> Pin<Box<dyn Future<Output = Result<AuthResponseV2, AuthError>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

Authenticates a 24-hour-long session for a user.

source

fn get_login_url<'life0, 'async_trait>( &'life0 self, credentials: Credentials ) -> Pin<Box<dyn Future<Output = Result<String, AuthError>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

Retrieves a login url

source

fn validate<'life0, 'async_trait>( &'life0 self, token: BlindToken ) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

Validates a blind signature token, applying rate-limiting as appropriate

source

fn get_captcha<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = Result<Captcha, MiscFatalError>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

Obtains a unique captcha, for user registry.

source

fn register_user<'life0, 'async_trait>( &'life0 self, username: SmolStr, password: SmolStr, captcha_id: SmolStr, captcha_soln: SmolStr ) -> Pin<Box<dyn Future<Output = Result<(), RegisterError>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

Registers a new user. NOTE: This is a legacy method, and will be deprecated later.

source

fn register_user_v2<'life0, 'async_trait>( &'life0 self, credentials: Credentials, captcha_id: SmolStr, captcha_soln: SmolStr ) -> Pin<Box<dyn Future<Output = Result<(), RegisterError>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

Registers a new user.

source

fn delete_user<'life0, 'async_trait>( &'life0 self, username: SmolStr, password: SmolStr ) -> Pin<Box<dyn Future<Output = Result<(), AuthError>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

Deletes a user. NOTE: This is a legacy method, and will be deprecated later.

source

fn delete_user_v2<'life0, 'async_trait>( &'life0 self, credentials: Credentials ) -> Pin<Box<dyn Future<Output = Result<(), AuthError>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

Deletes a user.

source

fn add_bridge_route<'life0, 'async_trait>( &'life0 self, descriptor: BridgeDescriptor ) -> Pin<Box<dyn Future<Output = Result<(), MiscFatalError>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

Adds a bridge route.

source

fn get_summary<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = MasterSummary> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

Obtains the master summary of the network state.

source

fn get_bridges<'life0, 'async_trait>( &'life0 self, token: BlindToken, exit: SmolStr ) -> Pin<Box<dyn Future<Output = Vec<BridgeDescriptor>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

Obtains a list of bridges.

source

fn get_bridges_v2<'life0, 'async_trait>( &'life0 self, token: BlindToken, exit: SmolStr ) -> Pin<Box<dyn Future<Output = Vec<BridgeDescriptor>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

Obtains a list of bridges, limited to sosistab2.

source

fn get_mizaru_pk<'life0, 'async_trait>( &'life0 self, level: Level ) -> Pin<Box<dyn Future<Output = PublicKey> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

Obtains the Mizaru long-term key.

source

fn get_mizaru_epoch_key<'life0, 'async_trait>( &'life0 self, level: Level, epoch: u16 ) -> Pin<Box<dyn Future<Output = RSAPublicKey> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

Obtains a Mizaru epoch key.

source

fn get_announcements<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = String> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

Obtains recent announcements, as a string containing an RSS feed.

source

fn reverse_proxy_melnode<'life0, 'async_trait>( &'life0 self, req: JrpcRequest ) -> Pin<Box<dyn Future<Output = Result<JrpcResponse, RpcError>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

Reverse proxies requests to melnode

source

fn add_metric<'life0, 'async_trait>( &'life0 self, session: i64, data: Value ) -> Pin<Box<dyn Future<Output = Result<(), MiscFatalError>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

Adds a specific metric datapoint to the db

source

fn get_user_info<'life0, 'async_trait>( &'life0 self, auth_req: Credentials ) -> Pin<Box<dyn Future<Output = Result<UserInfoV2, AuthError>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

Retrieves user info

Implementors§