Struct seaplane_cli::api::RestrictReq
source · pub struct RestrictReq { /* private fields */ }Expand description
Wraps an SDK RestrictRequest where we do additional things like re-use
request access tokens, and map errors appropriately.
Implementations§
source§impl RestrictReq
impl RestrictReq
pub fn new(ctx: &Ctx) -> Result<Self>
pub fn set_api<S: Into<String>>(&mut self, api: S) -> Result<()>
pub fn set_directory<S: Into<String>>(&mut self, dir: S) -> Result<()>
pub fn set_from_api<S: Into<String>>(&mut self, api: S) -> Result<()>
pub fn set_from_dir<S: Into<String>>(&mut self, dir: S) -> Result<()>
sourcepub fn refresh_token(&mut self) -> Result<()>
pub fn refresh_token(&mut self) -> Result<()>
Request a new Access Token
sourcepub fn token_or_refresh(&mut self) -> Result<&str>
pub fn token_or_refresh(&mut self) -> Result<&str>
Retrieves the JWT access token, requesting a new one if required.