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 (
	LimitBlockCount = "limitBlockCount"
	LessBlockScore  = "lessBlockScore"
	AutoBlock       = "autoBlock"
	AutoBlockOpen   = 1
)

config properties.

View Source
const (
	//PunishmentTypeBlock 封禁
	PunishmentTypeBlock = 1
	//BlockReasonSize block reason size
	BlockReasonSize = 3
	//BlockLockKey cycle block
	BlockLockKey = "cycleblock"
	//ReportJobKey report job
	ReportJobKey = "reportjob"
	//DefLockTime def.
	DefLockTime int64 = 60
)
View Source
const (
	//BlockCount block count
	BlockCount = "封禁总数"
	// SecurityLoginCount security login count
	SecurityLoginCount = "二次验证总数"
)
View Source
const (
	// IncreaseStat increase spy stat.
	IncreaseStat int8 = 1
	// ResetStat reset spy stat.
	ResetStat int8 = 2

	// WaiteCheck waite for check.
	WaiteCheck = 0
)
View Source
const (
	ArchiveType  int8 = 1
	ActivityType int8 = 2
)

type def.

View Source
const (
	// StateNormal UserInfo 正常状态
	StateNormal = 0
	// StateBlock UserInfo 封禁状态
	StateBlock = 1
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Active

type Active struct {
	Mid     int64
	Active  int64
	Watched int64
}

type Config

type Config struct {
	ID       int64
	Property string
	Name     string
	Val      string
	Ctime    time.Time
}

Config def.

type Event

type Event struct {
	ID        int64
	Name      string // 事件标示
	NickName  string // 事件可读昵称
	ServiceID int64
	Status    int8 // 0:删除 1:未删除
	Ctime     time.Time
	Mtime     time.Time
}

Event def.

type EventMessage

type EventMessage struct {
	Time      string      `json:"time"`
	IP        string      `json:"ip"`
	Service   string      `json:"service"`
	Event     string      `json:"event"`
	ActiveMid int64       `json:"active_mid"`
	TargetMid int64       `json:"target_mid"`
	TargetID  int64       `json:"target_id"`
	Args      interface{} `json:"args"`
	Result    string      `json:"result"`
	Effect    string      `json:"effect"`
	RiskLevel int8        `json:"risk_level"`
}

EventMessage event from bigdata.

type Report

type Report struct {
	ID          int64
	Name        string
	DateVersion string
	Val         int64
	Ctime       time.Time
}

Report etc.

type SpyLog

type SpyLog struct {
	ID        int64     `json:"id"`
	TargetMid int64     `json:"target_mid"`
	Ctime     time.Time `json:"ctime"`
	Mtime     time.Time `json:"mtime"`
}

SpyLog def.

type SpyStatMessage

type SpyStatMessage struct {
	TargetMid int64  `json:"target_mid"`
	TargetID  int64  `json:"target_id"`
	Type      int8   `json:"type"`
	Quantity  int64  `json:"quantity"`
	Time      int64  `json:"time"`
	EventName string `json:"event_name"`
	UUID      string `json:"uuid"`
}

SpyStatMessage sin stat message.

type Statistics

type Statistics struct {
	ID        int64     `json:"id"`
	TargetMid int64     `json:"target_mid"`
	TargetID  int64     `json:"target_id"`
	EventID   int64     `json:"event_id"`
	State     int8      `json:"state"`
	Type      int8      `json:"type"`
	Quantity  int64     `json:"quantity"`
	Ctime     time.Time `json:"ctime"`
	Mtime     time.Time `json:"mtime"`
}

Statistics def.

type UserEventHistory

type UserEventHistory struct {
	ID         int64
	Mid        int64
	EventID    int64
	Score      int8
	BaseScore  int8
	EventScore int8
	Remark     string
	Reason     string // 事件原因 == eventmsg.Effect
	FactorVal  float64
	CTime      time.Time
}

UserEventHistory history of user event def.

type UserInfo

type UserInfo struct {
	ID         int64     `json:"id"`
	Mid        int64     `json:"mid"`
	Score      int8      `json:"score"`       //真实得分
	BaseScore  int8      `json:"base_score"`  //基础信息得分
	EventScore int8      `json:"event_score"` //事件得分
	State      int8      `json:"state"`       //状态 : 正常/封禁
	CTime      time.Time `json:"ctime"`
	MTime      time.Time `json:"mtime"`
}

UserInfo def.

Jump to

Keyboard shortcuts

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