Skip to content

Commit

Permalink
Add tracking issue for GSP-654 & Add comments for List
Browse files Browse the repository at this point in the history
  • Loading branch information
JinnyYi committed Jul 13, 2021
1 parent f57c90f commit 5c704a9
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 5 deletions.
6 changes: 3 additions & 3 deletions cmd/definitions/bindata/bindata.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 9 additions & 1 deletion definitions/operations.toml
Original file line number Diff line number Diff line change
Expand Up @@ -225,10 +225,18 @@ results = ["meta"]
local = true

[storager.op.list]
description = "will return list a specific path."
params = ["path"]
pairs = ["list_mode"]
results = ["oi"]
description = """
will return list a specific path.
## Behavior
- Service SHOULD support default `ListMode`.
- Service SHOULD implement `ListModeDir` without the check for `VirtualDir`.
- Service DON'T NEED to `Stat` while in `List`.
"""

[storager.op.read]
description = "will read the file's data."
Expand Down
2 changes: 1 addition & 1 deletion docs/rfcs/654-unify-list-behavior.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
- Author: JinnyYi <github.com/JinnyYi>
- Start Date: 2021-07-07
- RFC PR: [beyondstorage/go-storage#654](https://github.com/beyondstorage/go-storage/pull/654)
- Tracking Issue: [beyondstorage/go-storage#0](https://github.com/beyondstorage/go-storage/issues/0)
- Tracking Issue: [beyondstorage/go-storage#657](https://github.com/beyondstorage/go-storage/issues/657)

# GSP-654: Unify List Behavior

Expand Down
12 changes: 12 additions & 0 deletions types/operation.generated.go
Original file line number Diff line number Diff line change
Expand Up @@ -594,8 +594,20 @@ type Storager interface {
DeleteWithContext(ctx context.Context, path string, pairs ...Pair) (err error)

// List will return list a specific path.
//
// ## Behavior
//
// - Service SHOULD support default `ListMode`.
// - Service SHOULD implement `ListModeDir` without the check for `VirtualDir`.
// - Service DON'T NEED to `Stat` while in `List`.
List(path string, pairs ...Pair) (oi *ObjectIterator, err error)
// ListWithContext will return list a specific path.
//
// ## Behavior
//
// - Service SHOULD support default `ListMode`.
// - Service SHOULD implement `ListModeDir` without the check for `VirtualDir`.
// - Service DON'T NEED to `Stat` while in `List`.
ListWithContext(ctx context.Context, path string, pairs ...Pair) (oi *ObjectIterator, err error)

// Metadata will return current storager metadata.
Expand Down

0 comments on commit 5c704a9

Please sign in to comment.