+ Skeleton code for dblib::VideoStore trait

For now we are just keeping everything in JSON because the use
case intended here is _not_ to have 999999 clips but like maybe
a few hundred/thousand at most
This commit is contained in:
shockrah 2021-09-27 21:04:25 -07:00
parent 27f337f63a
commit 65a2b41875

14
dblib/src/videostore.rs Normal file
View File

@ -0,0 +1,14 @@
use std::collections::HashMap;
use std::fs::File;
use std::io::BufReader;
use std::io::BufWriter;
use crate::{err, DB, dev_urandom, VideoStore};
impl VideoStore for DB {
fn new_video(name: &str, desc: &str) -> err::Result<()>;
fn del_video(id: String) -> err::Result<()>;
fn get_video(id: Option<String>, name: Option<&str>) -> err::Result<VideoMeta>;
fn rename_video(id: String, new: &str) -> err::Result<()>;
fn redescribe_video(id: String, new: &str) -> err::Result<()>;
}