This commit is contained in:
548
pkg/pb/user/user.pb.go
Normal file
548
pkg/pb/user/user.pb.go
Normal file
@@ -0,0 +1,548 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.36.6
|
||||
// protoc v5.29.3
|
||||
// source: user/user.proto
|
||||
|
||||
package user
|
||||
|
||||
import (
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
unsafe "unsafe"
|
||||
)
|
||||
|
||||
const (
|
||||
// Verify that this generated code is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
type GetInfoRequest struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
UserId int64 `protobuf:"varint,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *GetInfoRequest) Reset() {
|
||||
*x = GetInfoRequest{}
|
||||
mi := &file_user_user_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *GetInfoRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*GetInfoRequest) ProtoMessage() {}
|
||||
|
||||
func (x *GetInfoRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_user_user_proto_msgTypes[0]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use GetInfoRequest.ProtoReflect.Descriptor instead.
|
||||
func (*GetInfoRequest) Descriptor() ([]byte, []int) {
|
||||
return file_user_user_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *GetInfoRequest) GetUserId() int64 {
|
||||
if x != nil {
|
||||
return x.UserId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type GetInfoResponse struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Email string `protobuf:"bytes,1,opt,name=email,proto3" json:"email,omitempty"`
|
||||
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
|
||||
Phone string `protobuf:"bytes,3,opt,name=phone,proto3" json:"phone,omitempty"`
|
||||
CompanyName string `protobuf:"bytes,4,opt,name=company_name,json=companyName,proto3" json:"company_name,omitempty"`
|
||||
PaymentStatus string `protobuf:"bytes,5,opt,name=payment_status,json=paymentStatus,proto3" json:"payment_status,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *GetInfoResponse) Reset() {
|
||||
*x = GetInfoResponse{}
|
||||
mi := &file_user_user_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *GetInfoResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*GetInfoResponse) ProtoMessage() {}
|
||||
|
||||
func (x *GetInfoResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_user_user_proto_msgTypes[1]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use GetInfoResponse.ProtoReflect.Descriptor instead.
|
||||
func (*GetInfoResponse) Descriptor() ([]byte, []int) {
|
||||
return file_user_user_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (x *GetInfoResponse) GetEmail() string {
|
||||
if x != nil {
|
||||
return x.Email
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *GetInfoResponse) GetName() string {
|
||||
if x != nil {
|
||||
return x.Name
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *GetInfoResponse) GetPhone() string {
|
||||
if x != nil {
|
||||
return x.Phone
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *GetInfoResponse) GetCompanyName() string {
|
||||
if x != nil {
|
||||
return x.CompanyName
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *GetInfoResponse) GetPaymentStatus() string {
|
||||
if x != nil {
|
||||
return x.PaymentStatus
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type GetBalanceRequest struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
UserId int64 `protobuf:"varint,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *GetBalanceRequest) Reset() {
|
||||
*x = GetBalanceRequest{}
|
||||
mi := &file_user_user_proto_msgTypes[2]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *GetBalanceRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*GetBalanceRequest) ProtoMessage() {}
|
||||
|
||||
func (x *GetBalanceRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_user_user_proto_msgTypes[2]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use GetBalanceRequest.ProtoReflect.Descriptor instead.
|
||||
func (*GetBalanceRequest) Descriptor() ([]byte, []int) {
|
||||
return file_user_user_proto_rawDescGZIP(), []int{2}
|
||||
}
|
||||
|
||||
func (x *GetBalanceRequest) GetUserId() int64 {
|
||||
if x != nil {
|
||||
return x.UserId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type GetBalanceResponse struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Balance float64 `protobuf:"fixed64,1,opt,name=balance,proto3" json:"balance,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *GetBalanceResponse) Reset() {
|
||||
*x = GetBalanceResponse{}
|
||||
mi := &file_user_user_proto_msgTypes[3]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *GetBalanceResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*GetBalanceResponse) ProtoMessage() {}
|
||||
|
||||
func (x *GetBalanceResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_user_user_proto_msgTypes[3]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use GetBalanceResponse.ProtoReflect.Descriptor instead.
|
||||
func (*GetBalanceResponse) Descriptor() ([]byte, []int) {
|
||||
return file_user_user_proto_rawDescGZIP(), []int{3}
|
||||
}
|
||||
|
||||
func (x *GetBalanceResponse) GetBalance() float64 {
|
||||
if x != nil {
|
||||
return x.Balance
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type GetStatisticsRequest struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
UserId int64 `protobuf:"varint,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *GetStatisticsRequest) Reset() {
|
||||
*x = GetStatisticsRequest{}
|
||||
mi := &file_user_user_proto_msgTypes[4]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *GetStatisticsRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*GetStatisticsRequest) ProtoMessage() {}
|
||||
|
||||
func (x *GetStatisticsRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_user_user_proto_msgTypes[4]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use GetStatisticsRequest.ProtoReflect.Descriptor instead.
|
||||
func (*GetStatisticsRequest) Descriptor() ([]byte, []int) {
|
||||
return file_user_user_proto_rawDescGZIP(), []int{4}
|
||||
}
|
||||
|
||||
func (x *GetStatisticsRequest) GetUserId() int64 {
|
||||
if x != nil {
|
||||
return x.UserId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type GetStatisticsResponse struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
TotalRequests int32 `protobuf:"varint,1,opt,name=total_requests,json=totalRequests,proto3" json:"total_requests,omitempty"`
|
||||
SuccessfulRequests int32 `protobuf:"varint,2,opt,name=successful_requests,json=successfulRequests,proto3" json:"successful_requests,omitempty"`
|
||||
FailedRequests int32 `protobuf:"varint,3,opt,name=failed_requests,json=failedRequests,proto3" json:"failed_requests,omitempty"`
|
||||
TotalSpent float64 `protobuf:"fixed64,4,opt,name=total_spent,json=totalSpent,proto3" json:"total_spent,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *GetStatisticsResponse) Reset() {
|
||||
*x = GetStatisticsResponse{}
|
||||
mi := &file_user_user_proto_msgTypes[5]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *GetStatisticsResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*GetStatisticsResponse) ProtoMessage() {}
|
||||
|
||||
func (x *GetStatisticsResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_user_user_proto_msgTypes[5]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use GetStatisticsResponse.ProtoReflect.Descriptor instead.
|
||||
func (*GetStatisticsResponse) Descriptor() ([]byte, []int) {
|
||||
return file_user_user_proto_rawDescGZIP(), []int{5}
|
||||
}
|
||||
|
||||
func (x *GetStatisticsResponse) GetTotalRequests() int32 {
|
||||
if x != nil {
|
||||
return x.TotalRequests
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *GetStatisticsResponse) GetSuccessfulRequests() int32 {
|
||||
if x != nil {
|
||||
return x.SuccessfulRequests
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *GetStatisticsResponse) GetFailedRequests() int32 {
|
||||
if x != nil {
|
||||
return x.FailedRequests
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *GetStatisticsResponse) GetTotalSpent() float64 {
|
||||
if x != nil {
|
||||
return x.TotalSpent
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type GetBalanceStatisticsRequest struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
UserId int64 `protobuf:"varint,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *GetBalanceStatisticsRequest) Reset() {
|
||||
*x = GetBalanceStatisticsRequest{}
|
||||
mi := &file_user_user_proto_msgTypes[6]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *GetBalanceStatisticsRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*GetBalanceStatisticsRequest) ProtoMessage() {}
|
||||
|
||||
func (x *GetBalanceStatisticsRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_user_user_proto_msgTypes[6]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use GetBalanceStatisticsRequest.ProtoReflect.Descriptor instead.
|
||||
func (*GetBalanceStatisticsRequest) Descriptor() ([]byte, []int) {
|
||||
return file_user_user_proto_rawDescGZIP(), []int{6}
|
||||
}
|
||||
|
||||
func (x *GetBalanceStatisticsRequest) GetUserId() int64 {
|
||||
if x != nil {
|
||||
return x.UserId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type GetBalanceStatisticsResponse struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Balance float64 `protobuf:"fixed64,1,opt,name=balance,proto3" json:"balance,omitempty"`
|
||||
TotalRequests int32 `protobuf:"varint,2,opt,name=total_requests,json=totalRequests,proto3" json:"total_requests,omitempty"`
|
||||
TotalSpent float64 `protobuf:"fixed64,3,opt,name=total_spent,json=totalSpent,proto3" json:"total_spent,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *GetBalanceStatisticsResponse) Reset() {
|
||||
*x = GetBalanceStatisticsResponse{}
|
||||
mi := &file_user_user_proto_msgTypes[7]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *GetBalanceStatisticsResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*GetBalanceStatisticsResponse) ProtoMessage() {}
|
||||
|
||||
func (x *GetBalanceStatisticsResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_user_user_proto_msgTypes[7]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use GetBalanceStatisticsResponse.ProtoReflect.Descriptor instead.
|
||||
func (*GetBalanceStatisticsResponse) Descriptor() ([]byte, []int) {
|
||||
return file_user_user_proto_rawDescGZIP(), []int{7}
|
||||
}
|
||||
|
||||
func (x *GetBalanceStatisticsResponse) GetBalance() float64 {
|
||||
if x != nil {
|
||||
return x.Balance
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *GetBalanceStatisticsResponse) GetTotalRequests() int32 {
|
||||
if x != nil {
|
||||
return x.TotalRequests
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *GetBalanceStatisticsResponse) GetTotalSpent() float64 {
|
||||
if x != nil {
|
||||
return x.TotalSpent
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
var File_user_user_proto protoreflect.FileDescriptor
|
||||
|
||||
const file_user_user_proto_rawDesc = "" +
|
||||
"\n" +
|
||||
"\x0fuser/user.proto\x12\x04user\")\n" +
|
||||
"\x0eGetInfoRequest\x12\x17\n" +
|
||||
"\auser_id\x18\x01 \x01(\x03R\x06userId\"\x9b\x01\n" +
|
||||
"\x0fGetInfoResponse\x12\x14\n" +
|
||||
"\x05email\x18\x01 \x01(\tR\x05email\x12\x12\n" +
|
||||
"\x04name\x18\x02 \x01(\tR\x04name\x12\x14\n" +
|
||||
"\x05phone\x18\x03 \x01(\tR\x05phone\x12!\n" +
|
||||
"\fcompany_name\x18\x04 \x01(\tR\vcompanyName\x12%\n" +
|
||||
"\x0epayment_status\x18\x05 \x01(\tR\rpaymentStatus\",\n" +
|
||||
"\x11GetBalanceRequest\x12\x17\n" +
|
||||
"\auser_id\x18\x01 \x01(\x03R\x06userId\".\n" +
|
||||
"\x12GetBalanceResponse\x12\x18\n" +
|
||||
"\abalance\x18\x01 \x01(\x01R\abalance\"/\n" +
|
||||
"\x14GetStatisticsRequest\x12\x17\n" +
|
||||
"\auser_id\x18\x01 \x01(\x03R\x06userId\"\xb9\x01\n" +
|
||||
"\x15GetStatisticsResponse\x12%\n" +
|
||||
"\x0etotal_requests\x18\x01 \x01(\x05R\rtotalRequests\x12/\n" +
|
||||
"\x13successful_requests\x18\x02 \x01(\x05R\x12successfulRequests\x12'\n" +
|
||||
"\x0ffailed_requests\x18\x03 \x01(\x05R\x0efailedRequests\x12\x1f\n" +
|
||||
"\vtotal_spent\x18\x04 \x01(\x01R\n" +
|
||||
"totalSpent\"6\n" +
|
||||
"\x1bGetBalanceStatisticsRequest\x12\x17\n" +
|
||||
"\auser_id\x18\x01 \x01(\x03R\x06userId\"\x80\x01\n" +
|
||||
"\x1cGetBalanceStatisticsResponse\x12\x18\n" +
|
||||
"\abalance\x18\x01 \x01(\x01R\abalance\x12%\n" +
|
||||
"\x0etotal_requests\x18\x02 \x01(\x05R\rtotalRequests\x12\x1f\n" +
|
||||
"\vtotal_spent\x18\x03 \x01(\x01R\n" +
|
||||
"totalSpent2\xaf\x02\n" +
|
||||
"\vUserService\x126\n" +
|
||||
"\aGetInfo\x12\x14.user.GetInfoRequest\x1a\x15.user.GetInfoResponse\x12?\n" +
|
||||
"\n" +
|
||||
"GetBalance\x12\x17.user.GetBalanceRequest\x1a\x18.user.GetBalanceResponse\x12H\n" +
|
||||
"\rGetStatistics\x12\x1a.user.GetStatisticsRequest\x1a\x1b.user.GetStatisticsResponse\x12]\n" +
|
||||
"\x14GetBalanceStatistics\x12!.user.GetBalanceStatisticsRequest\x1a\".user.GetBalanceStatisticsResponseB<Z:git.techease.ru/Smart-search/smart-search-back/pkg/pb/userb\x06proto3"
|
||||
|
||||
var (
|
||||
file_user_user_proto_rawDescOnce sync.Once
|
||||
file_user_user_proto_rawDescData []byte
|
||||
)
|
||||
|
||||
func file_user_user_proto_rawDescGZIP() []byte {
|
||||
file_user_user_proto_rawDescOnce.Do(func() {
|
||||
file_user_user_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_user_user_proto_rawDesc), len(file_user_user_proto_rawDesc)))
|
||||
})
|
||||
return file_user_user_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_user_user_proto_msgTypes = make([]protoimpl.MessageInfo, 8)
|
||||
var file_user_user_proto_goTypes = []any{
|
||||
(*GetInfoRequest)(nil), // 0: user.GetInfoRequest
|
||||
(*GetInfoResponse)(nil), // 1: user.GetInfoResponse
|
||||
(*GetBalanceRequest)(nil), // 2: user.GetBalanceRequest
|
||||
(*GetBalanceResponse)(nil), // 3: user.GetBalanceResponse
|
||||
(*GetStatisticsRequest)(nil), // 4: user.GetStatisticsRequest
|
||||
(*GetStatisticsResponse)(nil), // 5: user.GetStatisticsResponse
|
||||
(*GetBalanceStatisticsRequest)(nil), // 6: user.GetBalanceStatisticsRequest
|
||||
(*GetBalanceStatisticsResponse)(nil), // 7: user.GetBalanceStatisticsResponse
|
||||
}
|
||||
var file_user_user_proto_depIdxs = []int32{
|
||||
0, // 0: user.UserService.GetInfo:input_type -> user.GetInfoRequest
|
||||
2, // 1: user.UserService.GetBalance:input_type -> user.GetBalanceRequest
|
||||
4, // 2: user.UserService.GetStatistics:input_type -> user.GetStatisticsRequest
|
||||
6, // 3: user.UserService.GetBalanceStatistics:input_type -> user.GetBalanceStatisticsRequest
|
||||
1, // 4: user.UserService.GetInfo:output_type -> user.GetInfoResponse
|
||||
3, // 5: user.UserService.GetBalance:output_type -> user.GetBalanceResponse
|
||||
5, // 6: user.UserService.GetStatistics:output_type -> user.GetStatisticsResponse
|
||||
7, // 7: user.UserService.GetBalanceStatistics:output_type -> user.GetBalanceStatisticsResponse
|
||||
4, // [4:8] is the sub-list for method output_type
|
||||
0, // [0:4] is the sub-list for method input_type
|
||||
0, // [0:0] is the sub-list for extension type_name
|
||||
0, // [0:0] is the sub-list for extension extendee
|
||||
0, // [0:0] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_user_user_proto_init() }
|
||||
func file_user_user_proto_init() {
|
||||
if File_user_user_proto != nil {
|
||||
return
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: unsafe.Slice(unsafe.StringData(file_user_user_proto_rawDesc), len(file_user_user_proto_rawDesc)),
|
||||
NumEnums: 0,
|
||||
NumMessages: 8,
|
||||
NumExtensions: 0,
|
||||
NumServices: 1,
|
||||
},
|
||||
GoTypes: file_user_user_proto_goTypes,
|
||||
DependencyIndexes: file_user_user_proto_depIdxs,
|
||||
MessageInfos: file_user_user_proto_msgTypes,
|
||||
}.Build()
|
||||
File_user_user_proto = out.File
|
||||
file_user_user_proto_goTypes = nil
|
||||
file_user_user_proto_depIdxs = nil
|
||||
}
|
||||
235
pkg/pb/user/user_grpc.pb.go
Normal file
235
pkg/pb/user/user_grpc.pb.go
Normal file
@@ -0,0 +1,235 @@
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.5.1
|
||||
// - protoc v5.29.3
|
||||
// source: user/user.proto
|
||||
|
||||
package user
|
||||
|
||||
import (
|
||||
context "context"
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
status "google.golang.org/grpc/status"
|
||||
)
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the grpc package it is being compiled against.
|
||||
// Requires gRPC-Go v1.64.0 or later.
|
||||
const _ = grpc.SupportPackageIsVersion9
|
||||
|
||||
const (
|
||||
UserService_GetInfo_FullMethodName = "/user.UserService/GetInfo"
|
||||
UserService_GetBalance_FullMethodName = "/user.UserService/GetBalance"
|
||||
UserService_GetStatistics_FullMethodName = "/user.UserService/GetStatistics"
|
||||
UserService_GetBalanceStatistics_FullMethodName = "/user.UserService/GetBalanceStatistics"
|
||||
)
|
||||
|
||||
// UserServiceClient is the client API for UserService service.
|
||||
//
|
||||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
|
||||
type UserServiceClient interface {
|
||||
GetInfo(ctx context.Context, in *GetInfoRequest, opts ...grpc.CallOption) (*GetInfoResponse, error)
|
||||
GetBalance(ctx context.Context, in *GetBalanceRequest, opts ...grpc.CallOption) (*GetBalanceResponse, error)
|
||||
GetStatistics(ctx context.Context, in *GetStatisticsRequest, opts ...grpc.CallOption) (*GetStatisticsResponse, error)
|
||||
GetBalanceStatistics(ctx context.Context, in *GetBalanceStatisticsRequest, opts ...grpc.CallOption) (*GetBalanceStatisticsResponse, error)
|
||||
}
|
||||
|
||||
type userServiceClient struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewUserServiceClient(cc grpc.ClientConnInterface) UserServiceClient {
|
||||
return &userServiceClient{cc}
|
||||
}
|
||||
|
||||
func (c *userServiceClient) GetInfo(ctx context.Context, in *GetInfoRequest, opts ...grpc.CallOption) (*GetInfoResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(GetInfoResponse)
|
||||
err := c.cc.Invoke(ctx, UserService_GetInfo_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *userServiceClient) GetBalance(ctx context.Context, in *GetBalanceRequest, opts ...grpc.CallOption) (*GetBalanceResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(GetBalanceResponse)
|
||||
err := c.cc.Invoke(ctx, UserService_GetBalance_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *userServiceClient) GetStatistics(ctx context.Context, in *GetStatisticsRequest, opts ...grpc.CallOption) (*GetStatisticsResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(GetStatisticsResponse)
|
||||
err := c.cc.Invoke(ctx, UserService_GetStatistics_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *userServiceClient) GetBalanceStatistics(ctx context.Context, in *GetBalanceStatisticsRequest, opts ...grpc.CallOption) (*GetBalanceStatisticsResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(GetBalanceStatisticsResponse)
|
||||
err := c.cc.Invoke(ctx, UserService_GetBalanceStatistics_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// UserServiceServer is the server API for UserService service.
|
||||
// All implementations must embed UnimplementedUserServiceServer
|
||||
// for forward compatibility.
|
||||
type UserServiceServer interface {
|
||||
GetInfo(context.Context, *GetInfoRequest) (*GetInfoResponse, error)
|
||||
GetBalance(context.Context, *GetBalanceRequest) (*GetBalanceResponse, error)
|
||||
GetStatistics(context.Context, *GetStatisticsRequest) (*GetStatisticsResponse, error)
|
||||
GetBalanceStatistics(context.Context, *GetBalanceStatisticsRequest) (*GetBalanceStatisticsResponse, error)
|
||||
mustEmbedUnimplementedUserServiceServer()
|
||||
}
|
||||
|
||||
// UnimplementedUserServiceServer must be embedded to have
|
||||
// forward compatible implementations.
|
||||
//
|
||||
// NOTE: this should be embedded by value instead of pointer to avoid a nil
|
||||
// pointer dereference when methods are called.
|
||||
type UnimplementedUserServiceServer struct{}
|
||||
|
||||
func (UnimplementedUserServiceServer) GetInfo(context.Context, *GetInfoRequest) (*GetInfoResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetInfo not implemented")
|
||||
}
|
||||
func (UnimplementedUserServiceServer) GetBalance(context.Context, *GetBalanceRequest) (*GetBalanceResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetBalance not implemented")
|
||||
}
|
||||
func (UnimplementedUserServiceServer) GetStatistics(context.Context, *GetStatisticsRequest) (*GetStatisticsResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetStatistics not implemented")
|
||||
}
|
||||
func (UnimplementedUserServiceServer) GetBalanceStatistics(context.Context, *GetBalanceStatisticsRequest) (*GetBalanceStatisticsResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetBalanceStatistics not implemented")
|
||||
}
|
||||
func (UnimplementedUserServiceServer) mustEmbedUnimplementedUserServiceServer() {}
|
||||
func (UnimplementedUserServiceServer) testEmbeddedByValue() {}
|
||||
|
||||
// UnsafeUserServiceServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to UserServiceServer will
|
||||
// result in compilation errors.
|
||||
type UnsafeUserServiceServer interface {
|
||||
mustEmbedUnimplementedUserServiceServer()
|
||||
}
|
||||
|
||||
func RegisterUserServiceServer(s grpc.ServiceRegistrar, srv UserServiceServer) {
|
||||
// If the following call pancis, it indicates UnimplementedUserServiceServer was
|
||||
// embedded by pointer and is nil. This will cause panics if an
|
||||
// unimplemented method is ever invoked, so we test this at initialization
|
||||
// time to prevent it from happening at runtime later due to I/O.
|
||||
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
|
||||
t.testEmbeddedByValue()
|
||||
}
|
||||
s.RegisterService(&UserService_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
func _UserService_GetInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(GetInfoRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(UserServiceServer).GetInfo(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: UserService_GetInfo_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(UserServiceServer).GetInfo(ctx, req.(*GetInfoRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _UserService_GetBalance_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(GetBalanceRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(UserServiceServer).GetBalance(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: UserService_GetBalance_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(UserServiceServer).GetBalance(ctx, req.(*GetBalanceRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _UserService_GetStatistics_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(GetStatisticsRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(UserServiceServer).GetStatistics(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: UserService_GetStatistics_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(UserServiceServer).GetStatistics(ctx, req.(*GetStatisticsRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _UserService_GetBalanceStatistics_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(GetBalanceStatisticsRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(UserServiceServer).GetBalanceStatistics(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: UserService_GetBalanceStatistics_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(UserServiceServer).GetBalanceStatistics(ctx, req.(*GetBalanceStatisticsRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
// UserService_ServiceDesc is the grpc.ServiceDesc for UserService service.
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
var UserService_ServiceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "user.UserService",
|
||||
HandlerType: (*UserServiceServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "GetInfo",
|
||||
Handler: _UserService_GetInfo_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "GetBalance",
|
||||
Handler: _UserService_GetBalance_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "GetStatistics",
|
||||
Handler: _UserService_GetStatistics_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "GetBalanceStatistics",
|
||||
Handler: _UserService_GetBalanceStatistics_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "user/user.proto",
|
||||
}
|
||||
Reference in New Issue
Block a user