| OLD | NEW |
| 1 // Copyright 2015 The LUCI Authors. All rights reserved. | 1 // Copyright 2015 The LUCI Authors. All rights reserved. |
| 2 // Use of this source code is governed under the Apache License, Version 2.0 | 2 // Use of this source code is governed under the Apache License, Version 2.0 |
| 3 // that can be found in the LICENSE file. | 3 // that can be found in the LICENSE file. |
| 4 | 4 |
| 5 package datastore | 5 package datastore |
| 6 | 6 |
| 7 import ( | 7 import ( |
| 8 "github.com/luci/gae/service/info" | 8 "github.com/luci/gae/service/info" |
| 9 | 9 |
| 10 "golang.org/x/net/context" | 10 "golang.org/x/net/context" |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 83 newFilts := make([]RawFilter, 0, len(cur)+len(filts)) | 83 newFilts := make([]RawFilter, 0, len(cur)+len(filts)) |
| 84 newFilts = append(newFilts, getCurFilters(c)...) | 84 newFilts = append(newFilts, getCurFilters(c)...) |
| 85 newFilts = append(newFilts, filts...) | 85 newFilts = append(newFilts, filts...) |
| 86 return context.WithValue(c, rawDatastoreFilterKey, newFilts) | 86 return context.WithValue(c, rawDatastoreFilterKey, newFilts) |
| 87 } | 87 } |
| 88 | 88 |
| 89 // GetKeyContext returns the KeyContext whose AppID and Namespace match those | 89 // GetKeyContext returns the KeyContext whose AppID and Namespace match those |
| 90 // installed in the supplied Context. | 90 // installed in the supplied Context. |
| 91 func GetKeyContext(c context.Context) KeyContext { | 91 func GetKeyContext(c context.Context) KeyContext { |
| 92 ri := info.Raw(c) | 92 ri := info.Raw(c) |
| 93 » return KeyContext{ri.FullyQualifiedAppID(), ri.GetNamespace()} | 93 » return MkKeyContext(ri.FullyQualifiedAppID(), ri.GetNamespace()) |
| 94 } | 94 } |
| OLD | NEW |