Index: service/datastore/testable.go |
diff --git a/service/datastore/testable.go b/service/datastore/testable.go |
index 331156fbd4f7b33f74e3d9441b20a0b6488bdfac..2c8f28728633da9f3bc2c398a97af96453a89b1d 100644 |
--- a/service/datastore/testable.go |
+++ b/service/datastore/testable.go |
@@ -4,6 +4,8 @@ |
package datastore |
+import "io" |
iannucci
2016/01/13 19:12:20
always use
import (
"io"
)
style. It's easier
nishanths (utexas)
2016/01/14 21:12:56
Done.
|
+ |
// TestingSnapshot is an opaque implementation-defined snapshot type. |
type TestingSnapshot interface { |
ImATestingSnapshot() |
@@ -73,4 +75,20 @@ type Testable interface { |
// but never wants the in-memory versions of these entities to bleed through |
// to the user code. |
DisableSpecialEntities(bool) |
+ |
+ // ParseIndexYAML parses the contents of a index YAML file into |
+ // a list of datastore.IndexDefinitions. |
+ // |
+ // ParseIndexYAML panics if there was an error during parsing. |
+ ParseIndexYAML(content io.Reader) []*IndexDefinition |
+ |
+ // FindAndAddIndexYAML walks up from the directory of the source file |
+ // until it finds a `index.yaml` or `index.yml` file. |
+ // If an index YAML file is found, it opens and parses the file, |
+ // and adds all the indexes found. |
+ // |
+ // FindAndAddIndexYAML panics if the root of the drive is reached without |
+ // finding an index YAML file. FindAndAddIndexYAML also panics if there is |
+ // an error reading the found index YAML file. |
+ FindAndAddIndexYAML() |
dnj
2016/01/13 16:16:40
I don't think this capability needs to be added to
iannucci
2016/01/13 19:12:20
If anything they should be top level methods in se
nishanths (utexas)
2016/01/14 21:12:56
Done. Moved to service/datastore with the method s
|
} |