stat

package
v0.0.0-...-9c8313f Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2016 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateDailyUserStat

func CreateDailyUserStat(docStatList []*DocStat) (dates map[string]DailyUserStat)

Types

type DailyUserStat

type DailyUserStat struct {
	WordAdd  int                 `json:"WordAdd"`
	WordSub  int                 `json:"WordSub"`
	ModDate  string              `json:"ModDate"`
	FileRevs map[string][]string `json:"FileRevList"`
}

func (DailyUserStat) String

func (day DailyUserStat) String() string

type DocStat

type DocStat struct {
	FileId  string    `json:"FileId"`
	Title   string    `json:"Title"`
	LastMod string    `json:"LastMod"`
	RevList []RevStat `json:"RevList"`
}

func (DocStat) String

func (doc DocStat) String() string

type RevStat

type RevStat struct {
	RevId     string     `json:"RevId"`
	UserName  string     `json:"UserName"`
	WordCount int        `json:"WordCount"`
	ModDate   string     `json:"ModDate"`
	WordFreq  []WordPair `json:"WordFreq"`
}

func (RevStat) GetTime

func (rev RevStat) GetTime() string

func (RevStat) String

func (rev RevStat) String() string

type UserStat

type UserStat struct {
	UpdateDate string `json:"UpdateDate"`
	Token      []byte `json:Token`
	Email      string `json:Email`
	UserID     string `json:Id`
}

func (*UserStat) String

func (usr *UserStat) String() string

type WordPair

type WordPair struct {
	Word  string  `json:"Word"`
	Count int     `json:"Count"`
	Ratio float32 `json:"Ratio"`
}

func GetTopWords

func GetTopWords(s string) ([]WordPair, int)

func (WordPair) String

func (wp WordPair) String() string

type WordPairByVol

type WordPairByVol []WordPair

Sort by Modified Date and Type

func (WordPairByVol) Len

func (a WordPairByVol) Len() int

func (WordPairByVol) Less

func (a WordPairByVol) Less(i, j int) bool

func (WordPairByVol) Swap

func (a WordPairByVol) Swap(i, j int)

Jump to

Keyboard shortcuts

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