Skip to content

Latest commit

 

History

History
51 lines (45 loc) · 852 Bytes

rfc.md

File metadata and controls

51 lines (45 loc) · 852 Bytes

get Buckets

struct Client {
   key: String,
   secret: String,
}

impl Client {
   async fn get_buckets(&self, endpoint: EndPoint) -> Vec<Bucket> {
        todo!()
   }
}

get bucket info;

struct Bucket {
    name: String,
    endpoint: EndPoint,
}
impl Bucket{
    async fn get_info(&self, client: &Client) -> BucketInfo {
        todo!()
    }
    async fn get_object(&self, client: &Client) -> Vec<Object> {
        todo!()
    }
}

get object info

struct Object {
    bucket: Bucket,
    path: ObjectPath,
}
impl Object {
    async fn get_info(&self, client: &Client) -> ObjectInfo {
        todo!()
    }

    async fn upload(&self, client: &Client, content: Vec<u8>) -> Result<(), Error>{
        todo!()
    }
    async fn download(&self, client: &Client) -> Result<Vec<u8>, Error>{
        todo!()
    }
}