Skip to content

Commit

Permalink
update comment for getter api
Browse files Browse the repository at this point in the history
  • Loading branch information
walldiss committed Jun 19, 2023
1 parent e80bf76 commit c3270b7
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions share/getter.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,11 @@ var (
// ErrNotFound is used to indicate that requested data could not be found.
ErrNotFound = errors.New("share: data not found")
// ErrNamespaceNotFound is returned by GetSharesByNamespace when data for the requested root does
// not include any shares from the given namespace. If the target namespace belongs to the namespace range
// of any rows of the requested root, the error will be returned along with collected non-inclusion
// proofs for those rows. It is the obligation of the requester to verify non-inclusion proofs for all rows
// that could possibly contain the target namespace by calling the Verify method.
// not include any shares from the given namespace. If the target namespace belongs to the
// namespace range of any rows of the requested root, the error will be returned along with
// collected non-inclusion proofs for those rows. It is the obligation of the requester to verify
// non-inclusion proofs for all rows that could possibly contain the target namespace by calling
// the Verify method.
ErrNamespaceNotFound = errors.New("share: namespace not found in data")
)

Expand All @@ -38,6 +39,8 @@ type Getter interface {

// GetSharesByNamespace gets all shares from an EDS within the given namespace.
// Shares are returned in a row-by-row order if the namespace spans multiple rows.
// If data for the requested root does not include any shares from the given namespace
// ErrNamespaceNotFound will be returned along with non-inclusion proofs if there are any.
GetSharesByNamespace(context.Context, *Root, namespace.ID) (NamespacedShares, error)
}

Expand Down

0 comments on commit c3270b7

Please sign in to comment.