Index: impl/cloud/context.go |
diff --git a/impl/cloud/context.go b/impl/cloud/context.go |
index a4b19ea6990e1adbece421ee9dc7bafed5d184c6..4c1494d681dbbeaffd92b5b36fe6d7fdca1259a4 100644 |
--- a/impl/cloud/context.go |
+++ b/impl/cloud/context.go |
@@ -71,3 +71,11 @@ func (cfg Config) Use(c context.Context) context.Context { |
return c |
} |
+ |
+// UseWithDatastore just install a datastore implementation into the context. |
nodir
2017/04/05 22:10:51
UseDatastore installs a cloud datastore implementa
hinoka
2017/04/06 17:46:03
Done.
|
+func UseWithDatastore(c context.Context, client *datastore.Client) context.Context { |
nodir
2017/04/05 22:10:51
two verbs? I think it should be either UseDatastor
hinoka
2017/04/06 17:46:03
Done.
|
+ cds := cloudDatastore{ |
+ client: client, |
+ } |
+ return cds.use(c) |
+} |