forked from all_user/stat_center
43 lines
745 B
Go
43 lines
745 B
Go
package statg
|
|
|
|
type ServerIndex int32
|
|
|
|
const (
|
|
ServerIndexNone ServerIndex = 0
|
|
ServerIndexMadou ServerIndex = 1
|
|
ServerIndexBili ServerIndex = 2
|
|
ServerIndexZhihu ServerIndex = 3
|
|
ServerIndexXcb ServerIndex = 4
|
|
)
|
|
|
|
func (s ServerIndex) IsMadou() bool {
|
|
return s == ServerIndexMadou
|
|
}
|
|
|
|
func (s ServerIndex) IsBili() bool {
|
|
return s == ServerIndexBili
|
|
}
|
|
|
|
func (s ServerIndex) IsZhihu() bool {
|
|
return s == ServerIndexZhihu
|
|
}
|
|
|
|
func (s ServerIndex) IsXcb() bool {
|
|
return s == ServerIndexXcb
|
|
}
|
|
|
|
func (s ServerIndex) Name() string {
|
|
switch s {
|
|
case ServerIndexMadou:
|
|
return "麻豆"
|
|
case ServerIndexBili:
|
|
return "逼哩"
|
|
case ServerIndexZhihu:
|
|
return "知乎"
|
|
case ServerIndexXcb:
|
|
return "咻车"
|
|
default:
|
|
return "未知"
|
|
}
|
|
}
|