webstats

package
v1.4.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 1, 2025 License: MulanPSL-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AggStats

type AggStats[T baseindex.IndexMapping] struct {
	*webfacade.WebFacade[T]
}

func Default

func Default[T baseindex.IndexMapping]() *AggStats[T]

func DefaultOf

func DefaultOf[T baseindex.IndexMapping](q elastic.Query) *AggStats[T]

func NewAggStats

func NewAggStats[T baseindex.IndexMapping]() *AggStats[T]

func (*AggStats[T]) Avg

func (self *AggStats[T]) Avg(field string) (any, error)

func (*AggStats[T]) Count

func (self *AggStats[T]) Count(field string) int

Max Min Stats

func (*AggStats[T]) FindMapVal

func (self *AggStats[T]) FindMapVal(m any, key string) (any, bool)

func (*AggStats[T]) GetMapVal

func (self *AggStats[T]) GetMapVal(m any, key string) any

func (*AggStats[T]) Max

func (self *AggStats[T]) Max(field string) any

func (*AggStats[T]) Min

func (self *AggStats[T]) Min(field string) any

func (*AggStats[T]) Stats

func (self *AggStats[T]) Stats(field string) StatRet

func (*AggStats[T]) Sum

func (self *AggStats[T]) Sum(field string) any

type StatRet

type StatRet struct {
	Max   float64 `json:"max"`
	Avg   float64 `json:"avg"`
	Sum   float64 `json:"sum"`
	Count int     `json:"count"`
	Min   float64 `json:"min"`
}

type StatRetKey

type StatRetKey struct {
	Key StatRet `json:"key"`
}

func NewStatRetKey

func NewStatRetKey() *StatRetKey

func (*StatRetKey) FromDataAgg

func (self *StatRetKey) FromDataAgg(agg any) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL