Documentation ¶
Index ¶
- func BuildCommonSearchService(ctx context.Context, indexNames []string, query elastic.Query, ...) *elastic.SearchService
- func ExtractSources(results *elastic.SearchResult, pretty bool) ([]*json.RawMessage, string)
- func GenerateNextAfter(hit *elastic.SearchHit) string
- func GetFromFromContext(ctx context.Context) int
- func GetPrettyJsonFromContext(ctx context.Context) bool
- func GetSearchAfterFromContext(ctx context.Context) []interface{}
- func GetSizeFromContext(ctx context.Context) int
- func GetSortInfoFromContext(ctx context.Context) []elastic.SortInfo
- func NewSubRoute(prefix string) *mux.Router
- func RespondESError(ctx context.Context, w http.ResponseWriter, err error)
- func RespondJSON(ctx context.Context, w http.ResponseWriter, code int, payload interface{})
- func RespondSearch(ctx context.Context, w http.ResponseWriter, ...)
- func Serve()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExtractSources ¶
func ExtractSources(results *elastic.SearchResult, pretty bool) ([]*json.RawMessage, string)
func GenerateNextAfter ¶
func GenerateNextAfter(hit *elastic.SearchHit) string
func GetFromFromContext ¶
func GetSizeFromContext ¶
func GetSortInfoFromContext ¶
func NewSubRoute ¶
func RespondESError ¶
func RespondESError(ctx context.Context, w http.ResponseWriter, err error)
func RespondJSON ¶
func RespondJSON(ctx context.Context, w http.ResponseWriter, code int, payload interface{})
func RespondSearch ¶
func RespondSearch(ctx context.Context, w http.ResponseWriter, searchService *elastic.SearchService)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.