Trait geph4_protocol::binder::protocol::BinderProtocol
source · 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