MCPcopy Create free account
hub / github.com/araddon/qlbridge / Setup

Method Setup

datasource/files/json_test.go:36–54  ·  view source on GitHub ↗

Setup the filesource with schema info

(ss *schema.Schema)

Source from the content-addressed store, hash-verified

34
35// Setup the filesource with schema info
36func (m *jsonTestSource) Setup(ss *schema.Schema) error {
37
38 fileStore := "localfs"
39 if os.Getenv("FILESTORE") != "" {
40 fileStore = os.Getenv("FILESTORE")
41 }
42 settings := u.JsonHelper(map[string]interface{}{
43 "path": "github",
44 "filetype": "json",
45 "format": "github_json",
46 "type": fileStore,
47 })
48 ss.Conf = &schema.ConfigSource{
49 Name: "testjson",
50 SourceType: "testjson",
51 Settings: settings,
52 }
53 return m.FileSource.Setup(ss)
54}
55
56func lineParser(line []byte) (schema.Message, error) {
57 gh := make(u.JsonHelper)

Callers

nothing calls this directly

Calls 1

SetupMethod · 0.65

Tested by

no test coverage detected