knowledge-base-crud 0.3.0

Filesystem CRUD operations for a file-based knowledge base
Documentation
1
2
3
4
5
6
7
8
9
use super::Entities;
use crate::{Error, filesystem};
use knowledge_base_models::EntityId;

impl Entities<'_> {
    pub fn read(&self, id: &EntityId) -> Result<String, Error> {
        filesystem::read(self.repository.root(), "entities", id.as_str(), "yaml")
    }
}