Documentation
¶
Index ¶
- Variables
- func GetCharges(db *sql.DB, roles Roles, sql string, args ...interface{})
- func GetDistribution(db *sql.DB, dists Dists, sql string, args ...interface{})
- func GetLevels(db *sql.DB, levels Levels, sql string, args ...interface{})
- func GetRoles(db *sql.DB, roles Roles, sql string, args ...interface{})
- func GetTotalTimes(db *sql.DB, levels Levels, sql string, args ...interface{})
- func LogRole(stmt *sql.Stmt, r Role)
- func LogUser(stmt *sql.Stmt, r Role)
- func Merge(src, dst interface{}, force bool) error
- func UpdateRole(stmt *sql.Stmt, r Role)
- type Config
- type Context
- type Dist
- type Dists
- type Level
- type Levels
- type Node
- type Option
- type Role
- type Roles
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Queries . Queries map[string]string )
Functions ¶
func GetCharges ¶
GetCharges .
func GetDistribution ¶
GetDistribution .
func GetTotalTimes ¶
GetTotalTimes .
Types ¶
type Config ¶
type Config struct { Opt Option `json:"db_opt"` Hosts map[string]string `json:"hosts"` DBs map[string]Node `json:"dbs"` Node Node // contains filtered or unexported fields }
Config .
type Level ¶
type Level struct { ID string // Level_VIP Level int32 VIP int32 Count int32 CombatMin int32 CombatMax int32 CombatAvg int32 TotalTimeMin int32 TotalTimeMax int32 TotalTimeAvg int32 CreateTime string // 最早创建时间 Scale float32 // 等级分布 }
Level Level.
type Node ¶
type Node struct { Index string Servers [][]int32 `json:"servers"` Host string `json:"host"` StartTimeStr string `json:"start_time"` StartTime time.Time NowTime time.Time Duration time.Duration // contains filtered or unexported fields }
Node .
type Option ¶
type Option struct { User string `json:"user" opt:"user" default:"root"` Password string `json:"password" opt:"password" default:"root"` Host string `json:"host" opt:"host" default:"localhost"` Port int `json:"port" opt:"port" default:"3306"` Name string `json:"name" opt:"name" default:"test"` CharSet string `json:"char_set" opt:"charset" default:"utf8"` }
Option .
type Role ¶
type Role struct { ID int64 `json:"id"` // 角色 ID User string `json:"user"` // 用户名 Name string `json:"name"` // 角色名 Class int32 `json:"class"` // 职业 Server int32 `json:"server"` // 区服 Channel string `json:"channel"` // 渠道 VIP int32 `json:"vip"` // VIP Charge int32 `json:"charge"` // 充值金额 Level int32 `json:"level"` // 等级 Combat int32 `json:"combat"` // 战力 MoneyA int32 `json:"money_a"` // 剩余钻石 MoneyB int32 `json:"money_b"` // 剩余金币 CreateTime int64 `json:"create_time"` // 创建时间 EnterTime int64 `json:"enter_time"` // 最后上线时间 LeaveTime int64 `json:"leave_time"` // 最后下线时间 TotalTime int64 `json:"total_time"` // 累计在线时长 FirstChargeLevel int32 `json:"first_charge_level"` // 首次充值等级 LastChargeLevel int32 `json:"last_charge_level"` // 最后充值等级 FirstChargeTime string `json:"first_charge_time"` // 首次充值时间 LastChargeTime string `json:"last_charge_time"` // 最后充值时间 LogTimes []int32 }
Role .
Click to show internal directories.
Click to hide internal directories.