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§
Sourcefn 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<'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.
Sourcefn 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 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.
Sourcefn 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 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
Sourcefn 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 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
Sourcefn 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 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.
Sourcefn 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<'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.
Sourcefn 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 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.
Sourcefn 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<'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.
Sourcefn 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 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.
Sourcefn 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 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.
Sourcefn 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_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.
Sourcefn 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<'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.
Sourcefn 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_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.
Sourcefn 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_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.
Sourcefn 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_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.
Sourcefn get_announcements<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = String> + 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,
Obtains recent announcements, as a string containing an RSS feed.
Sourcefn 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 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
Sourcefn 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 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
Sourcefn 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,
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