Index: service/datastore/properties.go |
diff --git a/service/rawdatastore/properties.go b/service/datastore/properties.go |
similarity index 97% |
rename from service/rawdatastore/properties.go |
rename to service/datastore/properties.go |
index 388afba8506d41c874c6e249bfd6c6c301a7f63f..d9a4907bd78d85ca4fc4c08030efae3d4d42776d 100644 |
--- a/service/rawdatastore/properties.go |
+++ b/service/datastore/properties.go |
@@ -2,7 +2,7 @@ |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
-package rawdatastore |
+package datastore |
import ( |
"errors" |
@@ -331,11 +331,18 @@ type PropertyLoadSaver interface { |
Save(withMeta bool) (PropertyMap, error) |
// GetMeta will get information about the field which has the struct tag in |
- // the form of `gae:"$<key>[,<value>]?"`. |
+ // the form of `gae:"$<key>[,<default>]?"`. |
// |
- // string and int64 fields will return the <value> in the struct tag, |
- // converted to the appropriate type, if the field has the zero value. |
+ // Supported metadata types are: |
+ // int64 - may have default (ascii encoded base-10) |
+ // string - may have default |
+ // Toggle - MUST have default ("true" or "false") |
+ // Key - NO default allowed |
// |
+ // Struct fields of type Toggle (which is an Auto/On/Off) require you to |
+ // specify a value of 'true' or 'false' for the default value of the struct |
+ // tag, and GetMeta will return the combined value as a regular boolean true |
+ // or false value. |
// Example: |
// type MyStruct struct { |
// CoolField int64 `gae:"$id,1"` |
@@ -348,12 +355,6 @@ type PropertyLoadSaver interface { |
// // val == 10 |
// // err == nil |
// |
- // Struct fields of type Toggle (which is an Auto/On/Off) allow you to |
- // specify a value of 'true' or 'false' for the default value of the struct |
- // tag, and GetMeta will return the combined value as a regular boolean true |
- // or false value. If a field is Toggle, a <value> MUST be specified. |
- // |
- // Example: |
// type MyStruct struct { |
// TFlag Toggle `gae:"$flag1,true"` // defaults to true |
// FFlag Toggle `gae:"$flag2,false"` // defaults to false |