diff --git a/consts/event/event.go b/consts/event/event.go index d4ca515..7a1039d 100644 --- a/consts/event/event.go +++ b/consts/event/event.go @@ -1,7 +1,8 @@ package event const ( - UPDATE_CACHE_OP_UNTEMP = "UnTemp" + UPDATE_CACHE_UNTEMP = "UnTemp" + UPDATE_CACHE_CREATE_TEMP = "CreateTemp" ) const ( diff --git a/utils/ipfs/ipfs.go b/utils/ipfs/ipfs.go index 33dfd06..42e2b40 100644 --- a/utils/ipfs/ipfs.go +++ b/utils/ipfs/ipfs.go @@ -1,6 +1,7 @@ package ipfs import ( + "context" "fmt" "io" @@ -61,6 +62,10 @@ func (fs *IPFS) Unpin(hash string) error { return fs.shell.Unpin(hash) } +func (fs *IPFS) GetPinnedFiles() (map[string]shell.PinInfo, error) { + return fs.shell.PinsOfType(context.Background(), shell.RecursivePin) +} + type ipfsWriter struct { writer *io.PipeWriter finished chan any