Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1181)

Unified Diff: service/datastore/interface.go

Issue 1427933002: Decouple PLS from MGS. (Closed) Base URL: https://github.com/luci/gae@master
Patch Set: Update dox w/ example. Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « service/datastore/datastore_test.go ('k') | service/datastore/multiarg.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: service/datastore/interface.go
diff --git a/service/datastore/interface.go b/service/datastore/interface.go
index 6c954b9006025c284ef2156a58e8fa20d6cf18a4..440ea36541c7f5d4b143605262a1dccf8887d4f4 100644
--- a/service/datastore/interface.go
+++ b/service/datastore/interface.go
@@ -63,8 +63,8 @@ type Interface interface {
// - *S where S is a struct
// - a PropertyLoadSaver
//
- // It is expected that the struct or PropertyLoadSaver exposes the
- // following metadata (as retrieved by PropertyLoadSaver.GetMeta):
+ // It is expected that the struct exposes the following metadata (as retrieved
+ // by MetaGetter.GetMeta):
// - "key" (type: Key) - The full datastore key to use. Must not be nil.
// OR
// - "id" (type: int64 or string) - The id of the Key to create
@@ -73,6 +73,12 @@ type Interface interface {
// object's type.
// - "parent" (optional, type: Key) - The parent key to use.
//
+ // By default, the metadata will be extracted from the struct and its tagged
+ // properties. However, if the struct implements MetaGetterSetter it is
+ // wholly responsible for exporting the required fields. A struct that
+ // implements GetMeta to make some minor tweaks can evoke the defualt behavior
Vadim Sh. 2015/10/30 21:56:50 typo: defualt
+ // by using GetPLS(s).GetMeta.
+ //
// If a required metadata item is missing or of the wrong type, then this will
// return an error.
KeyForObjErr(src interface{}) (*Key, error)
« no previous file with comments | « service/datastore/datastore_test.go ('k') | service/datastore/multiarg.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698