pub struct GrantFreeAccessUseCase { /* private fields */ }Expand description
Use Case: Grant Free Access
Grants free (promotional) access to an article for a reader. This is used for promotional access, reviewer access, etc.
Responsibilities:
- Validate input
- Verify article exists
- Check for existing valid access
- Create access token
- Persist via repository
- Return response with raw token
Implementations§
Source§impl GrantFreeAccessUseCase
impl GrantFreeAccessUseCase
pub fn new( access_token_repository: Arc<dyn AccessTokenRepository>, article_repository: Arc<dyn ArticleRepository>, ) -> Self
pub async fn execute( &self, request: GrantFreeAccessRequest, ) -> Result<GrantAccessResponse>
Auto Trait Implementations§
impl Freeze for GrantFreeAccessUseCase
impl !RefUnwindSafe for GrantFreeAccessUseCase
impl Send for GrantFreeAccessUseCase
impl Sync for GrantFreeAccessUseCase
impl Unpin for GrantFreeAccessUseCase
impl UnsafeUnpin for GrantFreeAccessUseCase
impl !UnwindSafe for GrantFreeAccessUseCase
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more