The `Run()` method on the `QueryRequest` type would fail, since it would encode the _inner_ body of the query to JSON and not the complete, outer body (i.e. including the "body: {}" portion). The commit also adds `MarshalJSON()` methods to both `QueryRequest` and `AggregationRequest`, allowing them to implement the `json.Marshaller` interface, and providing easier debugging of the library. A test skeleton for this is also added.
11 lines
241 B
Modula-2
11 lines
241 B
Modula-2
module github.com/aquasecurity/esquery
|
|
|
|
go 1.13
|
|
|
|
require (
|
|
github.com/elastic/go-elasticsearch/v7 v7.6.0
|
|
github.com/fatih/structs v1.1.0
|
|
github.com/jgroeneveld/schema v1.0.0 // indirect
|
|
github.com/jgroeneveld/trial v2.0.0+incompatible
|
|
)
|