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

config properties.

View Source
const (
	//BlockReasonSize block reason size
	BlockReasonSize = 4
	//BlockLockKey cycle block
	BlockLockKey = "cycleblock"
	//VipEnableStatus enable status
	VipEnableStatus int32 = 1
	//VipNonType non vip
	VipNonType int32 = 0
	// ReliveCheckTimes relive check times
	ReliveCheckTimes = 1
	// DoubleCheckRemake double check remake
	DoubleCheckRemake = "导入二次验证,恢复行为得分"
	// RetryTimes retry times
	RetryTimes = 3
	// SpyInitScore spy init score
	SpyInitScore = 100
)
View Source
const (
	//CoinReason coin reason ref update score
	CoinReason = "coin-service"

	//CoinHighRisk coin high risk
	CoinHighRisk = 7
)
View Source
const (
	Nomal int8 = iota
	LevelOne
	LevelTwo
	LevelThree
	LevelFour
)

Tel level .

View Source
const (
	TelExpireMonth = 3
	QcloudType     = 1
)

Tel Expire

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

Reg Pro args.

View Source
const (
	//PunishmentTypeBlock 封禁
	PunishmentTypeBlock = 1
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ArgHandleEvent

type ArgHandleEvent struct {
	Time      time.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"`
}

ArgHandleEvent rpc arg for handling spy event.

type ArgReBuild

type ArgReBuild struct {
	Mid    int64
	Reason string
}

ArgReBuild rebuild args

type ArgReset

type ArgReset struct {
	Mid        int64
	ReLiveTime bool
	EventScore bool
	BaseScore  bool
	Operator   string
}

ArgReset is.

type ArgStat

type ArgStat struct {
	ID  int64
	Mid int64
}

ArgStat rpc arg for getting user stat.

type ArgUser

type ArgUser struct {
	Mid int64
	IP  string
}

ArgUser rpc arg for getting user info.

type ArgUserScore

type ArgUserScore struct {
	Mid int64
	IP  string
}

ArgUserScore rpc arg for getting user score.

type AuditInfo

type AuditInfo struct {
	Mid      int64 `json:"mid"`
	BindTel  bool  `json:"bind_tel"`
	BindMail bool  `json:"bind_mail"`
	Rank     int64 `json:"rank"`
	SpaceSta int64 `json:"spacesta"`
}

AuditInfo is.

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      time.Time   `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 def.

type Factor

type Factor struct {
	ID        int64
	NickName  string //风险因子名字
	ServiceID int64
	EventID   int64
	GroupID   int64
	RiskLevel int8    //风险等级:1-9
	FactorVal float64 //风险得分
	CTime     time.Time
	MTime     time.Time
}

Factor def.

type FactorGroup

type FactorGroup struct {
	ID    int64
	Name  string //风险因子组名
	CTime time.Time
}

FactorGroup is.

type NotifyInfo

type NotifyInfo struct {
	Mid    int64  `json:"mid"`
	Action string `json:"action"`
}

NotifyInfo notify.

type ProfileInfo

type ProfileInfo = accmdl.Profile

ProfileInfo profile info.

type Punishment

type Punishment struct {
	ID     int64
	Mid    int64
	Type   int8   //封禁原因
	Reason string //惩罚原因
	CTime  time.Time
	MTime  time.Time
}

Punishment def.

type QcloudRegProResp

type QcloudRegProResp struct {
	Code     int    `json:"code"`
	CodeDesc string `json:"codeDesc"`
	Message  string `json:"message"`
	Level    int8   `json:"level"`
}

QcloudRegProResp def.

type ScoreChange

type ScoreChange struct {
	Mid        int64  `json:"mid"`
	Score      int8   `json:"score"`
	BaseScore  int8   `json:"base_score"`
	EventScore int8   `json:"event_score"`
	TS         int64  `json:"ts"`
	Reason     string `json:"reason"`
	RiskLevel  int8   `json:"risk_level"`
}

ScoreChange DataBus spy score change.

type Service

type Service struct {
	ID       int64
	Name     string //服务标识
	NickName string //服务可读昵称
	Status   int8
	CTime    time.Time
	MTime    time.Time
}

Service def.

type Statistics

type Statistics struct {
	Quantity  int64  `json:"quantity"`
	EventID   int64  `json:"event_id"`
	EventName string `json:"event_name"`
}

Statistics def.

type TelInfo

type TelInfo struct {
	Mid      int64  `json:"mid"`
	Tel      string `json:"tel"`
	JoinIP   string `json:"join_ip"`
	JoinTime int64  `json:"join_time"`
}

TelInfo def.

type TelRiskInfo

type TelRiskInfo struct {
	TelRiskLevel    int8
	RestoreHistory  *UserEventHistory
	UnicomGiftState int
}

TelRiskInfo tel risk info.

type TelRiskLevel

type TelRiskLevel struct {
	ID     int64     `json:"id"`
	Mid    int64     `json:"mid"`
	Level  int8      `json:"level"`
	Origin int8      `json:"origin"`
	Ctime  time.Time `json:"ctime"`
	Mtime  time.Time `json:"mtime"`
}

TelRiskLevel def.

type UnicomGiftState

type UnicomGiftState struct {
	State int `json:"state"`
}

UnicomGiftState unicom gift state.

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"`        //状态 : 正常/封禁
	ReliveTimes int8      `json:"relive_times"` //画像得分恢复次数
	CTime       time.Time `json:"ctime"`
	MTime       time.Time `json:"mtime"`
}

UserInfo def.

type UserScore

type UserScore struct {
	Mid   int64 `json:"mid"`
	Score int8  `json:"score"`
}

UserScore rpc return for getting user score.

Jump to

Keyboard shortcuts

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