fix: 同步协议文件修改。

main
NorthLan 2 years ago
parent 557686a782
commit 18e676c28d

@ -21,58 +21,6 @@ const (
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
) )
type Platform int32
const (
Platform_bilibili Platform = 0 // B站
Platform_huya Platform = 1 // 虎牙
Platform_douyu Platform = 2 // 斗鱼
Platform_douyin Platform = 3 // 抖音
)
// Enum value maps for Platform.
var (
Platform_name = map[int32]string{
0: "bilibili",
1: "huya",
2: "douyu",
3: "douyin",
}
Platform_value = map[string]int32{
"bilibili": 0,
"huya": 1,
"douyu": 2,
"douyin": 3,
}
)
func (x Platform) Enum() *Platform {
p := new(Platform)
*p = x
return p
}
func (x Platform) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (Platform) Descriptor() protoreflect.EnumDescriptor {
return file_mq_mq_proto_enumTypes[0].Descriptor()
}
func (Platform) Type() protoreflect.EnumType {
return &file_mq_mq_proto_enumTypes[0]
}
func (x Platform) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use Platform.Descriptor instead.
func (Platform) EnumDescriptor() ([]byte, []int) {
return file_mq_mq_proto_rawDescGZIP(), []int{0}
}
type MqNobilityBuy struct { type MqNobilityBuy struct {
state protoimpl.MessageState state protoimpl.MessageState
sizeCache protoimpl.SizeCache sizeCache protoimpl.SizeCache
@ -814,11 +762,8 @@ var file_mq_mq_proto_rawDesc = []byte{
0x0a, 0x06, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x0a, 0x06, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06,
0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e,
0x74, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x74, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74,
0x2a, 0x39, 0x0a, 0x08, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x12, 0x0c, 0x0a, 0x08, 0x42, 0x07, 0x5a, 0x05, 0x2f, 0x70, 0x62, 0x4d, 0x71, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x62, 0x69, 0x6c, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x68, 0x75, 0x33,
0x79, 0x61, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x64, 0x6f, 0x75, 0x79, 0x75, 0x10, 0x02, 0x12,
0x0a, 0x0a, 0x06, 0x64, 0x6f, 0x75, 0x79, 0x69, 0x6e, 0x10, 0x03, 0x42, 0x07, 0x5a, 0x05, 0x2f,
0x70, 0x62, 0x4d, 0x71, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
} }
var ( var (
@ -833,19 +778,17 @@ func file_mq_mq_proto_rawDescGZIP() []byte {
return file_mq_mq_proto_rawDescData return file_mq_mq_proto_rawDescData
} }
var file_mq_mq_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_mq_mq_proto_msgTypes = make([]protoimpl.MessageInfo, 5) var file_mq_mq_proto_msgTypes = make([]protoimpl.MessageInfo, 5)
var file_mq_mq_proto_goTypes = []interface{}{ var file_mq_mq_proto_goTypes = []interface{}{
(Platform)(0), // 0: pb.Platform (*MqNobilityBuy)(nil), // 0: pb.MqNobilityBuy
(*MqNobilityBuy)(nil), // 1: pb.MqNobilityBuy (*MqDanmaku)(nil), // 1: pb.MqDanmaku
(*MqDanmaku)(nil), // 2: pb.MqDanmaku (*MqGift)(nil), // 2: pb.MqGift
(*MqGift)(nil), // 3: pb.MqGift (*MqRewardPool)(nil), // 3: pb.MqRewardPool
(*MqRewardPool)(nil), // 4: pb.MqRewardPool (*MqUserCoinChanged)(nil), // 4: pb.MqUserCoinChanged
(*MqUserCoinChanged)(nil), // 5: pb.MqUserCoinChanged (vars.UserCoinChangedReason)(0), // 5: pb.vars.UserCoinChangedReason
(vars.UserCoinChangedReason)(0), // 6: pb.vars.UserCoinChangedReason
} }
var file_mq_mq_proto_depIdxs = []int32{ var file_mq_mq_proto_depIdxs = []int32{
6, // 0: pb.MqUserCoinChanged.reason:type_name -> pb.vars.UserCoinChangedReason 5, // 0: pb.MqUserCoinChanged.reason:type_name -> pb.vars.UserCoinChangedReason
1, // [1:1] is the sub-list for method output_type 1, // [1:1] is the sub-list for method output_type
1, // [1:1] is the sub-list for method input_type 1, // [1:1] is the sub-list for method input_type
1, // [1:1] is the sub-list for extension type_name 1, // [1:1] is the sub-list for extension type_name
@ -925,14 +868,13 @@ func file_mq_mq_proto_init() {
File: protoimpl.DescBuilder{ File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(), GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_mq_mq_proto_rawDesc, RawDescriptor: file_mq_mq_proto_rawDesc,
NumEnums: 1, NumEnums: 0,
NumMessages: 5, NumMessages: 5,
NumExtensions: 0, NumExtensions: 0,
NumServices: 0, NumServices: 0,
}, },
GoTypes: file_mq_mq_proto_goTypes, GoTypes: file_mq_mq_proto_goTypes,
DependencyIndexes: file_mq_mq_proto_depIdxs, DependencyIndexes: file_mq_mq_proto_depIdxs,
EnumInfos: file_mq_mq_proto_enumTypes,
MessageInfos: file_mq_mq_proto_msgTypes, MessageInfos: file_mq_mq_proto_msgTypes,
}.Build() }.Build()
File_mq_mq_proto = out.File File_mq_mq_proto = out.File

@ -6,13 +6,6 @@ import "vars/vars.proto";
option go_package = "/pbMq"; option go_package = "/pbMq";
enum Platform {
bilibili = 0; // B
huya = 1; //
douyu = 2; //
douyin = 3; //
}
message MqNobilityBuy { message MqNobilityBuy {
string platform = 1; // string platform = 1; //
int64 liveRoomId = 2; // ID int64 liveRoomId = 2; // ID

@ -20,6 +20,58 @@ const (
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
) )
type Platform int32
const (
Platform_Bilibili Platform = 0 // B站
Platform_Huya Platform = 1 // 虎牙
Platform_Douyu Platform = 2 // 斗鱼
Platform_Tiktok Platform = 3 // 抖音
)
// Enum value maps for Platform.
var (
Platform_name = map[int32]string{
0: "Bilibili",
1: "Huya",
2: "Douyu",
3: "Tiktok",
}
Platform_value = map[string]int32{
"Bilibili": 0,
"Huya": 1,
"Douyu": 2,
"Tiktok": 3,
}
)
func (x Platform) Enum() *Platform {
p := new(Platform)
*p = x
return p
}
func (x Platform) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (Platform) Descriptor() protoreflect.EnumDescriptor {
return file_vars_vars_proto_enumTypes[0].Descriptor()
}
func (Platform) Type() protoreflect.EnumType {
return &file_vars_vars_proto_enumTypes[0]
}
func (x Platform) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use Platform.Descriptor instead.
func (Platform) EnumDescriptor() ([]byte, []int) {
return file_vars_vars_proto_rawDescGZIP(), []int{0}
}
type UserCoinChangedReason int32 type UserCoinChangedReason int32
const ( const (
@ -82,11 +134,11 @@ func (x UserCoinChangedReason) String() string {
} }
func (UserCoinChangedReason) Descriptor() protoreflect.EnumDescriptor { func (UserCoinChangedReason) Descriptor() protoreflect.EnumDescriptor {
return file_vars_vars_proto_enumTypes[0].Descriptor() return file_vars_vars_proto_enumTypes[1].Descriptor()
} }
func (UserCoinChangedReason) Type() protoreflect.EnumType { func (UserCoinChangedReason) Type() protoreflect.EnumType {
return &file_vars_vars_proto_enumTypes[0] return &file_vars_vars_proto_enumTypes[1]
} }
func (x UserCoinChangedReason) Number() protoreflect.EnumNumber { func (x UserCoinChangedReason) Number() protoreflect.EnumNumber {
@ -95,7 +147,7 @@ func (x UserCoinChangedReason) Number() protoreflect.EnumNumber {
// Deprecated: Use UserCoinChangedReason.Descriptor instead. // Deprecated: Use UserCoinChangedReason.Descriptor instead.
func (UserCoinChangedReason) EnumDescriptor() ([]byte, []int) { func (UserCoinChangedReason) EnumDescriptor() ([]byte, []int) {
return file_vars_vars_proto_rawDescGZIP(), []int{0} return file_vars_vars_proto_rawDescGZIP(), []int{1}
} }
type Goods int32 type Goods int32
@ -128,11 +180,11 @@ func (x Goods) String() string {
} }
func (Goods) Descriptor() protoreflect.EnumDescriptor { func (Goods) Descriptor() protoreflect.EnumDescriptor {
return file_vars_vars_proto_enumTypes[1].Descriptor() return file_vars_vars_proto_enumTypes[2].Descriptor()
} }
func (Goods) Type() protoreflect.EnumType { func (Goods) Type() protoreflect.EnumType {
return &file_vars_vars_proto_enumTypes[1] return &file_vars_vars_proto_enumTypes[2]
} }
func (x Goods) Number() protoreflect.EnumNumber { func (x Goods) Number() protoreflect.EnumNumber {
@ -141,7 +193,7 @@ func (x Goods) Number() protoreflect.EnumNumber {
// Deprecated: Use Goods.Descriptor instead. // Deprecated: Use Goods.Descriptor instead.
func (Goods) EnumDescriptor() ([]byte, []int) { func (Goods) EnumDescriptor() ([]byte, []int) {
return file_vars_vars_proto_rawDescGZIP(), []int{1} return file_vars_vars_proto_rawDescGZIP(), []int{2}
} }
type RankType int32 type RankType int32
@ -207,11 +259,11 @@ func (x RankType) String() string {
} }
func (RankType) Descriptor() protoreflect.EnumDescriptor { func (RankType) Descriptor() protoreflect.EnumDescriptor {
return file_vars_vars_proto_enumTypes[2].Descriptor() return file_vars_vars_proto_enumTypes[3].Descriptor()
} }
func (RankType) Type() protoreflect.EnumType { func (RankType) Type() protoreflect.EnumType {
return &file_vars_vars_proto_enumTypes[2] return &file_vars_vars_proto_enumTypes[3]
} }
func (x RankType) Number() protoreflect.EnumNumber { func (x RankType) Number() protoreflect.EnumNumber {
@ -220,44 +272,47 @@ func (x RankType) Number() protoreflect.EnumNumber {
// Deprecated: Use RankType.Descriptor instead. // Deprecated: Use RankType.Descriptor instead.
func (RankType) EnumDescriptor() ([]byte, []int) { func (RankType) EnumDescriptor() ([]byte, []int) {
return file_vars_vars_proto_rawDescGZIP(), []int{2} return file_vars_vars_proto_rawDescGZIP(), []int{3}
} }
var File_vars_vars_proto protoreflect.FileDescriptor var File_vars_vars_proto protoreflect.FileDescriptor
var file_vars_vars_proto_rawDesc = []byte{ var file_vars_vars_proto_rawDesc = []byte{
0x0a, 0x0f, 0x76, 0x61, 0x72, 0x73, 0x2f, 0x76, 0x61, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x0a, 0x0f, 0x76, 0x61, 0x72, 0x73, 0x2f, 0x76, 0x61, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x12, 0x07, 0x70, 0x62, 0x2e, 0x76, 0x61, 0x72, 0x73, 0x2a, 0xc8, 0x01, 0x0a, 0x15, 0x55, 0x6f, 0x12, 0x07, 0x70, 0x62, 0x2e, 0x76, 0x61, 0x72, 0x73, 0x2a, 0x39, 0x0a, 0x08, 0x50, 0x6c,
0x73, 0x65, 0x72, 0x43, 0x6f, 0x69, 0x6e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, 0x52, 0x65, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x12, 0x0c, 0x0a, 0x08, 0x42, 0x69, 0x6c, 0x69, 0x62, 0x69,
0x61, 0x73, 0x6f, 0x6e, 0x12, 0x07, 0x0a, 0x03, 0x50, 0x61, 0x79, 0x10, 0x00, 0x12, 0x11, 0x0a, 0x6c, 0x69, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x48, 0x75, 0x79, 0x61, 0x10, 0x01, 0x12, 0x09,
0x0d, 0x42, 0x75, 0x79, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x46, 0x6f, 0x6f, 0x64, 0x10, 0x01, 0x0a, 0x05, 0x44, 0x6f, 0x75, 0x79, 0x75, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x54, 0x69, 0x6b,
0x12, 0x10, 0x0a, 0x0c, 0x42, 0x75, 0x79, 0x45, 0x6c, 0x69, 0x74, 0x65, 0x55, 0x6e, 0x69, 0x74, 0x74, 0x6f, 0x6b, 0x10, 0x03, 0x2a, 0xc8, 0x01, 0x0a, 0x15, 0x55, 0x73, 0x65, 0x72, 0x43, 0x6f,
0x10, 0x02, 0x12, 0x0c, 0x0a, 0x08, 0x42, 0x75, 0x79, 0x54, 0x69, 0x74, 0x6c, 0x65, 0x10, 0x03, 0x69, 0x6e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x12,
0x12, 0x0c, 0x0a, 0x08, 0x53, 0x65, 0x6e, 0x64, 0x47, 0x69, 0x66, 0x74, 0x10, 0x04, 0x12, 0x0f, 0x07, 0x0a, 0x03, 0x50, 0x61, 0x79, 0x10, 0x00, 0x12, 0x11, 0x0a, 0x0d, 0x42, 0x75, 0x79, 0x42,
0x0a, 0x0b, 0x42, 0x75, 0x79, 0x4e, 0x6f, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x10, 0x05, 0x12, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x46, 0x6f, 0x6f, 0x64, 0x10, 0x01, 0x12, 0x10, 0x0a, 0x0c, 0x42,
0x10, 0x0a, 0x0c, 0x44, 0x72, 0x61, 0x77, 0x47, 0x69, 0x66, 0x74, 0x50, 0x61, 0x63, 0x6b, 0x10, 0x75, 0x79, 0x45, 0x6c, 0x69, 0x74, 0x65, 0x55, 0x6e, 0x69, 0x74, 0x10, 0x02, 0x12, 0x0c, 0x0a,
0x0a, 0x12, 0x0b, 0x0a, 0x07, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x49, 0x6e, 0x10, 0x0b, 0x12, 0x13, 0x08, 0x42, 0x75, 0x79, 0x54, 0x69, 0x74, 0x6c, 0x65, 0x10, 0x03, 0x12, 0x0c, 0x0a, 0x08, 0x53,
0x0a, 0x0f, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x61, 0x6e, 0x6b, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x65, 0x6e, 0x64, 0x47, 0x69, 0x66, 0x74, 0x10, 0x04, 0x12, 0x0f, 0x0a, 0x0b, 0x42, 0x75, 0x79,
0x74, 0x10, 0x14, 0x12, 0x12, 0x0a, 0x0e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x42, 0x61, 0x74, 0x74, 0x4e, 0x6f, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x10, 0x05, 0x12, 0x10, 0x0a, 0x0c, 0x44, 0x72,
0x6c, 0x65, 0x45, 0x6e, 0x64, 0x10, 0x15, 0x12, 0x0c, 0x0a, 0x08, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x77, 0x47, 0x69, 0x66, 0x74, 0x50, 0x61, 0x63, 0x6b, 0x10, 0x0a, 0x12, 0x0b, 0x0a, 0x07,
0x66, 0x65, 0x72, 0x10, 0x1e, 0x2a, 0x1d, 0x0a, 0x05, 0x47, 0x6f, 0x6f, 0x64, 0x73, 0x12, 0x09, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x49, 0x6e, 0x10, 0x0b, 0x12, 0x13, 0x0a, 0x0f, 0x45, 0x76, 0x65,
0x0a, 0x05, 0x54, 0x69, 0x74, 0x6c, 0x65, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x45, 0x6c, 0x69, 0x6e, 0x74, 0x52, 0x61, 0x6e, 0x6b, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x10, 0x14, 0x12, 0x12,
0x74, 0x65, 0x10, 0x01, 0x2a, 0xc2, 0x01, 0x0a, 0x08, 0x52, 0x61, 0x6e, 0x6b, 0x54, 0x79, 0x70, 0x0a, 0x0e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x45, 0x6e, 0x64,
0x65, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x10, 0x00, 0x12, 0x0a, 0x10, 0x15, 0x12, 0x0c, 0x0a, 0x08, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x10, 0x1e,
0x0a, 0x06, 0x44, 0x61, 0x6d, 0x61, 0x67, 0x65, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x44, 0x65, 0x2a, 0x1d, 0x0a, 0x05, 0x47, 0x6f, 0x6f, 0x64, 0x73, 0x12, 0x09, 0x0a, 0x05, 0x54, 0x69, 0x74,
0x44, 0x61, 0x6d, 0x61, 0x67, 0x65, 0x10, 0x02, 0x12, 0x0b, 0x0a, 0x07, 0x47, 0x65, 0x6e, 0x65, 0x6c, 0x65, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x45, 0x6c, 0x69, 0x74, 0x65, 0x10, 0x01, 0x2a,
0x72, 0x61, 0x6c, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x44, 0x65, 0x47, 0x65, 0x6e, 0x65, 0x72, 0xc2, 0x01, 0x0a, 0x08, 0x52, 0x61, 0x6e, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07,
0x61, 0x6c, 0x10, 0x04, 0x12, 0x0c, 0x0a, 0x08, 0x4b, 0x69, 0x6c, 0x6c, 0x55, 0x6e, 0x69, 0x74, 0x55, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x44, 0x61, 0x6d,
0x10, 0x05, 0x12, 0x0e, 0x0a, 0x0a, 0x44, 0x65, 0x4b, 0x69, 0x6c, 0x6c, 0x55, 0x6e, 0x69, 0x74, 0x61, 0x67, 0x65, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x44, 0x65, 0x44, 0x61, 0x6d, 0x61, 0x67,
0x10, 0x06, 0x12, 0x0e, 0x0a, 0x0a, 0x4b, 0x69, 0x6c, 0x6c, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x65, 0x10, 0x02, 0x12, 0x0b, 0x0a, 0x07, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x6c, 0x10, 0x03,
0x10, 0x07, 0x12, 0x10, 0x0a, 0x0c, 0x44, 0x65, 0x4b, 0x69, 0x6c, 0x6c, 0x50, 0x6c, 0x61, 0x79, 0x12, 0x0d, 0x0a, 0x09, 0x44, 0x65, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x6c, 0x10, 0x04, 0x12,
0x65, 0x72, 0x10, 0x08, 0x12, 0x07, 0x0a, 0x03, 0x57, 0x69, 0x6e, 0x10, 0x09, 0x12, 0x08, 0x0a, 0x0c, 0x0a, 0x08, 0x4b, 0x69, 0x6c, 0x6c, 0x55, 0x6e, 0x69, 0x74, 0x10, 0x05, 0x12, 0x0e, 0x0a,
0x04, 0x4c, 0x6f, 0x73, 0x74, 0x10, 0x0a, 0x12, 0x0e, 0x0a, 0x0a, 0x46, 0x69, 0x72, 0x73, 0x74, 0x0a, 0x44, 0x65, 0x4b, 0x69, 0x6c, 0x6c, 0x55, 0x6e, 0x69, 0x74, 0x10, 0x06, 0x12, 0x0e, 0x0a,
0x42, 0x6c, 0x6f, 0x6f, 0x64, 0x10, 0x0b, 0x12, 0x10, 0x0a, 0x0c, 0x44, 0x65, 0x46, 0x69, 0x72, 0x0a, 0x4b, 0x69, 0x6c, 0x6c, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x10, 0x07, 0x12, 0x10, 0x0a,
0x73, 0x74, 0x42, 0x6c, 0x6f, 0x6f, 0x64, 0x10, 0x0c, 0x42, 0x21, 0x5a, 0x1f, 0x6c, 0x69, 0x76, 0x0c, 0x44, 0x65, 0x4b, 0x69, 0x6c, 0x6c, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x10, 0x08, 0x12,
0x65, 0x2d, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x61, 0x70, 0x70, 0x2f, 0x70, 0x62, 0x07, 0x0a, 0x03, 0x57, 0x69, 0x6e, 0x10, 0x09, 0x12, 0x08, 0x0a, 0x04, 0x4c, 0x6f, 0x73, 0x74,
0x2f, 0x76, 0x61, 0x72, 0x73, 0x3b, 0x70, 0x62, 0x56, 0x61, 0x72, 0x73, 0x62, 0x06, 0x70, 0x72, 0x10, 0x0a, 0x12, 0x0e, 0x0a, 0x0a, 0x46, 0x69, 0x72, 0x73, 0x74, 0x42, 0x6c, 0x6f, 0x6f, 0x64,
0x6f, 0x74, 0x6f, 0x33, 0x10, 0x0b, 0x12, 0x10, 0x0a, 0x0c, 0x44, 0x65, 0x46, 0x69, 0x72, 0x73, 0x74, 0x42, 0x6c, 0x6f,
0x6f, 0x64, 0x10, 0x0c, 0x42, 0x21, 0x5a, 0x1f, 0x6c, 0x69, 0x76, 0x65, 0x2d, 0x73, 0x65, 0x72,
0x76, 0x69, 0x63, 0x65, 0x2f, 0x61, 0x70, 0x70, 0x2f, 0x70, 0x62, 0x2f, 0x76, 0x61, 0x72, 0x73,
0x3b, 0x70, 0x62, 0x56, 0x61, 0x72, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
} }
var ( var (
@ -272,11 +327,12 @@ func file_vars_vars_proto_rawDescGZIP() []byte {
return file_vars_vars_proto_rawDescData return file_vars_vars_proto_rawDescData
} }
var file_vars_vars_proto_enumTypes = make([]protoimpl.EnumInfo, 3) var file_vars_vars_proto_enumTypes = make([]protoimpl.EnumInfo, 4)
var file_vars_vars_proto_goTypes = []interface{}{ var file_vars_vars_proto_goTypes = []interface{}{
(UserCoinChangedReason)(0), // 0: pb.vars.UserCoinChangedReason (Platform)(0), // 0: pb.vars.Platform
(Goods)(0), // 1: pb.vars.Goods (UserCoinChangedReason)(0), // 1: pb.vars.UserCoinChangedReason
(RankType)(0), // 2: pb.vars.RankType (Goods)(0), // 2: pb.vars.Goods
(RankType)(0), // 3: pb.vars.RankType
} }
var file_vars_vars_proto_depIdxs = []int32{ var file_vars_vars_proto_depIdxs = []int32{
0, // [0:0] is the sub-list for method output_type 0, // [0:0] is the sub-list for method output_type
@ -296,7 +352,7 @@ func file_vars_vars_proto_init() {
File: protoimpl.DescBuilder{ File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(), GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_vars_vars_proto_rawDesc, RawDescriptor: file_vars_vars_proto_rawDesc,
NumEnums: 3, NumEnums: 4,
NumMessages: 0, NumMessages: 0,
NumExtensions: 0, NumExtensions: 0,
NumServices: 0, NumServices: 0,

@ -4,6 +4,13 @@ package pb.vars;
option go_package = "live-service/app/pb/vars;pbVars"; option go_package = "live-service/app/pb/vars;pbVars";
enum Platform {
Bilibili = 0; // B
Huya = 1; //
Douyu = 2; //
Tiktok = 3; //
}
enum UserCoinChangedReason { enum UserCoinChangedReason {
///// /////
Pay = 0; // Pay = 0; //

@ -1,6 +1,6 @@
Name: usercenter.rpc Name: usercenter.rpc
ListenOn: 127.0.0.1:40001 ListenOn: 127.0.0.1:40001
Timeout: 5000 Timeout: 8000
Mode: dev Mode: dev
Etcd: Etcd:
Hosts: Hosts:
@ -29,8 +29,8 @@ UserRetriever:
UpdateDuration: 720 # 720 hours = 30 Day = 1 Month UpdateDuration: 720 # 720 hours = 30 Day = 1 Month
NobilityPlatforms: [ "bilibili" ] # 需要获取贵族的平台列表 NobilityPlatforms: [ "bilibili" ] # 需要获取贵族的平台列表
Cron: Cron:
PlatformUser: "0 0/5 * * * ?" # 每隔5分钟执行一次 PlatformUser: "0 0/1 * * * ?" # 每隔1分钟执行一次
Nobility: "0 0/10 * * * ?" # 每隔10分钟执行一次 Nobility: "0 0/59 * * * ?" # 每隔59分钟执行一次
Bilibili: Bilibili:
RoomId: 6925399 RoomId: 6925399
# Mid: 6704420 # Mid: 6704420

@ -1,6 +1,6 @@
Name: usercenter.rpc Name: usercenter.rpc
ListenOn: 127.0.0.1:10001 ListenOn: 127.0.0.1:10001
Timeout: 5000 Timeout: 8000
Mode: dev Mode: dev
Etcd: Etcd:
Hosts: Hosts:
@ -30,8 +30,8 @@ UserRetriever:
UpdateDuration: 720 # 720 hours = 30 Day = 1 Month UpdateDuration: 720 # 720 hours = 30 Day = 1 Month
NobilityPlatforms: [ "bilibili" ] # 需要获取贵族的平台列表 NobilityPlatforms: [ "bilibili" ] # 需要获取贵族的平台列表
Cron: Cron:
PlatformUser: "0 0/5 * * * ?" # 每隔5分钟执行一次 PlatformUser: "0 0/1 * * * ?" # 每隔1分钟执行一次
Nobility: "0 0/10 * * * ?" # 每隔10分钟执行一次 Nobility: "0 0/59 * * * ?" # 每隔59分钟执行一次
Bilibili: Bilibili:
RoomId: 6925399 RoomId: 6925399
# Mid: 6704420 # Mid: 6704420
@ -97,6 +97,13 @@ Coin:
# 平台免费礼物到弹币的转换 # 平台免费礼物到弹币的转换
FreeToCoin: FreeToCoin:
bilibili: 0.01 # 价值1毛 bilibili: 0.01 # 价值1毛
Grade:
BravePointCost: [0,300,320,350,400,450,500,600,800,1000]
MaxBravePoint: 3000
WinScoreThreshold: 18
MinUserCount: 4
ProtectedGradeThreshold: 2
ProtectedGradeLost: 1
Elite: Elite:
LiveDict: { "1": "0", "2": "1001", "3": "1002" } LiveDict: { "1": "0", "2": "1001", "3": "1002" }
DefaultId: 0 DefaultId: 0
@ -109,6 +116,10 @@ Elite:
Sort: 3 Sort: 3
PriceDay: 60 PriceDay: 60
PriceForever: 18888 PriceForever: 18888
- Id: 1003
Sort: 4
PriceDay: 65
PriceForever: 18888
Title: Title:
LiveDict: { "1": "2000" } LiveDict: { "1": "2000" }
Items: Items:
@ -133,6 +144,9 @@ Title:
- Id: 6 - Id: 6
Name: 群萌新 Name: 群萌新
Type: custom Type: custom
- Id: 7
Name: 白马义从
Type: custom
- Id: 1000 - Id: 1000
Name: 军神 # 名将榜首 Name: 军神 # 名将榜首
Type: grade Type: grade

@ -4,7 +4,7 @@ import (
"context" "context"
"github.com/robfig/cron/v3" "github.com/robfig/cron/v3"
"github.com/zeromicro/go-zero/core/logx" "github.com/zeromicro/go-zero/core/logx"
pbMq "live-service/app/pb/mq" pbVars "live-service/app/pb/vars"
"live-service/app/user_center/rpc/internal/svc" "live-service/app/user_center/rpc/internal/svc"
) )
@ -40,7 +40,7 @@ func InitCollector(svcCtx *svc.ServiceContext) {
svcCtx: svcCtx, svcCtx: svcCtx,
cron: cron.New(cron.WithSeconds()), cron: cron.New(cron.WithSeconds()),
collectorMapper: map[string]CollectorFunc{ collectorMapper: map[string]CollectorFunc{
pbMq.Platform_name[int32(pbMq.Platform_bilibili)]: GiftCollectorBilibili, pbVars.Platform_name[int32(pbVars.Platform_Bilibili)]: GiftCollectorBilibili,
}, },
Logger: logx.WithContext(ctx), Logger: logx.WithContext(ctx),
} }

@ -4,7 +4,7 @@ import (
"context" "context"
"github.com/robfig/cron/v3" "github.com/robfig/cron/v3"
"github.com/zeromicro/go-zero/core/logx" "github.com/zeromicro/go-zero/core/logx"
pbMq "live-service/app/pb/mq" pbVars "live-service/app/pb/vars"
"live-service/app/user_center/model" "live-service/app/user_center/model"
"live-service/app/user_center/rpc/internal/svc" "live-service/app/user_center/rpc/internal/svc"
"strconv" "strconv"
@ -50,10 +50,10 @@ func InitUserRetriever(svcCtx *svc.ServiceContext) {
ctx: ctx, ctx: ctx,
svcCtx: svcCtx, svcCtx: svcCtx,
platformRetrieverMapper: map[string]RetrieveFunc{ platformRetrieverMapper: map[string]RetrieveFunc{
pbMq.Platform_name[int32(pbMq.Platform_bilibili)]: RetrieveBilibili, pbVars.Platform_name[int32(pbVars.Platform_Bilibili)]: RetrieveBilibili,
}, },
nobilityMapper: map[string]NobilityFunc{ nobilityMapper: map[string]NobilityFunc{
pbMq.Platform_name[int32(pbMq.Platform_bilibili)]: NobilityBilibili, pbVars.Platform_name[int32(pbVars.Platform_Bilibili)]: NobilityBilibili,
}, },
Logger: logx.WithContext(ctx), Logger: logx.WithContext(ctx),
} }

Loading…
Cancel
Save