history

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: May 30, 2025 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FilterMessage

func FilterMessage(hits []opensearchapi.SearchHit) (msgList []string)

Types

type Helper

type Helper struct {
	context.Context
	// contains filtered or unexported fields
}

Helper to be filled

@author kevinmatthe
@update 2025-04-30 13:10:06

func New

func New(ctx context.Context) *Helper

New to be filled

@return *HistoryHelper
@author kevinmatthe
@update 2025-04-30 13:10:02

func (*Helper) GetMsg

func (h *Helper) GetMsg() (messageList []string, err error)

func (*Helper) GetTrend

func (h *Helper) GetTrend(interval, termField string) (trendList TrendSeries, err error)

func (*Helper) Index

func (h *Helper) Index(index string) *Helper

Index to be filled

@receiver h *Helper
@param index string
@return *Helper
@author kevinmatthe
@update 2025-04-30 13:11:28

func (*Helper) Query

func (h *Helper) Query(query osquery.Mappable) *Helper

Query to be filled

@receiver h *HistoryHelper
@param query osquery.Mappable
@return *HistoryHelper
@author kevinmatthe
@update 2025-04-30 13:09:55

func (*Helper) Size

func (h *Helper) Size(size uint64) *Helper

Size to be filled

@receiver h *Helper
@param size uint64
@return *Helper
@author kevinmatthe
@update 2025-04-30 13:16:42

func (*Helper) Sort

func (h *Helper) Sort(name string, order osquery.Order) *Helper

Sort to be filled

@receiver h *Helper
@param name string
@param order osquery.Order
@return *Helper
@author kevinmatthe
@update 2025-04-30 13:14:55

func (*Helper) Source

func (h *Helper) Source(source ...string) *Helper

Source to be filled

@receiver h *HistoryHelper
@param source []string
@return *HistoryHelper
@author kevinmatthe
@update 2025-04-30 13:10:00

type TrendAggData

type TrendAggData struct {
	Agg1 struct {
		Buckets []struct {
			KeyAsString string `json:"key_as_string"`
			Key         int64  `json:"key"`
			DocCount    int    `json:"doc_count"`
			Agg2        struct {
				DocCountErrorUpperBound int `json:"doc_count_error_upper_bound"`
				SumOtherDocCount        int `json:"sum_other_doc_count"`
				Buckets                 []struct {
					Key      string `json:"key"`
					DocCount int    `json:"doc_count"`
				} `json:"buckets"`
			} `json:"agg2"`
		} `json:"buckets"`
	} `json:"agg1"`
}

type TrendItem

type TrendItem struct {
	Time  string `json:"time"`  // x轴
	Value int64  `json:"value"` // y轴
	Key   string `json:"key"`   // 序列
}

type TrendSeries

type TrendSeries []*TrendItem

Jump to

Keyboard shortcuts

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