model

package
v0.0.0-...-83adff0 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2020 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ViewCountType view count type.
	ViewCountType = "view"
	// FavCountType fav count type.
	FavCountType = "favorite"
	// ReplyCountType reply count type.
	ReplyCountType = "reply"
	// ShareCountType share count type.
	ShareCountType = "share"
)

Variables

This section is empty.

Functions

func Merge

func Merge(last, m *StatMsg)

Merge merges stat.

Types

type StatM

type StatM struct {
	Type      string    `json:"type"`
	ID        int64     `json:"id"`
	Aid       int64     `json:"aid"`
	Count     *int64    `json:"count"`
	Timestamp time.Time `json:"timestamp"`
	IP        string    `json:"ip"`
}

StatM playlist's topic stat message in databus.

func (*StatM) String

func (sm *StatM) String(tp string) (res string)

String format sm

type StatMsg

type StatMsg struct {
	Type     string    `json:"type"`
	Pid      int64     `json:"pid"`
	Mid      int64     `json:"mid"`
	Fid      int64     `json:"fid"`
	Aid      int64     `json:"aid"`
	View     *int64    `json:"view"`
	Favorite *int64    `json:"fav"`
	Reply    *int64    `json:"reply"`
	Share    *int64    `json:"share"`
	MTime    time.Time `json:"mtime"`
	IP       string    `json:"ip"`
}

StatMsg means playlist's stat message in databus.

Jump to

Keyboard shortcuts

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