Documentation ¶
Index ¶
- Constants
- func InjectHttpQueryBody(s *HttpQueryBody)
- func InjectHttpQueryParams(s *HttpQueryParams)
- func LoadHttpQueryBody() baseiface.ISingleton
- func LoadHttpQueryParams() baseiface.ISingleton
- type HttpQueryBody
- type HttpQueryParams
- func (self *HttpQueryParams) Aggregations(agg string, aggcase elastic.Aggregation)
- func (self *HttpQueryParams) Append(field string, asc bool)
- func (self *HttpQueryParams) BuildJson() string
- func (self *HttpQueryParams) IfAggs() bool
- func (self *HttpQueryParams) IfEsAggs() bool
- func (self *HttpQueryParams) IfHighlight() bool
- func (self *HttpQueryParams) IfHighlightFrom(hl *elastic.Highlight) bool
- func (self *HttpQueryParams) QuatedStr(ins []string) string
- func (self *HttpQueryParams) ToEsAggs() string
- func (self *HttpQueryParams) ToHighlight() string
- func (self *HttpQueryParams) ToOrderBy() string
- func (self *HttpQueryParams) ToSourceFields() string
- type HttpQuerySort
Constants ¶
View Source
const ( AGGS_STATE_FIELDS = ` "aggs": { {{.AggsFields}} }` AGGS_STATE_FIELD = ` "{{.Field}}": { "stats": { "field": "{{.Field}}" } }` ORDER_TEMPLATE = ` "sort": [ { {{.SortFields}} } ] ` HTTP_SOURCE_TEMPLATE = ` "_source": [{{.SourceFields}}] ` HTTP_HIGHLIGHT_TEMPLATE = `"highlight":{{.EsHight}}` )
View Source
const BodyQueryTemplate = `{
"query":{{.QueryBody}},
{{.HttpQueryParams}}
"size":{{.Size}},
"from":{{.From}}
}`
View Source
const HttpCliMax = esconst.MAX_ES_RECORD_NUMBER
Variables ¶
This section is empty.
Functions ¶
func InjectHttpQueryBody ¶
func InjectHttpQueryBody(s *HttpQueryBody)
func InjectHttpQueryParams ¶
func InjectHttpQueryParams(s *HttpQueryParams)
func LoadHttpQueryBody ¶
func LoadHttpQueryBody() baseiface.ISingleton
func LoadHttpQueryParams ¶
func LoadHttpQueryParams() baseiface.ISingleton
Types ¶
type HttpQueryBody ¶
type HttpQueryBody struct { basedto.BaseEntity HttpcliBody string `json:"Httpcli_body,omitempty"` HttpurlParams map[string]any `json:"httpurl_params,omitempty"` HttpQueryParams *HttpQueryParams `json:"httpquery_params,omitempty"` }
func DefaultHttpQueryBody ¶
func DefaultHttpQueryBody() *HttpQueryBody
func NewHttpQueryBody ¶
func NewHttpQueryBody() *HttpQueryBody
func (*HttpQueryBody) Aggregations ¶
func (self *HttpQueryBody) Aggregations(agg string, aggcase elastic.Aggregation)
func (*HttpQueryBody) Correct ¶
func (self *HttpQueryBody) Correct()
func (*HttpQueryBody) MakeBody ¶
func (self *HttpQueryBody) MakeBody(limit, start int) string
type HttpQueryParams ¶
type HttpQueryParams struct { basedto.BaseEntity EsAggDtos []*esdto.EsAggDto HttpQuerySorts []*HttpQuerySort HttpSourceFields string `json:"http_source_fields"` OrderTemplate string SearchType string RestTotalHitsAsInt string AggScripts string `json:"agg_scripts"` HighlightScripts string `json:"highlight_scripts"` *elastic.Highlight `json:"-"` // contains filtered or unexported fields }
func DefaultHHttpQueryParams ¶
func DefaultHHttpQueryParams() *HttpQueryParams
func FindBeanHttpQueryParams ¶
func FindBeanHttpQueryParams() *HttpQueryParams
FindBeanHttpQueryParams
func (*HttpQueryParams) Aggregations ¶
func (self *HttpQueryParams) Aggregations(agg string, aggcase elastic.Aggregation)
func (*HttpQueryParams) Append ¶
func (self *HttpQueryParams) Append(field string, asc bool)
func (*HttpQueryParams) BuildJson ¶
func (self *HttpQueryParams) BuildJson() string
func (*HttpQueryParams) IfAggs ¶
func (self *HttpQueryParams) IfAggs() bool
func (*HttpQueryParams) IfEsAggs ¶
func (self *HttpQueryParams) IfEsAggs() bool
func (*HttpQueryParams) IfHighlight ¶
func (self *HttpQueryParams) IfHighlight() bool
func (*HttpQueryParams) IfHighlightFrom ¶
func (self *HttpQueryParams) IfHighlightFrom(hl *elastic.Highlight) bool
func (*HttpQueryParams) QuatedStr ¶
func (self *HttpQueryParams) QuatedStr(ins []string) string
func (*HttpQueryParams) ToEsAggs ¶
func (self *HttpQueryParams) ToEsAggs() string
func (*HttpQueryParams) ToHighlight ¶
func (self *HttpQueryParams) ToHighlight() string
func (*HttpQueryParams) ToOrderBy ¶
func (self *HttpQueryParams) ToOrderBy() string
func (*HttpQueryParams) ToSourceFields ¶
func (self *HttpQueryParams) ToSourceFields() string
type HttpQuerySort ¶
func NewHttpQuerySort ¶
func NewHttpQuerySort() *HttpQuerySort
func (*HttpQuerySort) ToOrderJson ¶
func (self *HttpQuerySort) ToOrderJson() string
Click to show internal directories.
Click to hide internal directories.