query.go 517 B

12345678910111213
  1. // Copyright 2012-present Oliver Eilhard. All rights reserved.
  2. // Use of this source code is governed by a MIT-license.
  3. // See http://olivere.mit-license.org/license.txt for details.
  4. package elastic
  5. // Query represents the generic query interface. A query's sole purpose
  6. // is to return the source of the query as a JSON-serializable object.
  7. // Returning map[string]interface{} is the norm for queries.
  8. type Query interface {
  9. // Source returns the JSON-serializable query request.
  10. Source() (interface{}, error)
  11. }