myc-core 8.3.0+beta

Provide base features of the Mycelium project as s and Use-cases.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use crate::domain::dtos::{email::Email, profile::Profile};

use async_trait::async_trait;
use mycelium_base::{entities::FetchResponseKind, utils::errors::MappedErrors};
use shaku::Interface;

#[async_trait]
pub trait ProfileFetching: Interface + Send + Sync {
    async fn get_from_email(
        &self,
        email: Email,
    ) -> Result<FetchResponseKind<Profile, String>, MappedErrors>;

    async fn get_from_token(
        &self,
        token: String,
    ) -> Result<FetchResponseKind<Profile, String>, MappedErrors>;
}