collector

package
v0.0.0-...-0a2bfd5 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Collector

type Collector struct {
	Hits           int `json:"hits"`
	Users          int `json:"users"`
	Domain         string
	UsersList      []string       `json:"users_list"`
	PageViews      map[string]int `json:"views_by_page"`
	ViewsByBrowser map[string]int `json:"views_by_browser"`
	ViewsByOS      map[string]int `json:"views_by_os"`
	TagViews       map[string]int `json:"views_by_tag"`
	ArchiveViews   map[string]int `json:"views_by_archive"`
	Referers       map[string]int `json:"referers"`
}

func (*Collector) Accumulate

func (col *Collector) Accumulate(line *logline.SingleLogLine) error

func (*Collector) GetHits

func (col *Collector) GetHits() int

func (*Collector) GetTotalViews

func (col *Collector) GetTotalViews(obj map[string]int) (views int)

func (*Collector) GetUsers

func (col *Collector) GetUsers() int

func (*Collector) GetViews

func (col *Collector) GetViews(obj map[string]int) (views string)

type PageViews

type PageViews struct {
	Page  string
	Views int
}

type Pair

type Pair struct {
	Key   string
	Value int
}

A data structure to hold key/value pairs

type PairList

type PairList []Pair

A slice of pairs that implements sort.Interface to sort by values

func (PairList) Len

func (p PairList) Len() int

func (PairList) Less

func (p PairList) Less(i, j int) bool

func (PairList) Swap

func (p PairList) Swap(i, j int)

Jump to

Keyboard shortcuts

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