n0-computer / iroh

A toolkit for building distributed applications
https://iroh.computer
Apache License 2.0
2.57k stars 161 forks source link

console/cli is missing listing the contents of a collection #2658

Open divagant-martian opened 2 months ago

divagant-martian commented 2 months ago

the blobs::Client has pub async fn get_collection(&self, hash: Hash) -> Result<Collection> for which there is no matching counterpart in the cli/console.

The Collection type has a lot of manipulation methods we probably do not want to map. However, a blobs collection <hash> which lists the blobs (by calling pub fn iter(&self) -> impl Iterator<Item = &(String, Hash)>) I think is both useful enough, and close enough to the rust api to be a good match to this top level client function

palozano commented 2 months ago

@divagant-martian, is this an issue I could take?

divagant-martian commented 2 months ago

@dignifiedquire @b5 do you guys think we should add this api to the cli? @palozano is already familiar with the cli code so this could be easy for him to do

dignifiedquire commented 2 months ago

sounds good to me 👍