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: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ActUpdate ...
	ActUpdate = "update"
	// ActInsert ...
	ActInsert = "insert"
	// ActDelete ...
	ActDelete = "delete"
)

Variables

This section is empty.

Functions

func Merge

func Merge(last, m *artmdl.StatMsg) (changed [][2]int64)

Merge merges stat.

func ReadURLs

func ReadURLs(aid int64) []string

ReadURLs returns article's read urls.

Types

type Article

type Article struct {
	ID              int64  `json:"article_id"`
	CTime           string `json:"ctime"`
	CategoryID      int64  `json:"category_id"`
	Title           string `json:"title"`
	Summary         string `json:"summary"`
	BannerURL       string `json:"banner_url"`
	TemplateID      int    `json:"template_id"`
	State           int    `json:"state"`
	Mid             int64  `json:"mid"`
	Reprint         int    `json:"reprint"`
	ImageURLs       string `json:"image_urls"`
	OriginImageURLs string `json:"origin_image_urls"`
	PublishTime     int    `json:"publish_time"`
	DeletedTime     int    `json:"deleted_time"`
	Attributes      int32  `json:"attributes,omitempty"`
	Reason          string `json:"reject_reason,omitempty"`
	Words           int64  `json:"words"`
	DynamicIntro    string `json:"dynamic_intro"`
	MediaID         int64  `json:"media_id"`
}

Article db struction.

type Author

type Author struct {
	ID         int64 `json:"id"`
	State      int   `json:"state"`
	Mid        int64 `json:"mid"`
	DailyLimit int   `json:"daily_limit"`
}

Author db struction.

type DynamicCacheRetry

type DynamicCacheRetry struct {
	Aid          int64
	Mid          int64
	Show         bool
	Comment      string
	Ts           int64
	DynamicIntro string
}

DynamicCacheRetry .

type DynamicMsg

type DynamicMsg struct {
	Card struct {
		Comment string `json:"comment"`
		Dynamic string `json:"dynamic"`
		OwnerID int64  `json:"owner_id"`
		Rid     int64  `json:"rid"`
		Show    int64  `json:"show"`
		Stype   int64  `json:"stype"`
		Ts      int64  `json:"ts"`
		Type    int64  `json:"type"`
	} `json:"card"`
}

DynamicMsg msg

type FlowCacheRetry

type FlowCacheRetry struct {
	Aid int64 `json:"aid"`
	Mid int64 `json:"mid"`
}

FlowCacheRetry .

type GameCacheRetry

type GameCacheRetry struct {
	Action string `json:"action"`
	Aid    int64  `json:"aid"`
}

GameCacheRetry .

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 Read

type Read struct {
	Buvid     string
	Aid       int64
	Mid       int64
	IP        string
	From      string
	StartTime int64
	EndTime   int64
}

Read presents user reading duration struct

type Recheck

type Recheck struct {
	Day  int64 `json:"day"`
	View int64 `json:"view"`
}

Recheck setting struct

type SearchArticle

type SearchArticle struct {
	Article
	Tags          string `json:"tags"`
	Content       string `json:"content"`
	StatsView     int64  `json:"stats_view"`
	StatsFavorite int64  `json:"stats_favorite"`
	StatsLikes    int64  `json:"stats_likes"`
	StatsDisLike  int64  `json:"stats_dislike"`
	StatsReply    int64  `json:"stats_reply"`
	StatsShare    int64  `json:"stats_share"`
	StatsCoin     int64  `json:"stats_coin"`
	Keywords      string `json:"keywords"`
}

SearchArticle .

type Setting

type Setting struct {
	Recheck *Recheck
}

Setting the setting struct

Jump to

Keyboard shortcuts

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