| OLD | NEW |
| 1 package goldingester | 1 package goldingester |
| 2 | 2 |
| 3 import ( | 3 import ( |
| 4 "encoding/json" | 4 "encoding/json" |
| 5 "fmt" | 5 "fmt" |
| 6 "io" | 6 "io" |
| 7 "net/http" | 7 "net/http" |
| 8 "sort" | 8 "sort" |
| 9 "strings" | 9 "strings" |
| 10 | 10 |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 // "options" : { | 66 // "options" : { |
| 67 // "ext" : "png" | 67 // "ext" : "png" |
| 68 // } | 68 // } |
| 69 | 69 |
| 70 // DMResults is the top level structure for decoding DM JSON output. | 70 // DMResults is the top level structure for decoding DM JSON output. |
| 71 type DMResults struct { | 71 type DMResults struct { |
| 72 BuildNumber string `json:"build_number"` | 72 BuildNumber string `json:"build_number"` |
| 73 GitHash string `json:"gitHash"` | 73 GitHash string `json:"gitHash"` |
| 74 Key map[string]string `json:"key"` | 74 Key map[string]string `json:"key"` |
| 75 Issue string `json:"issue"` | 75 Issue string `json:"issue"` |
| 76 » Patchset string `json:"patchset"` | 76 » Patchset int64 `json:"patchset,string"` |
| 77 Results []*Result `json:"results"` | 77 Results []*Result `json:"results"` |
| 78 } | 78 } |
| 79 | 79 |
| 80 // PreIngestionHook is a function that changes a DMResult after it was parsed | 80 // PreIngestionHook is a function that changes a DMResult after it was parsed |
| 81 // from Json, but before it is ingested into the tile. | 81 // from Json, but before it is ingested into the tile. |
| 82 type PreIngestionHook func(dmResult *DMResults) error | 82 type PreIngestionHook func(dmResult *DMResults) error |
| 83 | 83 |
| 84 type Result struct { | 84 type Result struct { |
| 85 Key map[string]string `json:"key"` | 85 Key map[string]string `json:"key"` |
| 86 Options map[string]string `json:"options"` | 86 Options map[string]string `json:"options"` |
| (...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 255 return fmt.Errorf("Missing hash.") | 255 return fmt.Errorf("Missing hash.") |
| 256 } | 256 } |
| 257 | 257 |
| 258 return nil | 258 return nil |
| 259 } | 259 } |
| 260 | 260 |
| 261 // See the ingester.ResultIngester interface. | 261 // See the ingester.ResultIngester interface. |
| 262 func (i GoldIngester) BatchFinished(counter metrics.Counter) error { | 262 func (i GoldIngester) BatchFinished(counter metrics.Counter) error { |
| 263 return nil | 263 return nil |
| 264 } | 264 } |
| OLD | NEW |