kwords2

package
v1.8.1 Latest Latest
Warning

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

Go to latest
Published: May 22, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Args

type Args struct {
	Attrs        []string `json:"attrs"`
	Level        float64  `json:"level"`
	EffectMetric string   `json:"effectMetric"`
	MinFreq      int      `json:"minFreq"`
	Percent      int      `json:"percent"`
}

type OutputRecord

type OutputRecord struct {
	ID   string `json:"-"`
	Type string `json:"type"`

	Datetime      string                `json:"datetime"`
	IPAddress     string                `json:"ipAddress"`
	IsCached      bool                  `json:"isCached,omitempty"`
	UserID        *string               `json:"userId"`
	IsAnonymous   bool                  `json:"isAnonymous"`
	Action        string                `json:"action,omitempty"`
	IsQuery       bool                  `json:"isQuery"`
	IsAPI         bool                  `json:"isApi"`
	Corpus        string                `json:"corpus"`
	TextCharCount int                   `json:"textCharCount,omitempty"`
	TextWordCount int                   `json:"textWordCount,omitempty"`
	TextLang      string                `json:"textLang,omitempty"`
	GeoIP         storage.GeoDataRecord `json:"geoip,omitempty"`
	Args          *Args                 `json:"args,omitempty"`
	UserAgent     string                `json:"userAgent"`
	Error         *storage.ErrorRecord  `json:"error,omitempty"`
	Version       string                `json:"version,omitempty"`
	// contains filtered or unexported fields
}

OutputRecord represents polished, export ready record from Kwords log

func (*OutputRecord) GenerateDeterministicID

func (r *OutputRecord) GenerateDeterministicID() string

func (*OutputRecord) GetID

func (r *OutputRecord) GetID() string

GetID Returns an unique ID of the record

func (*OutputRecord) GetTime

func (r *OutputRecord) GetTime() time.Time

GetTime returns a creation time of the record

func (*OutputRecord) GetType

func (r *OutputRecord) GetType() string

GetType returns application type identifier

func (*OutputRecord) LSetProperty

func (r *OutputRecord) LSetProperty(name string, value lua.LValue) error

func (*OutputRecord) SetLocation

func (r *OutputRecord) SetLocation(countryName string, latitude float32, longitude float32, timezone string)

SetLocation sets all the location related properties

func (*OutputRecord) SetTime

func (r *OutputRecord) SetTime(t time.Time)

func (*OutputRecord) ToJSON

func (r *OutputRecord) ToJSON() ([]byte, error)

ToJSON converts data to a JSON document (typically for ElasticSearch)

Jump to

Keyboard shortcuts

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