block

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

Documentation

Index

Constants

View Source
const (
	// BlockLogBizID 用户审核日志
	BlockLogBizID int = 122
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AccountNotify

type AccountNotify struct {
	UID    int64  `json:"mid"`
	Type   string `json:"type"`
	Action string `json:"action"`
}

AccountNotify .

type BlockAction

type BlockAction uint8

BlockAction .

const (
	// BlockActionLimit 限时封禁
	BlockActionLimit BlockAction = iota + 1
	// BlockActionForever 永久封禁
	BlockActionForever
	// BlockActionAdminRemove �后台解封
	BlockActionAdminRemove
	// BlockActionSelfRemove 自助解封
	BlockActionSelfRemove
)

func (BlockAction) String

func (b BlockAction) String() string

String .

type BlockArea

type BlockArea uint8

BlockArea 封禁业务

const (
	BlockAreaNone BlockArea = iota
	BlockAreaReply
	BlockAreaDanmaku
	BlockAreaMessage
	BlockAreaTag
	BlockAreaProfile // 个人资料
	BlockAreaArchive
	BlockAreaMusic
	BlockAreaArticle
	BlockAreaSpaceBanner // 空间头图
	BlockAreaDynamic     // 动态
	BlockAreaAlbum       // 相册
	BlockAreaQuickVideo  //小视频
)

const .

func (BlockArea) Contain

func (b BlockArea) Contain() bool

Contain .

func (BlockArea) String

func (b BlockArea) String() string

type BlockHistory

type BlockHistory struct {
	Area       BlockArea   `json:"type"`
	Operator   string      `json:"operator"`    // 操作人
	Reason     string      `json:"reason"`      // 封禁原因
	Action     BlockAction `json:"action"`      // 操作类型
	ActionTime int64       `json:"action_time"` // 操作时间
	RemoveTime int64       `json:"remove_time"` // 解封时间
	Comment    string      `json:"comment"`
}

BlockHistory 封禁历史

func (*BlockHistory) ParseDB

func (b *BlockHistory) ParseDB(data *DBHistory)

ParseDB .

type BlockInfo

type BlockInfo struct {
	MID         int64       `json:"mid"`
	BlockStatus BlockStatus `json:"status"`     // status 封禁状态 0. 未封禁 1. 永久封禁 2. 限时封禁
	StartTime   int64       `json:"start_time"` // 开始封禁时间 unix time 未封禁为 -1
	EndTime     int64       `json:"end_time"`   // 结束封禁时间 unix time �永久封禁为 -1
}

BlockInfo 封禁信息

func (*BlockInfo) ParseDB

func (b *BlockInfo) ParseDB(data *DBHistory)

ParseDB .

func (*BlockInfo) ParseMC

func (b *BlockInfo) ParseMC(data *MCBlockInfo, mid int64)

ParseMC .

type BlockMessage

type BlockMessage struct {
	MID    int64       `json:"mid"`    // 用户mid
	Area   BlockArea   `json:"area"`   // BlockArea 封禁类型 1. 小黑屋(小黑屋和manager后台封禁) 2. 系统封禁(反作弊及监控系统上报) 3.解封 (所有后台,用户前台自助的解封)
	Status BlockStatus `json:"status"` // blockStatus 封禁状态 0. 未封禁 1. 永久封禁 2. 限时封禁
}

BlockMessage 通知消息体

type BlockSource

type BlockSource uint8

BlockSource 封禁来源 1. 小黑屋(小黑屋和manager后台封禁) 2. 系统封禁(反作弊及监控系统上报) 3.管理后台 4.B+

const (
	// BlockSourceBlackHouse 小黑屋封禁
	BlockSourceBlackHouse BlockSource = iota + 1
	// BlockSourceSys 系统封禁
	BlockSourceSys
	// BlockSourceManager 管理后台
	BlockSourceManager
	// BlockSourceBplus B+相关(动态、im、小视频)
	BlockSourceBplus
)

func (BlockSource) Contain

func (b BlockSource) Contain() bool

Contain .

func (BlockSource) String

func (b BlockSource) String() string

String .

type BlockStatus

type BlockStatus uint8

BlockStatus 封禁状态 0. 未封禁 1. 永久封禁 2. 限时封禁

const (
	// BlockStatusFalse 未封禁
	BlockStatusFalse BlockStatus = iota
	// BlockStatusForever 永久封禁
	BlockStatusForever
	// BlockStatusLimit 限时封禁
	BlockStatusLimit
	// BlockStatusCredit 小黑屋封禁
	BlockStatusCredit
)

type BlockUserDetail

type BlockUserDetail struct {
	MID        int64 `json:"mid"`         // 用户mid
	BlockCount int64 `json:"block_count"` // 封禁次数
}

BlockUserDetail .

type DBHistory

type DBHistory struct {
	ID        int64
	MID       int64
	AdminID   int64
	AdminName string
	Source    BlockSource
	Area      BlockArea
	Reason    string
	Comment   string
	Action    BlockAction
	StartTime time.Time
	Duration  int64
	Notify    bool
	CTime     time.Time
	MTime     time.Time
}

DBHistory .

type DBUser

type DBUser struct {
	ID     int64
	MID    int64
	Status BlockStatus
	CTime  time.Time
	MTime  time.Time
}

DBUser .

type DBUserDetail

type DBUserDetail struct {
	ID         int64
	MID        int64
	BlockCount int64
	CTime      time.Time
	MTime      time.Time
}

DBUserDetail .

type MCBlockInfo

type MCBlockInfo struct {
	BlockStatus BlockStatus `json:"bs"`
	StartTime   int64       `json:"st"`
	EndTime     int64       `json:"et"`
}

MCBlockInfo .

type MCUserDetail

type MCUserDetail struct {
	BlockCount int64 `json:"block_count"`
}

MCUserDetail .

type ParamBatchBlock

type ParamBatchBlock struct {
	MIDs       []int64     `form:"mids,split"`
	Source     BlockSource `form:"source"`
	Area       BlockArea   `form:"area"`
	Action     BlockAction `form:"action"`
	Duration   int64       `form:"duration"` // unix time
	StartTime  int64       `form:"start_time"`
	OperatorID int         `form:"op_id"`
	Operator   string      `form:"operator"`
	Reason     string      `form:"reason"`
	Comment    string      `form:"comment"`
	Notify     bool        `form:"notify"`
}

ParamBatchBlock .

func (*ParamBatchBlock) Validate

func (p *ParamBatchBlock) Validate() bool

Validate .

type ParamBatchDetail

type ParamBatchDetail struct {
	MIDs []int64 `form:"mids,split"`
}

ParamBatchDetail .

func (*ParamBatchDetail) Validate

func (p *ParamBatchDetail) Validate() bool

Validate .

type ParamBatchInfo

type ParamBatchInfo struct {
	MIDs []int64 `form:"mids,split"`
}

ParamBatchInfo .

func (*ParamBatchInfo) Validate

func (p *ParamBatchInfo) Validate() bool

Validate .

type ParamBatchRemove

type ParamBatchRemove struct {
	MIDs       []int64     `form:"mids,split"`
	Source     BlockSource `form:"source"`
	OperatorID int         `form:"op_id"`
	Operator   string      `form:"operator"`
	Reason     string      `form:"reason"`
	Comment    string      `form:"comment"`
	Notify     bool        `form:"notify"`
}

ParamBatchRemove .

func (*ParamBatchRemove) Validate

func (p *ParamBatchRemove) Validate() bool

Validate .

type ParamBlock

type ParamBlock struct {
	MID        int64       `form:"mid"`
	Source     BlockSource `form:"source"`
	Area       BlockArea   `form:"area"`
	Action     BlockAction `form:"action"`
	Duration   int64       `form:"duration"` // unix time
	StartTime  int64       `form:"start_time"`
	OperatorID int         `form:"op_id"`
	Operator   string      `form:"operator"`
	Reason     string      `form:"reason"`
	Comment    string      `form:"comment"`
	Notify     bool        `form:"notify"`
}

ParamBlock .

func (*ParamBlock) Validate

func (p *ParamBlock) Validate() bool

Validate .

type ParamInfo

type ParamInfo struct {
	MID int64 `form:"mid"`
}

ParamInfo .

func (*ParamInfo) Validate

func (p *ParamInfo) Validate() bool

Validate .

type ParamRemove

type ParamRemove struct {
	MID        int64       `form:"mid"`
	Source     BlockSource `form:"source"`
	OperatorID int         `form:"op_id"`
	Operator   string      `form:"operator"`
	Reason     string      `form:"reason"`
	Comment    string      `form:"comment"`
	Notify     bool        `form:"notify"`
}

ParamRemove .

func (*ParamRemove) Validate

func (p *ParamRemove) Validate() bool

Validate .

type ParamValidator

type ParamValidator interface {
	Validate() bool
}

ParamValidator .

type RPCArgBatchInfo

type RPCArgBatchInfo struct {
	MIDs []int64
}

RPCArgBatchInfo .

type RPCArgInfo

type RPCArgInfo struct {
	MID int64
}

RPCArgInfo .

type RPCResInfo

type RPCResInfo struct {
	MID         int64
	BlockStatus BlockStatus
	StartTime   int64
	EndTime     int64
}

RPCResInfo .

func (*RPCResInfo) Parse

func (r *RPCResInfo) Parse(b *BlockInfo)

Parse .

Jump to

Keyboard shortcuts

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