boundary 0.27.0

A static analysis tool for evaluating DDD and Hexagonal Architecture
1
2
3
4
5
6
7
8
9
10
11
12
13
use crate::infrastructure::postgres::PostgresUserRepository;

pub trait UserRepository {
    fn save(&self, user: &User) -> Result<(), Error>;
    fn find_by_id(&self, id: &str) -> Result<User, Error>;
    fn delete(&self, id: &str) -> Result<(), Error>;
}

pub struct User {
    pub id: String,
    pub name: String,
    pub email: String,
}