Skip to content

Commit

Permalink
add LookupReferenceForPath comment
Browse files Browse the repository at this point in the history
Signed-off-by: Jörn Friedrich Dreyer <[email protected]>
  • Loading branch information
butonic committed Feb 1, 2022
1 parent 1756057 commit 290a1bd
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ import (
"github.com/cs3org/reva/pkg/utils"
)

// LookupReferenceForPath returns:
// a reference with root and relative path
// the status and error for the lookup
func LookupReferenceForPath(ctx context.Context, client gateway.GatewayAPIClient, path string) (*storageProvider.Reference, *rpc.Status, error) {
space, cs3Status, err := LookUpStorageSpaceForPath(ctx, client, path)
if err != nil || cs3Status.Code != rpc.Code_CODE_OK {
Expand All @@ -45,7 +48,7 @@ func LookupReferenceForPath(ctx context.Context, client gateway.GatewayAPIClient
}

// LookUpStorageSpaceForPath returns:
// th storage spaces responsible for a path
// the storage spaces responsible for a path
// the status and error for the lookup
func LookUpStorageSpaceForPath(ctx context.Context, client gateway.GatewayAPIClient, path string) (*storageProvider.StorageSpace, *rpc.Status, error) {
// TODO add filter to only fetch spaces changed in the last 30 sec?
Expand Down

0 comments on commit 290a1bd

Please sign in to comment.