From 8844d9b2db49eaf1d88765df676dc86c5d314aa1 Mon Sep 17 00:00:00 2001 From: Evgenii Stratonikov Date: Wed, 4 May 2022 12:47:11 +0300 Subject: [PATCH] [#1344] pilorama: Document errors for Get* methods Signed-off-by: Evgenii Stratonikov --- pkg/local_object_storage/pilorama/interface.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkg/local_object_storage/pilorama/interface.go b/pkg/local_object_storage/pilorama/interface.go index 9ffa529a..23d3a2f6 100644 --- a/pkg/local_object_storage/pilorama/interface.go +++ b/pkg/local_object_storage/pilorama/interface.go @@ -17,10 +17,13 @@ type Forest interface { // The path is constructed by descending from the root using the values of the // AttributeFilename in meta. // The last argument determines whether only the node with the latest timestamp is returned. + // Should return ErrTreeNotFound if the tree is not found, and empty result if the path is not in the tree. TreeGetByPath(cid cidSDK.ID, treeID string, attr string, path []string, latest bool) ([]Node, error) // TreeGetMeta returns meta information of the node with the specified ID. + // Should return ErrTreeNotFound if the tree is not found, and empty result if the node is not in the tree. TreeGetMeta(cid cidSDK.ID, treeID string, nodeID Node) (Meta, error) // TreeGetChildren returns children of the node with the specified ID. The order is arbitrary. + // Should return ErrTreeNotFound if the tree is not found, and empty result if the node is not in the tree. TreeGetChildren(cid cidSDK.ID, treeID string, nodeID Node) ([]uint64, error) }