支持套餐相关操作

This commit is contained in:
刘祥超
2021-11-09 15:36:31 +08:00
parent d92e987f7a
commit a1ac68ccf0
8 changed files with 784 additions and 386 deletions

View File

@@ -650,6 +650,109 @@ func (x *ListEnabledUserPlansResponse) GetUserPlans() []*UserPlan {
return nil
}
// 查找所有服务可用的套餐
type FindAllEnabledUserPlansForServerRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
UserId int64 `protobuf:"varint,1,opt,name=userId,proto3" json:"userId,omitempty"`
ServerId int64 `protobuf:"varint,2,opt,name=serverId,proto3" json:"serverId,omitempty"`
}
func (x *FindAllEnabledUserPlansForServerRequest) Reset() {
*x = FindAllEnabledUserPlansForServerRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_service_user_plan_proto_msgTypes[10]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *FindAllEnabledUserPlansForServerRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*FindAllEnabledUserPlansForServerRequest) ProtoMessage() {}
func (x *FindAllEnabledUserPlansForServerRequest) ProtoReflect() protoreflect.Message {
mi := &file_service_user_plan_proto_msgTypes[10]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use FindAllEnabledUserPlansForServerRequest.ProtoReflect.Descriptor instead.
func (*FindAllEnabledUserPlansForServerRequest) Descriptor() ([]byte, []int) {
return file_service_user_plan_proto_rawDescGZIP(), []int{10}
}
func (x *FindAllEnabledUserPlansForServerRequest) GetUserId() int64 {
if x != nil {
return x.UserId
}
return 0
}
func (x *FindAllEnabledUserPlansForServerRequest) GetServerId() int64 {
if x != nil {
return x.ServerId
}
return 0
}
type FindAllEnabledUserPlansForServerResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
UserPlans []*UserPlan `protobuf:"bytes,1,rep,name=userPlans,proto3" json:"userPlans,omitempty"`
}
func (x *FindAllEnabledUserPlansForServerResponse) Reset() {
*x = FindAllEnabledUserPlansForServerResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_service_user_plan_proto_msgTypes[11]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *FindAllEnabledUserPlansForServerResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*FindAllEnabledUserPlansForServerResponse) ProtoMessage() {}
func (x *FindAllEnabledUserPlansForServerResponse) ProtoReflect() protoreflect.Message {
mi := &file_service_user_plan_proto_msgTypes[11]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use FindAllEnabledUserPlansForServerResponse.ProtoReflect.Descriptor instead.
func (*FindAllEnabledUserPlansForServerResponse) Descriptor() ([]byte, []int) {
return file_service_user_plan_proto_rawDescGZIP(), []int{11}
}
func (x *FindAllEnabledUserPlansForServerResponse) GetUserPlans() []*UserPlan {
if x != nil {
return x.UserPlans
}
return nil
}
var File_service_user_plan_proto protoreflect.FileDescriptor
var file_service_user_plan_proto_rawDesc = []byte{
@@ -726,41 +829,61 @@ var file_service_user_plan_proto_rawDesc = []byte{
0x73, 0x65, 0x72, 0x50, 0x6c, 0x61, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
0x12, 0x2a, 0x0a, 0x09, 0x75, 0x73, 0x65, 0x72, 0x50, 0x6c, 0x61, 0x6e, 0x73, 0x18, 0x01, 0x20,
0x03, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x50, 0x6c, 0x61,
0x6e, 0x52, 0x09, 0x75, 0x73, 0x65, 0x72, 0x50, 0x6c, 0x61, 0x6e, 0x73, 0x32, 0x90, 0x04, 0x0a,
0x0f, 0x55, 0x73, 0x65, 0x72, 0x50, 0x6c, 0x61, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
0x12, 0x3e, 0x0a, 0x0b, 0x62, 0x75, 0x79, 0x55, 0x73, 0x65, 0x72, 0x50, 0x6c, 0x61, 0x6e, 0x12,
0x16, 0x2e, 0x70, 0x62, 0x2e, 0x42, 0x75, 0x79, 0x55, 0x73, 0x65, 0x72, 0x50, 0x6c, 0x61, 0x6e,
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x70, 0x62, 0x2e, 0x42, 0x75, 0x79,
0x55, 0x73, 0x65, 0x72, 0x50, 0x6c, 0x61, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
0x12, 0x39, 0x0a, 0x0d, 0x72, 0x65, 0x6e, 0x65, 0x77, 0x55, 0x73, 0x65, 0x72, 0x50, 0x6c, 0x61,
0x6e, 0x12, 0x18, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x6e, 0x65, 0x77, 0x55, 0x73, 0x65, 0x72,
0x50, 0x6c, 0x61, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x70, 0x62,
0x2e, 0x52, 0x50, 0x43, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x56, 0x0a, 0x13, 0x66,
0x6e, 0x52, 0x09, 0x75, 0x73, 0x65, 0x72, 0x50, 0x6c, 0x61, 0x6e, 0x73, 0x22, 0x5d, 0x0a, 0x27,
0x46, 0x69, 0x6e, 0x64, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x55, 0x73,
0x65, 0x72, 0x50, 0x6c, 0x61, 0x6e, 0x73, 0x46, 0x6f, 0x72, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72,
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49,
0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12,
0x1a, 0x0a, 0x08, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28,
0x03, 0x52, 0x08, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x49, 0x64, 0x22, 0x56, 0x0a, 0x28, 0x46,
0x69, 0x6e, 0x64, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x55, 0x73, 0x65,
0x72, 0x50, 0x6c, 0x61, 0x6e, 0x73, 0x46, 0x6f, 0x72, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52,
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2a, 0x0a, 0x09, 0x75, 0x73, 0x65, 0x72, 0x50,
0x6c, 0x61, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x70, 0x62, 0x2e,
0x55, 0x73, 0x65, 0x72, 0x50, 0x6c, 0x61, 0x6e, 0x52, 0x09, 0x75, 0x73, 0x65, 0x72, 0x50, 0x6c,
0x61, 0x6e, 0x73, 0x32, 0x8f, 0x05, 0x0a, 0x0f, 0x55, 0x73, 0x65, 0x72, 0x50, 0x6c, 0x61, 0x6e,
0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x3e, 0x0a, 0x0b, 0x62, 0x75, 0x79, 0x55, 0x73,
0x65, 0x72, 0x50, 0x6c, 0x61, 0x6e, 0x12, 0x16, 0x2e, 0x70, 0x62, 0x2e, 0x42, 0x75, 0x79, 0x55,
0x73, 0x65, 0x72, 0x50, 0x6c, 0x61, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17,
0x2e, 0x70, 0x62, 0x2e, 0x42, 0x75, 0x79, 0x55, 0x73, 0x65, 0x72, 0x50, 0x6c, 0x61, 0x6e, 0x52,
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x39, 0x0a, 0x0d, 0x72, 0x65, 0x6e, 0x65, 0x77,
0x55, 0x73, 0x65, 0x72, 0x50, 0x6c, 0x61, 0x6e, 0x12, 0x18, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x65,
0x6e, 0x65, 0x77, 0x55, 0x73, 0x65, 0x72, 0x50, 0x6c, 0x61, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65,
0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x50, 0x43, 0x53, 0x75, 0x63, 0x63, 0x65,
0x73, 0x73, 0x12, 0x56, 0x0a, 0x13, 0x66, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65,
0x64, 0x55, 0x73, 0x65, 0x72, 0x50, 0x6c, 0x61, 0x6e, 0x12, 0x1e, 0x2e, 0x70, 0x62, 0x2e, 0x46,
0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x55, 0x73, 0x65, 0x72, 0x50, 0x6c,
0x61, 0x6e, 0x12, 0x1e, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62,
0x6c, 0x65, 0x64, 0x55, 0x73, 0x65, 0x72, 0x50, 0x6c, 0x61, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65,
0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62,
0x6c, 0x65, 0x64, 0x55, 0x73, 0x65, 0x72, 0x50, 0x6c, 0x61, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f,
0x6e, 0x73, 0x65, 0x12, 0x3b, 0x0a, 0x0e, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65,
0x72, 0x50, 0x6c, 0x61, 0x6e, 0x12, 0x19, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74,
0x65, 0x55, 0x73, 0x65, 0x72, 0x50, 0x6c, 0x61, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
0x1a, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x50, 0x43, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73,
0x12, 0x3b, 0x0a, 0x0e, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x50, 0x6c,
0x61, 0x6e, 0x12, 0x19, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x55, 0x73,
0x65, 0x72, 0x50, 0x6c, 0x61, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e,
0x70, 0x62, 0x2e, 0x52, 0x50, 0x43, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x55, 0x0a,
0x18, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64,
0x55, 0x73, 0x65, 0x72, 0x50, 0x6c, 0x61, 0x6e, 0x73, 0x12, 0x23, 0x2e, 0x70, 0x62, 0x2e, 0x43,
0x6f, 0x75, 0x6e, 0x74, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x55, 0x73,
0x65, 0x72, 0x50, 0x6c, 0x61, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14,
0x2e, 0x70, 0x62, 0x2e, 0x52, 0x50, 0x43, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70,
0x6f, 0x6e, 0x73, 0x65, 0x12, 0x59, 0x0a, 0x14, 0x6c, 0x69, 0x73, 0x74, 0x45, 0x6e, 0x61, 0x62,
0x6c, 0x65, 0x64, 0x55, 0x73, 0x65, 0x72, 0x50, 0x6c, 0x61, 0x6e, 0x73, 0x12, 0x1f, 0x2e, 0x70,
0x62, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x55, 0x73, 0x65,
0x72, 0x50, 0x6c, 0x61, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e,
0x70, 0x62, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x55, 0x73,
0x65, 0x72, 0x50, 0x6c, 0x61, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42,
0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
0x61, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x70, 0x62, 0x2e, 0x46,
0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x55, 0x73, 0x65, 0x72, 0x50, 0x6c,
0x61, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3b, 0x0a, 0x0e, 0x75, 0x70,
0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x50, 0x6c, 0x61, 0x6e, 0x12, 0x19, 0x2e, 0x70,
0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x50, 0x6c, 0x61, 0x6e,
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x50, 0x43,
0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x3b, 0x0a, 0x0e, 0x64, 0x65, 0x6c, 0x65, 0x74,
0x65, 0x55, 0x73, 0x65, 0x72, 0x50, 0x6c, 0x61, 0x6e, 0x12, 0x19, 0x2e, 0x70, 0x62, 0x2e, 0x44,
0x65, 0x6c, 0x65, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x50, 0x6c, 0x61, 0x6e, 0x52, 0x65, 0x71,
0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x50, 0x43, 0x53, 0x75, 0x63,
0x63, 0x65, 0x73, 0x73, 0x12, 0x55, 0x0a, 0x18, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x6c, 0x6c,
0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x55, 0x73, 0x65, 0x72, 0x50, 0x6c, 0x61, 0x6e, 0x73,
0x12, 0x23, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x6c, 0x6c, 0x45, 0x6e,
0x61, 0x62, 0x6c, 0x65, 0x64, 0x55, 0x73, 0x65, 0x72, 0x50, 0x6c, 0x61, 0x6e, 0x73, 0x52, 0x65,
0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x50, 0x43, 0x43, 0x6f,
0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x59, 0x0a, 0x14, 0x6c,
0x69, 0x73, 0x74, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x55, 0x73, 0x65, 0x72, 0x50, 0x6c,
0x61, 0x6e, 0x73, 0x12, 0x1f, 0x2e, 0x70, 0x62, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x6e, 0x61,
0x62, 0x6c, 0x65, 0x64, 0x55, 0x73, 0x65, 0x72, 0x50, 0x6c, 0x61, 0x6e, 0x73, 0x52, 0x65, 0x71,
0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x70, 0x62, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x6e,
0x61, 0x62, 0x6c, 0x65, 0x64, 0x55, 0x73, 0x65, 0x72, 0x50, 0x6c, 0x61, 0x6e, 0x73, 0x52, 0x65,
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x7d, 0x0a, 0x20, 0x66, 0x69, 0x6e, 0x64, 0x41, 0x6c,
0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x55, 0x73, 0x65, 0x72, 0x50, 0x6c, 0x61, 0x6e,
0x73, 0x46, 0x6f, 0x72, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x12, 0x2b, 0x2e, 0x70, 0x62, 0x2e,
0x46, 0x69, 0x6e, 0x64, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x55, 0x73,
0x65, 0x72, 0x50, 0x6c, 0x61, 0x6e, 0x73, 0x46, 0x6f, 0x72, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72,
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e,
0x64, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x55, 0x73, 0x65, 0x72, 0x50,
0x6c, 0x61, 0x6e, 0x73, 0x46, 0x6f, 0x72, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, 0x65, 0x73,
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
@@ -775,44 +898,49 @@ func file_service_user_plan_proto_rawDescGZIP() []byte {
return file_service_user_plan_proto_rawDescData
}
var file_service_user_plan_proto_msgTypes = make([]protoimpl.MessageInfo, 10)
var file_service_user_plan_proto_msgTypes = make([]protoimpl.MessageInfo, 12)
var file_service_user_plan_proto_goTypes = []interface{}{
(*BuyUserPlanRequest)(nil), // 0: pb.BuyUserPlanRequest
(*BuyUserPlanResponse)(nil), // 1: pb.BuyUserPlanResponse
(*RenewUserPlanRequest)(nil), // 2: pb.RenewUserPlanRequest
(*FindEnabledUserPlanRequest)(nil), // 3: pb.FindEnabledUserPlanRequest
(*FindEnabledUserPlanResponse)(nil), // 4: pb.FindEnabledUserPlanResponse
(*UpdateUserPlanRequest)(nil), // 5: pb.UpdateUserPlanRequest
(*DeleteUserPlanRequest)(nil), // 6: pb.DeleteUserPlanRequest
(*CountAllEnabledUserPlansRequest)(nil), // 7: pb.CountAllEnabledUserPlansRequest
(*ListEnabledUserPlansRequest)(nil), // 8: pb.ListEnabledUserPlansRequest
(*ListEnabledUserPlansResponse)(nil), // 9: pb.ListEnabledUserPlansResponse
(*UserPlan)(nil), // 10: pb.UserPlan
(*RPCSuccess)(nil), // 11: pb.RPCSuccess
(*RPCCountResponse)(nil), // 12: pb.RPCCountResponse
(*BuyUserPlanRequest)(nil), // 0: pb.BuyUserPlanRequest
(*BuyUserPlanResponse)(nil), // 1: pb.BuyUserPlanResponse
(*RenewUserPlanRequest)(nil), // 2: pb.RenewUserPlanRequest
(*FindEnabledUserPlanRequest)(nil), // 3: pb.FindEnabledUserPlanRequest
(*FindEnabledUserPlanResponse)(nil), // 4: pb.FindEnabledUserPlanResponse
(*UpdateUserPlanRequest)(nil), // 5: pb.UpdateUserPlanRequest
(*DeleteUserPlanRequest)(nil), // 6: pb.DeleteUserPlanRequest
(*CountAllEnabledUserPlansRequest)(nil), // 7: pb.CountAllEnabledUserPlansRequest
(*ListEnabledUserPlansRequest)(nil), // 8: pb.ListEnabledUserPlansRequest
(*ListEnabledUserPlansResponse)(nil), // 9: pb.ListEnabledUserPlansResponse
(*FindAllEnabledUserPlansForServerRequest)(nil), // 10: pb.FindAllEnabledUserPlansForServerRequest
(*FindAllEnabledUserPlansForServerResponse)(nil), // 11: pb.FindAllEnabledUserPlansForServerResponse
(*UserPlan)(nil), // 12: pb.UserPlan
(*RPCSuccess)(nil), // 13: pb.RPCSuccess
(*RPCCountResponse)(nil), // 14: pb.RPCCountResponse
}
var file_service_user_plan_proto_depIdxs = []int32{
10, // 0: pb.FindEnabledUserPlanResponse.userPlan:type_name -> pb.UserPlan
10, // 1: pb.ListEnabledUserPlansResponse.userPlans:type_name -> pb.UserPlan
0, // 2: pb.UserPlanService.buyUserPlan:input_type -> pb.BuyUserPlanRequest
2, // 3: pb.UserPlanService.renewUserPlan:input_type -> pb.RenewUserPlanRequest
3, // 4: pb.UserPlanService.findEnabledUserPlan:input_type -> pb.FindEnabledUserPlanRequest
5, // 5: pb.UserPlanService.updateUserPlan:input_type -> pb.UpdateUserPlanRequest
6, // 6: pb.UserPlanService.deleteUserPlan:input_type -> pb.DeleteUserPlanRequest
7, // 7: pb.UserPlanService.countAllEnabledUserPlans:input_type -> pb.CountAllEnabledUserPlansRequest
8, // 8: pb.UserPlanService.listEnabledUserPlans:input_type -> pb.ListEnabledUserPlansRequest
1, // 9: pb.UserPlanService.buyUserPlan:output_type -> pb.BuyUserPlanResponse
11, // 10: pb.UserPlanService.renewUserPlan:output_type -> pb.RPCSuccess
4, // 11: pb.UserPlanService.findEnabledUserPlan:output_type -> pb.FindEnabledUserPlanResponse
11, // 12: pb.UserPlanService.updateUserPlan:output_type -> pb.RPCSuccess
11, // 13: pb.UserPlanService.deleteUserPlan:output_type -> pb.RPCSuccess
12, // 14: pb.UserPlanService.countAllEnabledUserPlans:output_type -> pb.RPCCountResponse
9, // 15: pb.UserPlanService.listEnabledUserPlans:output_type -> pb.ListEnabledUserPlansResponse
9, // [9:16] is the sub-list for method output_type
2, // [2:9] is the sub-list for method input_type
2, // [2:2] is the sub-list for extension type_name
2, // [2:2] is the sub-list for extension extendee
0, // [0:2] is the sub-list for field type_name
12, // 0: pb.FindEnabledUserPlanResponse.userPlan:type_name -> pb.UserPlan
12, // 1: pb.ListEnabledUserPlansResponse.userPlans:type_name -> pb.UserPlan
12, // 2: pb.FindAllEnabledUserPlansForServerResponse.userPlans:type_name -> pb.UserPlan
0, // 3: pb.UserPlanService.buyUserPlan:input_type -> pb.BuyUserPlanRequest
2, // 4: pb.UserPlanService.renewUserPlan:input_type -> pb.RenewUserPlanRequest
3, // 5: pb.UserPlanService.findEnabledUserPlan:input_type -> pb.FindEnabledUserPlanRequest
5, // 6: pb.UserPlanService.updateUserPlan:input_type -> pb.UpdateUserPlanRequest
6, // 7: pb.UserPlanService.deleteUserPlan:input_type -> pb.DeleteUserPlanRequest
7, // 8: pb.UserPlanService.countAllEnabledUserPlans:input_type -> pb.CountAllEnabledUserPlansRequest
8, // 9: pb.UserPlanService.listEnabledUserPlans:input_type -> pb.ListEnabledUserPlansRequest
10, // 10: pb.UserPlanService.findAllEnabledUserPlansForServer:input_type -> pb.FindAllEnabledUserPlansForServerRequest
1, // 11: pb.UserPlanService.buyUserPlan:output_type -> pb.BuyUserPlanResponse
13, // 12: pb.UserPlanService.renewUserPlan:output_type -> pb.RPCSuccess
4, // 13: pb.UserPlanService.findEnabledUserPlan:output_type -> pb.FindEnabledUserPlanResponse
13, // 14: pb.UserPlanService.updateUserPlan:output_type -> pb.RPCSuccess
13, // 15: pb.UserPlanService.deleteUserPlan:output_type -> pb.RPCSuccess
14, // 16: pb.UserPlanService.countAllEnabledUserPlans:output_type -> pb.RPCCountResponse
9, // 17: pb.UserPlanService.listEnabledUserPlans:output_type -> pb.ListEnabledUserPlansResponse
11, // 18: pb.UserPlanService.findAllEnabledUserPlansForServer:output_type -> pb.FindAllEnabledUserPlansForServerResponse
11, // [11:19] is the sub-list for method output_type
3, // [3:11] is the sub-list for method input_type
3, // [3:3] is the sub-list for extension type_name
3, // [3:3] is the sub-list for extension extendee
0, // [0:3] is the sub-list for field type_name
}
func init() { file_service_user_plan_proto_init() }
@@ -943,6 +1071,30 @@ func file_service_user_plan_proto_init() {
return nil
}
}
file_service_user_plan_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*FindAllEnabledUserPlansForServerRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_service_user_plan_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*FindAllEnabledUserPlansForServerResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
@@ -950,7 +1102,7 @@ func file_service_user_plan_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_service_user_plan_proto_rawDesc,
NumEnums: 0,
NumMessages: 10,
NumMessages: 12,
NumExtensions: 0,
NumServices: 1,
},
@@ -990,6 +1142,8 @@ type UserPlanServiceClient interface {
CountAllEnabledUserPlans(ctx context.Context, in *CountAllEnabledUserPlansRequest, opts ...grpc.CallOption) (*RPCCountResponse, error)
// 列出单页已购套餐
ListEnabledUserPlans(ctx context.Context, in *ListEnabledUserPlansRequest, opts ...grpc.CallOption) (*ListEnabledUserPlansResponse, error)
// 查找所有服务可用的套餐
FindAllEnabledUserPlansForServer(ctx context.Context, in *FindAllEnabledUserPlansForServerRequest, opts ...grpc.CallOption) (*FindAllEnabledUserPlansForServerResponse, error)
}
type userPlanServiceClient struct {
@@ -1063,6 +1217,15 @@ func (c *userPlanServiceClient) ListEnabledUserPlans(ctx context.Context, in *Li
return out, nil
}
func (c *userPlanServiceClient) FindAllEnabledUserPlansForServer(ctx context.Context, in *FindAllEnabledUserPlansForServerRequest, opts ...grpc.CallOption) (*FindAllEnabledUserPlansForServerResponse, error) {
out := new(FindAllEnabledUserPlansForServerResponse)
err := c.cc.Invoke(ctx, "/pb.UserPlanService/findAllEnabledUserPlansForServer", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// UserPlanServiceServer is the server API for UserPlanService service.
type UserPlanServiceServer interface {
// 购买套餐
@@ -1079,6 +1242,8 @@ type UserPlanServiceServer interface {
CountAllEnabledUserPlans(context.Context, *CountAllEnabledUserPlansRequest) (*RPCCountResponse, error)
// 列出单页已购套餐
ListEnabledUserPlans(context.Context, *ListEnabledUserPlansRequest) (*ListEnabledUserPlansResponse, error)
// 查找所有服务可用的套餐
FindAllEnabledUserPlansForServer(context.Context, *FindAllEnabledUserPlansForServerRequest) (*FindAllEnabledUserPlansForServerResponse, error)
}
// UnimplementedUserPlanServiceServer can be embedded to have forward compatible implementations.
@@ -1106,6 +1271,9 @@ func (*UnimplementedUserPlanServiceServer) CountAllEnabledUserPlans(context.Cont
func (*UnimplementedUserPlanServiceServer) ListEnabledUserPlans(context.Context, *ListEnabledUserPlansRequest) (*ListEnabledUserPlansResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ListEnabledUserPlans not implemented")
}
func (*UnimplementedUserPlanServiceServer) FindAllEnabledUserPlansForServer(context.Context, *FindAllEnabledUserPlansForServerRequest) (*FindAllEnabledUserPlansForServerResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method FindAllEnabledUserPlansForServer not implemented")
}
func RegisterUserPlanServiceServer(s *grpc.Server, srv UserPlanServiceServer) {
s.RegisterService(&_UserPlanService_serviceDesc, srv)
@@ -1237,6 +1405,24 @@ func _UserPlanService_ListEnabledUserPlans_Handler(srv interface{}, ctx context.
return interceptor(ctx, in, info, handler)
}
func _UserPlanService_FindAllEnabledUserPlansForServer_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(FindAllEnabledUserPlansForServerRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(UserPlanServiceServer).FindAllEnabledUserPlansForServer(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/pb.UserPlanService/FindAllEnabledUserPlansForServer",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(UserPlanServiceServer).FindAllEnabledUserPlansForServer(ctx, req.(*FindAllEnabledUserPlansForServerRequest))
}
return interceptor(ctx, in, info, handler)
}
var _UserPlanService_serviceDesc = grpc.ServiceDesc{
ServiceName: "pb.UserPlanService",
HandlerType: (*UserPlanServiceServer)(nil),
@@ -1269,6 +1455,10 @@ var _UserPlanService_serviceDesc = grpc.ServiceDesc{
MethodName: "listEnabledUserPlans",
Handler: _UserPlanService_ListEnabledUserPlans_Handler,
},
{
MethodName: "findAllEnabledUserPlansForServer",
Handler: _UserPlanService_FindAllEnabledUserPlansForServer_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "service_user_plan.proto",