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 (
	ActUpdate = "update"
	ActInsert = "insert"
	ActDelete = "delete"
)
View Source
const (
	TypeForView  = "view"
	TypeForDm    = "dm"
	TypeForReply = "reply"
	TypeForFav   = "fav"
	TypeForCoin  = "coin"
	TypeForShare = "share"
	TypeForRank  = "rank"
	TypeForLike  = "like"
)

Variables

This section is empty.

Functions

func Merge

func Merge(m *StatMsg, s *api.Stat)

Merge merge message and stat from db.

Types

type LikeMsg

type LikeMsg struct {
	BusinessID    int64 `json:"business_id"`
	MessageID     int64 `json:"message_id"`
	LikesCount    int64 `json:"likes_count"`
	DislikesCount int64 `json:"dislikes_count"`
}

LikeMsg msg

type Message

type Message struct {
	Action string          `json:"action"`
	Table  string          `json:"table"`
	New    json.RawMessage `json:"new"`
	Old    json.RawMessage `json:"old"`
}

Message canal binlog message.

type Monitor

type Monitor struct {
	Topic string
	Count int
}

Monitor is

type StatCount

type StatCount struct {
	Type      string `json:"type"`
	Aid       int64  `json:"id"`
	Count     int    `json:"count"`
	DisLike   int    `json:"dislike_count"`
	TimeStamp int64  `json:"timestamp"`
}

type StatMsg

type StatMsg struct {
	Aid     int64  `json:"aid"`
	Click   int    `json:"click"`
	DM      int    `json:"dm"`
	Reply   int    `json:"reply"`
	Fav     int    `json:"fav"`
	Coin    int    `json:"coin"`
	Share   int    `json:"share"`
	NowRank int    `json:"now_rank"`
	HisRank int    `json:"his_rank"`
	Like    int    `json:"like"`
	DisLike int    `json:"dislike_count"`
	Type    string `json:"-"`
	Ts      int64  `json:"-"`
}

StatMsg stat info.

Jump to

Keyboard shortcuts

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