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

Documentation

Index

Constants

View Source
const (
	ActionNormal int32 = 0 // 未踩赞
	ActionLike   int32 = 1 // 赞
	ActionHate   int32 = 2 // 踩
)

Action 点赞或踩

View Source
const (
	// AdminIsNotReport 不是举报记录
	AdminIsNotReport int32 = 0
	// AdminIsReport 是举报记录
	AdminIsReport = 1
	// AdminIsNotNew 不是该评论最新的
	AdminIsNotNew int32 = 0
	// AdminIsNew 是该评论最新的
	AdminIsNew = 1
	// AdminOperDelete 管理员删除评论
	AdminOperDelete int32 = 0
	// AdminOperDeleteByReport 管理员通过举报删除 NOTE Deprecated
	AdminOperDeleteByReport = 1
	// AdminOperIgnoreReport 管理员忽略举报 NOTE Deprecated
	AdminOperIgnoreReport = 2
	// AdminOperRecover 管理员恢复评论
	AdminOperRecover = 3
	// AdminOperEdit 管理员编辑内容
	AdminOperEdit = 4
	// AdminOperPass 管理通过待审
	AdminOperPass = 5
	// AdminOperSubState 修改主题的状态
	AdminOperSubState = 6
	// AdminOperSubTop 置顶评论
	AdminOperSubTop = 7
	// AdminOperSubMid 修改主题的mid
	AdminOperSubMid = 8
	// AdminOperRptIgnore1 举报一审忽略
	AdminOperRptIgnore1 = 9
	// AdminOperRptIgnore2 举报二审忽略
	AdminOperRptIgnore2 = 10
	// AdminOperRptDel1 举报一审删除
	AdminOperRptDel1 = 11
	// AdminOperRptDel2 举报二审删除
	AdminOperRptDel2 = 12
	// AdminOperRptRecover1 举报一审恢复
	AdminOperRptRecover1 = 13
	// AdminOperRptRecover2 举报二审恢复
	AdminOperRptRecover2 = 14
	// AdminOperActionSet 对点赞点踩设置
	AdminOperActionSet = 15
	// AdminOperDeleteUp up主删除评论
	AdminOperDeleteUp = 16
	// AdminOperDeleteUser 用户删除评论
	AdminOperDeleteUser = 17
	// AdminOperDeleteAssist 协管删除评论
	AdminOperDeleteAssist = 18
	// AdminOperSubMonitor 设置监控状态
	AdminOperSubMonitor = 19
	// AdminOperRptTransfer1 转一审
	AdminOperRptTransfer1 = 20
	// AdminOperRptTransfer2 转二审
	AdminOperRptTransfer2 = 21
	// AdminOperRptTransferArbitration 移交仲裁
	AdminOperRptTransferArbitration = 22
	// AdminOperRptStateSet 设置举报状态
	AdminOperRptStateSet = 23
	// AdminOperSubMonitorOpen 先发后审打开
	AdminOperSubMonitorOpen = 24
	// AdminOperSubMonitorClose 先发后审关闭
	AdminOperSubMonitorClose = 25
	// AdminOperSubAuditOpen 先审后发打开
	AdminOperSubAuditOpen = 26
	// AdminOperSubAuditClose 先审后发关闭
	AdminOperSubAuditClose = 27
	// AdminOperMarkSpam 标记为垃圾
	AdminOperMarkSpam = 28
)
View Source
const (
	// WeightLike like sort weight
	WeightLike = 2
	// WeightHate hate sort weight
	WeightHate = 4
)
View Source
const (
	// MonitorClose 取消监控
	MonitorClose = int32(0)
	// MonitorOpen 打开监控
	MonitorOpen = int32(1)
	// MonitorAudit 先审后发
	MonitorAudit = int32(2)

	// MonitorStatsAll all
	MonitorStatsAll = 1
	// MonitorStatsUser all
	MonitorStatsUser = 2
)
View Source
const (
	// ReportReasonOther 其他
	ReportReasonOther = int32(0)
	// ReportReasonAd 广告
	ReportReasonAd = int32(1)
	// ReportReasonPorn 色情
	ReportReasonPorn = int32(2)
	// ReportReasonMeaningless 刷屏
	ReportReasonMeaningless = int32(3)
	// ReportReasonProvoke 引站
	ReportReasonProvoke = int32(4)
	// ReportReasonSpoiler 剧透
	ReportReasonSpoiler = int32(5)
	// ReportReasonPolitic 政治
	ReportReasonPolitic = int32(6)
	// ReportReasonAttack 人身攻击
	ReportReasonAttack = int32(7)
	// ReportReasonUnrelated 视频不相关
	ReportReasonUnrelated = int32(8)
	// ReportReasonProhibited 违禁
	ReportReasonProhibited = int32(9)
	// ReportReasonVulgar 低俗
	ReportReasonVulgar = int32(10)
	// ReportReasonIllegalWebsite 非法网站
	ReportReasonIllegalWebsite = int32(11)
	// ReportReasonGamblingFraud 赌博诈骗
	ReportReasonGamblingFraud = int32(12)
	// ReportReasonRumor 传播不实信息
	ReportReasonRumor = int32(13)
	// ReportReasonAbetting 怂恿教唆信息
	ReportReasonAbetting = int32(14)
	// ReportReasonPrivacyInvasion 侵犯隐私
	ReportReasonPrivacyInvasion = int32(15)
	// ReportReasonUnlimitedSign 抢楼
	ReportReasonUnlimitedSign = int32(16)
	// ForbidReasonSpoiler 发布剧透信息
	ForbidReasonSpoiler = int32(10)
	// ForbidReasonAd 发布垃圾广告信息
	ForbidReasonAd = int32(6)
	// ForbidReasonUnlimitedSign 抢楼
	ForbidReasonUnlimitedSign = int32(2)
	// ForbidReasonMeaningless 刷屏
	ForbidReasonMeaningless = int32(1)
	// ForbidReasonProvoke 发布引战言论
	ForbidReasonProvoke = int32(9)
	// ForbidReasonVulgar 发布低俗信息
	ForbidReasonVulgar = int32(14)
	// ForbidReasonGamblingFraud 发布赌博诈骗信息
	ForbidReasonGamblingFraud = int32(4)
	// ForbidReasonPorn 发布色情信息
	ForbidReasonPorn = int32(13)
	// ForbidReasonRumor 发布传播不实信息
	ForbidReasonRumor = int32(18)
	// ForbidReasonIllegalWebsite 发布非法网站信息
	ForbidReasonIllegalWebsite = int32(17)
	// ForbidReasonAbetting 发布怂恿教唆信息
	ForbidReasonAbetting = int32(19)
	// ForbidReasonProhibited 发布违禁信息
	ForbidReasonProhibited = int32(5)
	// ForbidReasonPrivacyInvasion 涉及侵犯他人隐私
	ForbidReasonPrivacyInvasion = int32(8)
	// ForbidReasonAttack 发布人身攻击言论
	ForbidReasonAttack = int32(7)
	// ForbidReasonInaptitude 发布不适宜内容
	ForbidReasonInaptitude = int32(28)
)
View Source
const (
	StateNormal    int32 = 0  // 正常
	StateHidden    int32 = 1  // up主隐藏
	StateFiltered  int32 = 2  // 敏感词过滤 @Deprecated to use attr 3
	StateDelAdmin  int32 = 3  // 管理员删除
	StateDelUser   int32 = 4  // 用户删除
	StateMonitor   int32 = 5  // 监控中
	StateGarbage   int32 = 6  // 大数据过虑 @Deprecated to use attr 2
	StateTopAdmin  int32 = 7  // 管理员置顶 @Deprecated to use attr 1
	StateDelUpper  int32 = 8  // up主删除
	StateBlacklist int32 = 9  // 黑名单屏蔽
	StateDelAssist int32 = 10 // 协管删除
	StatePending   int32 = 11 // 先审后发
	StateFolded    int32 = 12 // 被折叠
)

State 评论状态

View Source
const (
	AttrTopAdmin uint32 = 0 // 管理员置顶
	AttrTopUpper uint32 = 1 // up主置顶
	AttrGarbage  uint32 = 2 // 大数据过滤
	AttrFiltered uint32 = 3 // 敏感词过滤

	// 有子评论被折叠
	AttrFolded uint32 = 7
)

Attr 评论属性

View Source
const (
	SortByFloor int32 = 0 // 按楼层排序
	SortByCount int32 = 1 // 按评论数排序
	SortByLike  int32 = 2 // 按点赞数排序
)

SortBy 排序方式

View Source
const (
	FolderKindSub  = "s"
	FolderKindRoot = "r"
)

折叠评论类型

View Source
const (
	// ReportStateNew 待一审
	ReportStateNew = int32(0)
	// ReportStateDelete 移除
	ReportStateDelete = int32(1)
	// ReportStateIgnore 忽略
	ReportStateIgnore = int32(2)
	// ReportStateDelete1 一审移除
	ReportStateDelete1 = int32(3)
	// ReportStateNew2 待二审
	ReportStateNew2 = int32(4)
	// ReportStateDelete2 二审移除
	ReportStateDelete2 = int32(5)
	// ReportStateIgnore2 二审忽略
	ReportStateIgnore2 = int32(6)
	// ReportStateIgnore1 一审忽略
	ReportStateIgnore1 = int32(7)
	// ReportStateTransferred 举报转移风纪委
	ReportStateTransferred = int32(8)
	// ReportUserStateNew 新增
	ReportUserStateNew = int32(0)
	// ReportUserStateReported 已反馈
	ReportUserStateReported = int32(1)
	// ReportAttrTransferred 是否从待一审\二审转换成待二审\一审
	ReportAttrTransferred = uint32(0)
	// AuditTypeFirst 一审
	AuditTypeFirst = int32(1)
	// AuditTypeSecond 二审
	AuditTypeSecond = int32(2)
	// ReportActionReplyPass action reply_pass
	ReportActionReplyPass = "reply_pass"
	// ReportActionReplyDel action reply_del
	ReportActionReplyDel = "reply_del"
	// ReportActionReplyEdit action reply_edit
	ReportActionReplyEdit = "reply_edit"
	// ReportActionReplyRecover action reply_recover
	ReportActionReplyRecover = "reply_recover"
	// ReportActionReplyTop action 置顶
	ReportActionReplyTop = "top"
	// ReportActionReplyMonitor action 监控
	ReportActionReplyMonitor = "monitor"
	// ReportActionReplyGarbage action reply_garbage
	ReportActionReplyGarbage = "reply_garbage"
	// ReportActionReportIgnore1 action report_ignore_1
	ReportActionReportIgnore1 = "report_ignore_1"
	// ReportActionReportIgnore2 action report_ignore_2
	ReportActionReportIgnore2 = "report_ignore_2"
	// ReportActionReportDel1 action report_del_1
	ReportActionReportDel1 = "report_del_1"
	// ReportActionReportDel2 action report_del_2
	ReportActionReportDel2 = "report_del_2"
	// ReportActionReport1To2 action report_1to2
	ReportActionReport1To2 = "report_1to2"
	// ReportActionReport2To1 action report_2to1
	ReportActionReport2To1 = "report_2to1"
	// ReportActionReportArbitration action 众裁
	ReportActionReportArbitration = "report_arbitration"
)
View Source
const (
	// SubTypeArchive 稿件
	SubTypeArchive int32 = 1
	// SubTypeTopic 话题
	SubTypeTopic = 2
	// SubTypeDrawyoo 画站 NOTE Deprecated
	SubTypeDrawyoo = 3
	// SubTypeActivity 活动
	SubTypeActivity = 4
	// SubTypeLiveVideo 直播小视频
	SubTypeLiveVideo = 5
	// SubTypeForbiden 封禁信息
	SubTypeForbiden = 6
	// SubTypeNotice 公告信息
	SubTypeNotice = 7
	// SubTypeLiveAct 直播活动
	SubTypeLiveAct = 8
	// SubTypeActArc 活动稿件
	SubTypeActArc = 9
	// SubTypeLiveNotice 直播公告
	SubTypeLiveNotice = 10
	// SubTypeLivePicture 直播有文画
	SubTypeLivePicture = 11
	// SubTypeArticle 文章
	SubTypeArticle = 12
	// SubTypeTicket 票务
	SubTypeTicket = 13
	// SubTypeMusic 音乐
	SubTypeMusic = 14
	// SubTypeCredit 风纪委
	SubTypeCredit = 15
	// SubTypePgcCmt 点评
	SubTypePgcCmt = 16
	// SubTypeDynamic 动态
	SubTypeDynamic = 17
	// SubTypePlaylist 播单
	SubTypePlaylist = 18
	// SubTypeMusicList 音乐播单
	SubTypeMusicList = 19
	// SubTypeComicSeason 漫画部评论
	SubTypeComicSeason = 20
	// SubTypeComicEpisode 漫画话评论
	SubTypeComicEpisode = 21
	// SubStateNormal 正常
	SubStateNormal int32 = 0
	// SubStateForbid 关闭
	SubStateForbid = 1
	// SubStateMonitor 监控中 NOTE Deprecated to use attr 2
	SubStateMonitor = 2
	// SubAttrTopAdmin 管理员置顶
	SubAttrTopAdmin uint32 = 0
	// SubAttrTopUpper up主置顶
	SubAttrTopUpper = 1
	// SubAttrMonitor 监控中
	SubAttrMonitor = 2
	// SubAttrConfig 存在配置
	SubAttrConfig = 3
	// SubAttrAudit 先审后发
	SubAttrAudit = 4
	// SubAttrFrozen 冻结评论
	SubAttrFrozen = 5

	// SubAttrFolded  有折叠的根评论
	SubAttrFolded = 7

	// SujectAllow subject_allow
	SujectAllow = "subject_allow"
	// SujectForbid SujectForbid
	SujectForbid = "subject_forbid"
	// SujectFrozen SujectFrozen
	SujectFrozen = "subject_frozen"
	// SujectUnfrozenAllow SujectUnfrozenAllow
	SujectUnfrozenAllow = "subject_unfrozen_allow"
	// SujectUnfrozenForbid SujectUnfrozenForbid
	SujectUnfrozenForbid = "subject_unfrozen_forbid"
)
View Source
const (
	// ConfigCategoryLogDel ConfigCategoryLogDel
	ConfigCategoryLogDel int32 = 1
)

Variables

View Source
var (
	// ErrSearchReport search report error
	ErrSearchReport = errors.New("search report error")
	// ErrSearchReply search reply error
	ErrSearchReply = errors.New("search reply error")
	// ErrSearchMonitor search monitor error
	ErrSearchMonitor = errors.New("search monitor error")
	// ErrMsgSend send message error
	ErrMsgSend = errors.New("send message error")

	// AttrNo attribute no
	AttrNo = uint32(0)
	// AttrYes attribute yes
	AttrYes = uint32(1)

	// EventReportAdd event add a report
	EventReportAdd = "report_add"
	// EventReportDel event del a report
	EventReportDel = "report_del"
	// EventReportIgnore event ignore a report
	EventReportIgnore = "report_ignore"
	// EventReportRecover event recover a report
	EventReportRecover = "report_recover"
)
View Source
var (
	// NotifyComRules 社区规则
	NotifyComRules = fmt.Sprintf(`评论区是公众场所,而非私人场所,具体规范烦请参阅#{《社区规则》}{"%s"},良好的社区氛围需要大家一起维护!`, "http://www.bilibili.com/blackboard/blackroom.html")
	// NotifyComRulesReport 举报
	NotifyComRulesReport = "感谢您对bilibili社区秩序的维护,哔哩哔哩 (゜-゜)つロ 干杯~"
	// NotifyComUnrelated NotifyComUnrelated
	NotifyComUnrelated = "" /* 136-byte string literal not displayed */
	// NotifyComProvoke NotifyComProvoke
	NotifyComProvoke = "bilibili倡导平等友善的交流。良好的社区氛围需要大家一起维护!"
	// NofityComProhibited NofityComProhibited
	NofityComProhibited = fmt.Sprintf(`请自觉遵守国家相关法律法规及#{《社区规则》}{"%s"},bilibili良好的社区氛围需要大家一起维护!`, "http://www.bilibili.com/blackboard/blackroom.html")
	// ReportReason 举报理由类型
	ReportReason = map[int32]string{
		ReportReasonAd:              "内容涉及垃圾广告",
		ReportReasonPorn:            "内容涉及色情",
		ReportReasonMeaningless:     "刷屏",
		ReportReasonProvoke:         "内容涉及引战",
		ReportReasonSpoiler:         "内容涉及视频剧透",
		ReportReasonPolitic:         "内容涉及政治相关",
		ReportReasonAttack:          "内容涉及人身攻击",
		ReportReasonUnrelated:       "视频不相关",
		ReportReasonProhibited:      "内容涉及违禁相关",
		ReportReasonVulgar:          "内容涉及低俗信息",
		ReportReasonIllegalWebsite:  "内容涉及非法网站信息",
		ReportReasonGamblingFraud:   "内容涉及赌博诈骗信息",
		ReportReasonRumor:           "内容涉及传播不实信息",
		ReportReasonAbetting:        "内容不适宜",
		ReportReasonPrivacyInvasion: "内容涉及侵犯他人隐私",
		ReportReasonUnlimitedSign:   "抢楼",
	}
	// ForbidReason 封禁理由类型
	ForbidReason = map[int32]string{
		ForbidReasonSpoiler:         "发布剧透信息",
		ForbidReasonAd:              "发布垃圾广告信息",
		ForbidReasonUnlimitedSign:   "抢楼",
		ForbidReasonMeaningless:     "刷屏",
		ForbidReasonProvoke:         "发布引战言论",
		ForbidReasonVulgar:          "发布低俗信息",
		ForbidReasonGamblingFraud:   "发布赌博诈骗信息",
		ForbidReasonPorn:            "发布色情信息",
		ForbidReasonRumor:           "发布传播不实信息",
		ForbidReasonIllegalWebsite:  "发布非法网站信息",
		ForbidReasonAbetting:        "发布怂恿教唆信息",
		ForbidReasonProhibited:      "发布违禁信息",
		ForbidReasonPrivacyInvasion: "涉及侵犯他人隐私",
		ForbidReasonAttack:          "发布人身攻击言论",
		ForbidReasonInaptitude:      "发布不适宜内容",
	}
)
View Source
var (
	// DateFormat date time format
	DateFormat = "2006-01-02 15:04:05"
	// DateSimpleFormat date simple format
	DateSimpleFormat = "2006-01-02"
)

Functions

func CheckSubState

func CheckSubState(state int32) (err error)

CheckSubState check subject state is ok.

func LegalSubjectType

func LegalSubjectType(tp int32) bool

LegalSubjectType LegalSubjectType

Types

type Action

type Action struct {
	ID     int64      `json:"-"`
	RpID   int64      `json:"rpid"`
	Action int8       `json:"action"`
	Mid    int64      `json:"mid"`
	CTime  xtime.Time `json:"-"`
}

Action reply action info

type AdminLog

type AdminLog struct {
	ID       int64  `json:"id"`
	Type     int8   `json:"type"`
	Oid      int64  `json:"oid"`
	ReplyID  int64  `json:"reply_id"`
	AdminID  int64  `json:"admin_id"`
	Result   string `json:"result"`
	Remark   string `json:"remark"`
	IsNew    int8   `json:"is_new"`
	IsReport int8   `json:"is_report"`
	State    int8   `json:"state"`
	CTime    string `json:"ctime"`
	MTime    string `json:"mtime"`
}

AdminLog log.

type Attr

type Attr []int32

func (*Attr) UnmarshalJSON

func (a *Attr) UnmarshalJSON(b []byte) error

type Business

type Business struct {
	Type   int32  `json:"type"`
	Name   string `json:"name"`
	Appkey string `json:"app_key"`
	Remark string `json:"remark"`
	Alias  string `json:"alias"`
}

Business Business

type CSV

type CSV struct {
	Data  [][]string
	Title string
}

CSV Comma-Separated Values struct.

func (CSV) Render

func (c CSV) Render(w http.ResponseWriter) (err error)

Render (CSV) writes data with CSV ContentType.

func (CSV) WriteContentType

func (c CSV) WriteContentType(w http.ResponseWriter)

WriteContentType write CSV ContentType.

type Config

type Config struct {
	ID        int64  `json:"id"`
	Type      int32  `json:"type"`
	Oid       int64  `json:"oid"`
	AdminID   int64  `json:"adminid"`
	Operator  string `json:"operator"`
	Category  int32  `json:"category"`
	Config    string `json:"config"`
	ShowEntry int32  `json:"showentry"`
	ShowAdmin int32  `json:"showadmin"`
	CTime     string `json:"ctime"`
	MTime     string `json:"mtime"`
}

Config reply config info.

type Emoji

type Emoji struct {
	ID        int64  `json:"id"`
	PackageID int64  `json:"package_id"`
	Name      string `json:"name"`
	URL       string `json:"url"`
	State     int32  `json:"state"`
	Sort      int32  `json:"sort"`
	Remark    string `json:"remark"`
}

Emoji Emoji

type EmojiPackage

type EmojiPackage struct {
	ID     int64    `json:"id"`
	Name   string   `json:"name"`
	URL    string   `json:"url"`
	State  int32    `json:"state"`
	Sort   int32    `json:"sort"`
	Remark string   `json:"remark"`
	Emojis []*Emoji `json:"emojis"`
}

EmojiPackage emoji package

type ExportedReply

type ExportedReply struct {
	ID      int64     `json:"rpid"`
	Oid     int64     `json:"oid"`
	Type    int32     `json:"type"`
	Mid     int64     `json:"mid"`
	Root    int64     `json:"root"`
	Parent  int64     `json:"parent"`
	Count   int32     `json:"count"`
	RCount  int32     `json:"rcount"`
	Like    int32     `json:"like"`
	Hate    int32     `json:"hate"`
	Floor   int32     `json:"floor"`
	State   int32     `json:"state"`
	Attr    int32     `json:"attr"`
	CTime   time.Time `json:"ctime"`
	Message string    `json:"message"`
}

ExportedReply exported reply struct

func (*ExportedReply) String

func (e *ExportedReply) String() (s []string)

String convert ExportedReply to string

type IP

type IP int64

func (*IP) UnmarshalJSON

func (ip *IP) UnmarshalJSON(b []byte) error

type Int64Bytes

type Int64Bytes []int64

Int64Bytes implements the Scanner interface.

func (Int64Bytes) Bytes

func (is Int64Bytes) Bytes() []byte

Bytes marshal int64 slice to bytes,each int64 will occupy Fixed 8 bytes

func (*Int64Bytes) Evict

func (is *Int64Bytes) Evict(e int64) (ok bool)

Evict get rid of the sepcified num from the slice

func (Int64Bytes) Exist

func (is Int64Bytes) Exist(i int64) (e bool)

Exist judge the sepcified num is in the slice or not

func (*Int64Bytes) Scan

func (is *Int64Bytes) Scan(src interface{}) (err error)

Scan parse the data into int64 slice

func (Int64Bytes) Value

func (is Int64Bytes) Value() (driver.Value, error)

Value marshal int64 slice to driver.Value,each int64 will occupy Fixed 8 bytes

type LogSearchParam

type LogSearchParam struct {
	Oid       int64
	Type      int32
	Mid       int64
	CtimeFrom string
	CtimeTo   string
	Action    string
	Pn        int64
	Ps        int64
	Other     int64
	Sort      string
	Order     string
	Group     string
	Appid     string
}

LogSearchParam LogSearchParam

type MonitorLog

type MonitorLog struct {
	AdminID     int64  `json:"adminid"`
	AdminName   string `json:"admin_name"`
	Oid         int64  `json:"oid"`
	OidStr      string `json:"oid_str"`
	Type        int32  `json:"type"`
	Title       string `json:"title"`
	RedirectURL string `json:"redirect_url"`
	Remark      string `json:"remark"`
	UserName    string `json:"username"`
	Mid         int64  `json:"mid"`
	CTime       string `json:"ctime"`
	LogState    int64  `json:"log_state"`
	State       int64  `json:"state"`
}

MonitorLog MonitorLog

type MonitorLogResult

type MonitorLogResult struct {
	Logs  []*MonitorLog `json:"logs"`
	Page  Page          `json:"page"`
	Order string        `json:"order"`
	Sort  string        `json:"sort"`
}

MonitorLogResult MonitorLogResult

type NewPager

type NewPager struct {
	Num   int64 `json:"num"`
	Size  int64 `json:"size"`
	Total int64 `json:"total"`
}

NewPager NewPager

type Notice

type Notice struct {
	ID         uint32          `json:"id"`
	Plat       NoticePlat      `json:"plat"`
	Version    string          `json:"version"`
	Condition  NoticeCondition `json:"condi"`
	Build      uint32          `json:"build"`
	Title      string          `json:"title"`
	Content    string          `json:"content"`
	Link       string          `json:"link"`
	StartTime  xtime.Time      `json:"stime"`
	EndTime    xtime.Time      `json:"etime"`
	Status     NoticeStatus    `json:"status"`
	CreateTime xtime.Time      `json:"ctime"`
	ModifyTime xtime.Time      `json:"mtime"`
	//client's program type
	ClientType string `json:"client_type"`
}

Notice reply's public notice

type NoticeCondition

type NoticeCondition uint8

NoticeCondition NoticeCondition

const (
	// ConditionEQ ConditionEQ
	ConditionEQ NoticeCondition = 0 // condition equal
	// ConditionGT ConditionGT
	ConditionGT NoticeCondition = 1 // greater
	// ConditionLT ConditionLT
	ConditionLT NoticeCondition = 2 // less
)

type NoticePlat

type NoticePlat uint8

NoticePlat NoticePlat

const (
	// PlatUnknow PlatUnknow
	PlatUnknow NoticePlat = 0
	// PlatWeb PlatUnknow
	PlatWeb NoticePlat = 1
	// PlatAndroid PlatAndroid
	PlatAndroid NoticePlat = 2
	// PlatIPhone PlatIPhone
	PlatIPhone NoticePlat = 3
	// PlatWpM wp mobile
	PlatWpM NoticePlat = 4
	// PlatIPad PlatIPad
	PlatIPad NoticePlat = 5
	// PlatPadHd ipad hd
	PlatPadHd NoticePlat = 6
	// PlatWpPc win10
	PlatWpPc NoticePlat = 7
)

type NoticeStatus

type NoticeStatus uint8

NoticeStatus NoticeStatus

const (
	// StatusOffline StatusOffline
	StatusOffline NoticeStatus = 0
	// StatusOnline StatusOnline
	StatusOnline NoticeStatus = 1
)

type Page

type Page struct {
	Num   int64 `json:"num"`
	Size  int64 `json:"size"`
	Total int64 `json:"total"`
}

Page Page

type Pager

type Pager struct {
	Page     int64 `json:"page"`
	PageSize int64 `json:"pagesize"`
	Total    int64 `json:"total"`
}

Pager page info.

type Reply

type Reply struct {
	ID     int64      `json:"rpid"`
	Oid    int64      `json:"oid"`
	Type   int32      `json:"type"`
	Mid    int64      `json:"mid"`
	Root   int64      `json:"root"`
	Parent int64      `json:"parent"`
	Dialog int64      `json:"dialog"`
	Count  int32      `json:"count"`
	MCount int32      `json:"mcount"`
	RCount int32      `json:"rcount"`
	Floor  int32      `json:"floor"`
	State  int32      `json:"state"`
	Attr   uint32     `json:"attr"`
	CTime  xtime.Time `json:"ctime"`
	MTime  xtime.Time `json:"-"`
	// action info
	Like    int32         `json:"like"`
	Hate    int32         `json:"hate"`
	Action  int32         `json:"action"`
	Content *ReplyContent `json:"content"`
}

Reply info.

func (*Reply) AllowFoldState

func (r *Reply) AllowFoldState() bool

AllowFoldState ...

func (*Reply) AttrSet

func (r *Reply) AttrSet(v uint32, bit uint32)

AttrSet set attr of reply'attr

func (*Reply) AttrVal

func (r *Reply) AttrVal(bit uint32) uint32

AttrVal return val of reply'attr

func (*Reply) DenyFolded

func (r *Reply) DenyFolded() bool

DenyFolded ...

func (*Reply) HasFolded

func (r *Reply) HasFolded() bool

HasFolded ...

func (*Reply) IsDeleted

func (r *Reply) IsDeleted() bool

IsDeleted deleted.

func (*Reply) IsFolded

func (r *Reply) IsFolded() bool

IsFolded .

func (*Reply) IsNormal

func (r *Reply) IsNormal() bool

IsNormal IsNormal

func (*Reply) IsPending

func (r *Reply) IsPending() bool

func (*Reply) IsRoot

func (r *Reply) IsRoot() bool

IsRoot root.

func (*Reply) IsTop

func (r *Reply) IsTop() bool

IsTop top.

func (*Reply) MarkHasFolded

func (r *Reply) MarkHasFolded()

MarkHasFolded ...

func (*Reply) UnmarkHasFolded

func (r *Reply) UnmarkHasFolded()

UnmarkHasFolded ...

type ReplyContent

type ReplyContent struct {
	ID      int64      `json:"-"`
	Message string     `json:"message"`
	Ats     Int64Bytes `json:"ats,omitempty"`
	IP      uint32     `json:"ipi,omitempty"`
	Plat    int8       `json:"plat"`
	Device  string     `json:"device"`
	Version string     `json:"version,omitempty"`
	CTime   xtime.Time `json:"-"`
	MTime   xtime.Time `json:"-"`
}

ReplyContent define reply content

type ReplyEx

type ReplyEx struct {
	Reply
	IsUp      bool  `json:"is_up"`
	RootFloor int32 `json:"root_floor"`
}

Reply info.b

type ReplySearchResponse

type ReplySearchResponse struct {
	SearchResult
	Pager Pager `json:"pager"`
}

ReplySearchResponse ReplySearchResponse

type ReplyTopLog

type ReplyTopLog struct {
	AdminID     int64  `json:"adminid"`
	AdminName   string `json:"admin_name"`
	Oid         int64  `json:"oid"`
	Type        int32  `json:"type"`
	Title       string `json:"title"`
	RedirectURL string `json:"redirect_url"`
	Remark      string `json:"remark"`
	UserName    string `json:"username"`
	Mid         int64  `json:"mid"`
	CTime       string `json:"ctime"`
	RpID        int64  `json:"rpid"`
	Action      int64  `json:"action"`
}

ReplyTopLog ReplyTopLog

type ReplyTopLogResult

type ReplyTopLogResult struct {
	Logs  []*ReplyTopLog `json:"logs"`
	Page  Page           `json:"page"`
	Order string         `json:"order"`
	Sort  string         `json:"sort"`
}

ReplyTopLogResult ReplyTopLogResult

type Report

type Report struct {
	ID         int64      `json:"id"`
	RpID       int64      `json:"rpid"`
	Oid        int64      `json:"oid"`
	Type       int32      `json:"type"`
	Mid        int64      `json:"mid"`
	Reason     int32      `json:"reason"`
	Content    string     `json:"content"`
	Count      int32      `json:"count"`
	Score      int        `json:"score"`
	State      int32      `json:"state"`
	CTime      xtime.Time `json:"ctime"`
	MTime      xtime.Time `json:"mtime"`
	Attr       uint32     `json:"attr"`
	ReplyCtime xtime.Time `json:"-"`
}

Report report info.

func (*Report) AttrSet

func (r *Report) AttrSet(v uint32, bit uint32)

AttrSet set attr of ReplyReport'attr

func (*Report) AttrVal

func (r *Report) AttrVal(bit uint32) uint32

AttrVal return attr val.

type ReportSearchResponse

type ReportSearchResponse struct {
	SearchReportResult
	Pager Pager `json:"pager"`
}

ReportSearchResponse search result.

type ReportUser

type ReportUser struct {
	ID      int64      `json:"id"`
	Oid     int64      `json:"oid"`
	Type    int8       `json:"type"`
	RpID    int64      `json:"rpid"`
	Mid     int64      `json:"mid"`
	Reason  int32      `json:"reason"`
	Content string     `json:"content"`
	State   int32      `json:"state"`
	CTime   xtime.Time `json:"ctime"`
	MTime   xtime.Time `json:"mtime"`
}

ReportUser report user.

type SearchAdminLog

type SearchAdminLog struct {
	Type      int8   `json:"type"`
	Oid       int64  `json:"oid"`
	ReplyID   int64  `json:"rpid"`
	AdminID   int64  `json:"adminid"`
	AdminName string `json:"admin_name"`
	Result    string `json:"opresult"`
	Remark    string `json:"opremark"`
	State     int8   `json:"state"`
	CTime     string `json:"opctime"`
}

SearchAdminLog log.

type SearchMonitor

type SearchMonitor struct {
	ID          int64  `json:"id"`
	Oid         int64  `json:"oid"`
	OidStr      string `json:"oid_str"`
	Type        int8   `json:"type"`
	Mid         int64  `json:"mid"`
	State       int8   `json:"state"`
	Attr        int32  `json:"attr"`
	Ctime       string `json:"ctime"`
	Mtime       string `json:"mtime"`
	Title       string `json:"title"`
	Uname       string `json:"uname"`
	UnverifyNmu int    `json:"unverify_num"`
	MCount      int32  `json:"mcount"`
	DocID       string `json:"doc_id"`
	Remark      string `json:"remark"`
}

SearchMonitor search monitor.

type SearchMonitorParams

type SearchMonitorParams struct {
	Mode     int8
	Type     int8
	Oid      int64
	UID      int64
	NickName string
	Keyword  string
	Sort     string
	Order    string
}

SearchMonitorParams search params.

type SearchMonitorResult

type SearchMonitorResult struct {
	Code      int              `json:"code,omitempty"`
	Page      int64            `json:"page"`
	PageSize  int64            `json:"pagesize"`
	PageCount int64            `json:"pagecount"`
	Total     int64            `json:"total"`
	Order     string           `json:"order"`
	Result    []*SearchMonitor `json:"result"`
	Message   string           `json:"msg,omitempty"`
}

SearchMonitorResult search result.

type SearchParams

type SearchParams struct {
	Type        int32
	Oid         int64
	TypeIds     string
	Keyword     string
	KeywordHigh string
	UID         int64
	Uname       string
	AdminID     int64
	AdminName   string
	Begin       time.Time
	End         time.Time
	States      string
	IP          int64
	Attr        string
	Sort        string
	Order       string
}

SearchParams reply params.

type SearchReply

type SearchReply struct {
	// 评论基础信息
	ID     int64  `json:"id"`
	Type   int8   `json:"type"`
	Oid    int64  `json:"oid"`
	OidStr string `json:"oid_str"`
	State  int8   `json:"state"`
	Floor  int64  `json:"floor"`
	Ctime  string `json:"ctime"`
	Mtime  string `json:"mtime"`
	Attr   Attr   `json:"attr"`
	Title  string `json:"title"`

	// 评论人的相关信息
	Mid     int64    `json:"mid"`
	Stat    *rl.Stat `json:"stat"`
	Replier string   `json:"replier"`
	IP      IP       `json:"ip"`
	Message string   `json:"message"`
	Typeid  int      `json:"typeid"`
	Root    int      `json:"root"`

	// 后台操作信息
	AdminID     int64  `json:"adminid"`
	AdminName   string `json:"admin_name"`
	Opremark    string `json:"opremark"`
	Opresult    string `json:"opresult"`
	OpCtime     string `json:"opctime"`
	RedirectURL string `json:"redirect_url"`
	// 搜索返回的额外数据
	DocID string `json:"doc_id"`
}

SearchReply search reply.

type SearchReport

type SearchReport struct {
	ID          int64  `json:"id"`
	Oid         int64  `json:"oid"`
	OidStr      string `json:"oid_str"`
	Type        int8   `json:"type"`
	RpID        int64  `json:"rpid"`
	Mid         int64  `json:"mid"`
	Reason      int8   `json:"reason"`
	Content     string `json:"content"`
	State       int8   `json:"state"`
	CTime       string `json:"ctime"`
	MTime       string `json:"mtime"`
	Parent      int64  `json:"parent"`
	Like        int64  `json:"like"`
	ReplyState  int64  `json:"reply_state"`
	Opremark    string `json:"opremark"`
	Count       int64  `json:"count"`
	Message     string `json:"message"`
	Title       string `json:"title"`
	Opresult    string `json:"opresult"`
	ReplyMid    int64  `json:"reply_mid"`
	Floor       int64  `json:"floor"`
	Root        int64  `json:"root"`
	ReportMid   int64  `json:"report_mid"`
	ArcMid      int64  `json:"arc_mid"`
	Reporter    string `json:"reporter"`
	Replier     string `json:"replier"`
	IsUp        int64  `json:"is_up"`
	AdminID     int64  `json:"adminid"`
	AdminName   string `json:"admin_name"`
	Opctime     string `json:"opctime"`
	DocID       string `json:"doc_id"`
	Score       int64  `json:"score"`
	Attr        []int8 `json:"attr"`
	RedirectURL string `json:"redirect_url"`
}

SearchReport search report.

type SearchReportParams

type SearchReportParams struct {
	Type      int32
	Oid       int64
	UID       int64
	StartTime string
	EndTime   string
	Reason    string
	Typeids   string
	Keyword   string
	Nickname  string
	States    string
	Order     string
	Sort      string
}

SearchReportParams search params.

type SearchReportResult

type SearchReportResult struct {
	Code      int             `json:"code,omitempty"`
	Page      int64           `json:"page"`
	PageSize  int64           `json:"pagesize"`
	PageCount int             `json:"pagecount"`
	Total     int64           `json:"total"`
	Order     string          `json:"order"`
	Result    []*SearchReport `json:"result"`
	Message   string          `json:"msg,omitempty"`
}

SearchReportResult search result.

type SearchResult

type SearchResult struct {
	Code      int            `json:"code"`
	Message   string         `json:"msg,omitempty"`
	Order     string         `json:"order"`
	Page      int64          `json:"page"`
	PageSize  int64          `json:"pagesize"`
	PageCount int64          `json:"pagecount"`
	Total     int64          `json:"total"`
	Result    []*SearchReply `json:"result"`
}

SearchResult search result.

type StatsMonitor

type StatsMonitor struct {
	Date           string `json:"date"`
	AdminID        int64  `json:"adminid"`
	MonitorTotal   int64  `json:"monitor_total"`
	MonitorPending int64  `json:"monitor_pending"`
	MonitorPass    int64  `json:"monitor_pass"`
	MonitorDel     int64  `json:"monitor_del"`
	MonitorAvgCost string `json:"monitor_avg_cost"`
}

StatsMonitor stats monitor.

type StatsMonitorResult

type StatsMonitorResult struct {
	Code      int             `json:"code,omitempty"`
	Page      int             `json:"page"`
	PageSize  int             `json:"pagesize"`
	PageCount int             `json:"pagecount"`
	Total     int             `json:"total"`
	Order     string          `json:"order"`
	Message   string          `json:"msg,omitempty"`
	Result    []*StatsMonitor `json:"result"`
}

StatsMonitorResult search result.

type Subject

type Subject struct {
	ID     int64     `json:"-"`
	Oid    int64     `json:"oid"`
	Type   int32     `json:"type"`
	Mid    int64     `json:"mid"`
	Count  int32     `json:"count"`
	RCount int32     `json:"rcount"`
	ACount int32     `json:"acount"`
	State  int32     `json:"state"`
	Attr   uint32    `json:"attr"`
	CTime  time.Time `json:"ctime"`
	MTime  time.Time `json:"-"`
	Meta   string    `json:"meta"`
}

Subject reply subject.

func (*Subject) AttrSet

func (s *Subject) AttrSet(v uint32, bit uint32)

AttrSet set val of subject'attr.

func (*Subject) AttrVal

func (s *Subject) AttrVal(bit uint32) uint32

AttrVal return val of subject'attr.

func (*Subject) HasFolded

func (s *Subject) HasFolded() bool

HasFolded ...

func (*Subject) MarkHasFolded

func (s *Subject) MarkHasFolded()

MarkHasFolded ...

func (*Subject) TopSet

func (s *Subject) TopSet(top int64, typ uint, act uint32) (err error)

TopSet TopSet

func (*Subject) UnmarkHasFolded

func (s *Subject) UnmarkHasFolded()

UnmarkHasFolded ...

type SubjectLog

type SubjectLog struct {
	AdminID   int64  `json:"adminid"`
	AdminName string `json:"admin_name"`
	Oid       string `json:"oid"`
	Type      int32  `json:"type"`
	Remark    string `json:"remark"`
	Action    string `json:"action"`
	CTime     string `json:"ctime"`
	State     int32  `json:"state"`
}

SubjectLog info

type SubjectLogRes

type SubjectLogRes struct {
	Logs  []*SubjectLog `json:"logs"`
	Page  Page          `json:"page"`
	Order string        `json:"order"`
	Sort  string        `json:"sort"`
}

SubjectLogRes format

type SubjectMeta

type SubjectMeta struct {
	AdminTop int64 `json:"atop,omitempty"`
	UpperTop int64 `json:"utop,omitempty"`
}

SubjectMeta SubjectMeta

Jump to

Keyboard shortcuts

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