This repository has been archived by the owner on Jan 31, 2024. It is now read-only.
forked from cs3org/reva
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #29 from gmgigi96/speedup-listshares-projects
Speedup share listing in project folders
- Loading branch information
Showing
7 changed files
with
123 additions
and
82 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package ctx | ||
|
||
import ( | ||
"context" | ||
) | ||
|
||
// ResoucePathCtx is the key used in the opaque id for passing the resource path. | ||
const ResoucePathCtx = "resource_path" | ||
|
||
// ContextGetResourcePath returns the resource path if set in the given context. | ||
func ContextGetResourcePath(ctx context.Context) (string, bool) { | ||
p, ok := ctx.Value(pathKey).(string) | ||
return p, ok | ||
} | ||
|
||
// ContextGetResourcePath stores the resource path in the context. | ||
func ContextSetResourcePath(ctx context.Context, path string) context.Context { | ||
return context.WithValue(ctx, pathKey, path) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters