add service
Some checks failed
Deploy Smart Search Backend / deploy (push) Failing after 1m54s

This commit is contained in:
vallyenfail
2026-01-17 20:41:37 +03:00
parent 635acd13ac
commit e2968722ed
70 changed files with 7542 additions and 463 deletions

View File

@@ -0,0 +1,640 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.36.6
// protoc v5.29.3
// source: request/request.proto
package request
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
timestamppb "google.golang.org/protobuf/types/known/timestamppb"
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 CreateTZRequest struct {
state protoimpl.MessageState `protogen:"open.v1"`
UserId int64 `protobuf:"varint,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
RequestTxt string `protobuf:"bytes,2,opt,name=request_txt,json=requestTxt,proto3" json:"request_txt,omitempty"`
FileData []byte `protobuf:"bytes,3,opt,name=file_data,json=fileData,proto3" json:"file_data,omitempty"`
FileName string `protobuf:"bytes,4,opt,name=file_name,json=fileName,proto3" json:"file_name,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *CreateTZRequest) Reset() {
*x = CreateTZRequest{}
mi := &file_request_request_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *CreateTZRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CreateTZRequest) ProtoMessage() {}
func (x *CreateTZRequest) ProtoReflect() protoreflect.Message {
mi := &file_request_request_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 CreateTZRequest.ProtoReflect.Descriptor instead.
func (*CreateTZRequest) Descriptor() ([]byte, []int) {
return file_request_request_proto_rawDescGZIP(), []int{0}
}
func (x *CreateTZRequest) GetUserId() int64 {
if x != nil {
return x.UserId
}
return 0
}
func (x *CreateTZRequest) GetRequestTxt() string {
if x != nil {
return x.RequestTxt
}
return ""
}
func (x *CreateTZRequest) GetFileData() []byte {
if x != nil {
return x.FileData
}
return nil
}
func (x *CreateTZRequest) GetFileName() string {
if x != nil {
return x.FileName
}
return ""
}
type CreateTZResponse struct {
state protoimpl.MessageState `protogen:"open.v1"`
RequestId string `protobuf:"bytes,1,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"`
TzText string `protobuf:"bytes,2,opt,name=tz_text,json=tzText,proto3" json:"tz_text,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *CreateTZResponse) Reset() {
*x = CreateTZResponse{}
mi := &file_request_request_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *CreateTZResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CreateTZResponse) ProtoMessage() {}
func (x *CreateTZResponse) ProtoReflect() protoreflect.Message {
mi := &file_request_request_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 CreateTZResponse.ProtoReflect.Descriptor instead.
func (*CreateTZResponse) Descriptor() ([]byte, []int) {
return file_request_request_proto_rawDescGZIP(), []int{1}
}
func (x *CreateTZResponse) GetRequestId() string {
if x != nil {
return x.RequestId
}
return ""
}
func (x *CreateTZResponse) GetTzText() string {
if x != nil {
return x.TzText
}
return ""
}
type ApproveTZRequest struct {
state protoimpl.MessageState `protogen:"open.v1"`
RequestId string `protobuf:"bytes,1,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"`
FinalTz string `protobuf:"bytes,2,opt,name=final_tz,json=finalTz,proto3" json:"final_tz,omitempty"`
UserId int64 `protobuf:"varint,3,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *ApproveTZRequest) Reset() {
*x = ApproveTZRequest{}
mi := &file_request_request_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *ApproveTZRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ApproveTZRequest) ProtoMessage() {}
func (x *ApproveTZRequest) ProtoReflect() protoreflect.Message {
mi := &file_request_request_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 ApproveTZRequest.ProtoReflect.Descriptor instead.
func (*ApproveTZRequest) Descriptor() ([]byte, []int) {
return file_request_request_proto_rawDescGZIP(), []int{2}
}
func (x *ApproveTZRequest) GetRequestId() string {
if x != nil {
return x.RequestId
}
return ""
}
func (x *ApproveTZRequest) GetFinalTz() string {
if x != nil {
return x.FinalTz
}
return ""
}
func (x *ApproveTZRequest) GetUserId() int64 {
if x != nil {
return x.UserId
}
return 0
}
type ApproveTZResponse struct {
state protoimpl.MessageState `protogen:"open.v1"`
Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"`
MailingStatus string `protobuf:"bytes,2,opt,name=mailing_status,json=mailingStatus,proto3" json:"mailing_status,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *ApproveTZResponse) Reset() {
*x = ApproveTZResponse{}
mi := &file_request_request_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *ApproveTZResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ApproveTZResponse) ProtoMessage() {}
func (x *ApproveTZResponse) ProtoReflect() protoreflect.Message {
mi := &file_request_request_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 ApproveTZResponse.ProtoReflect.Descriptor instead.
func (*ApproveTZResponse) Descriptor() ([]byte, []int) {
return file_request_request_proto_rawDescGZIP(), []int{3}
}
func (x *ApproveTZResponse) GetSuccess() bool {
if x != nil {
return x.Success
}
return false
}
func (x *ApproveTZResponse) GetMailingStatus() string {
if x != nil {
return x.MailingStatus
}
return ""
}
type GetMailingListRequest 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 *GetMailingListRequest) Reset() {
*x = GetMailingListRequest{}
mi := &file_request_request_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *GetMailingListRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetMailingListRequest) ProtoMessage() {}
func (x *GetMailingListRequest) ProtoReflect() protoreflect.Message {
mi := &file_request_request_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 GetMailingListRequest.ProtoReflect.Descriptor instead.
func (*GetMailingListRequest) Descriptor() ([]byte, []int) {
return file_request_request_proto_rawDescGZIP(), []int{4}
}
func (x *GetMailingListRequest) GetUserId() int64 {
if x != nil {
return x.UserId
}
return 0
}
type GetMailingListResponse struct {
state protoimpl.MessageState `protogen:"open.v1"`
Items []*MailingItem `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *GetMailingListResponse) Reset() {
*x = GetMailingListResponse{}
mi := &file_request_request_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *GetMailingListResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetMailingListResponse) ProtoMessage() {}
func (x *GetMailingListResponse) ProtoReflect() protoreflect.Message {
mi := &file_request_request_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 GetMailingListResponse.ProtoReflect.Descriptor instead.
func (*GetMailingListResponse) Descriptor() ([]byte, []int) {
return file_request_request_proto_rawDescGZIP(), []int{5}
}
func (x *GetMailingListResponse) GetItems() []*MailingItem {
if x != nil {
return x.Items
}
return nil
}
type GetMailingListByIDRequest struct {
state protoimpl.MessageState `protogen:"open.v1"`
RequestId string `protobuf:"bytes,1,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"`
UserId int64 `protobuf:"varint,2,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *GetMailingListByIDRequest) Reset() {
*x = GetMailingListByIDRequest{}
mi := &file_request_request_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *GetMailingListByIDRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetMailingListByIDRequest) ProtoMessage() {}
func (x *GetMailingListByIDRequest) ProtoReflect() protoreflect.Message {
mi := &file_request_request_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 GetMailingListByIDRequest.ProtoReflect.Descriptor instead.
func (*GetMailingListByIDRequest) Descriptor() ([]byte, []int) {
return file_request_request_proto_rawDescGZIP(), []int{6}
}
func (x *GetMailingListByIDRequest) GetRequestId() string {
if x != nil {
return x.RequestId
}
return ""
}
func (x *GetMailingListByIDRequest) GetUserId() int64 {
if x != nil {
return x.UserId
}
return 0
}
type GetMailingListByIDResponse struct {
state protoimpl.MessageState `protogen:"open.v1"`
Item *MailingItem `protobuf:"bytes,1,opt,name=item,proto3" json:"item,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *GetMailingListByIDResponse) Reset() {
*x = GetMailingListByIDResponse{}
mi := &file_request_request_proto_msgTypes[7]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *GetMailingListByIDResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetMailingListByIDResponse) ProtoMessage() {}
func (x *GetMailingListByIDResponse) ProtoReflect() protoreflect.Message {
mi := &file_request_request_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 GetMailingListByIDResponse.ProtoReflect.Descriptor instead.
func (*GetMailingListByIDResponse) Descriptor() ([]byte, []int) {
return file_request_request_proto_rawDescGZIP(), []int{7}
}
func (x *GetMailingListByIDResponse) GetItem() *MailingItem {
if x != nil {
return x.Item
}
return nil
}
type MailingItem struct {
state protoimpl.MessageState `protogen:"open.v1"`
RequestId string `protobuf:"bytes,1,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"`
RequestTxt string `protobuf:"bytes,2,opt,name=request_txt,json=requestTxt,proto3" json:"request_txt,omitempty"`
FinalTz string `protobuf:"bytes,3,opt,name=final_tz,json=finalTz,proto3" json:"final_tz,omitempty"`
MailingStatus string `protobuf:"bytes,4,opt,name=mailing_status,json=mailingStatus,proto3" json:"mailing_status,omitempty"`
CreatedAt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
SuppliersFound int32 `protobuf:"varint,6,opt,name=suppliers_found,json=suppliersFound,proto3" json:"suppliers_found,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *MailingItem) Reset() {
*x = MailingItem{}
mi := &file_request_request_proto_msgTypes[8]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *MailingItem) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*MailingItem) ProtoMessage() {}
func (x *MailingItem) ProtoReflect() protoreflect.Message {
mi := &file_request_request_proto_msgTypes[8]
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 MailingItem.ProtoReflect.Descriptor instead.
func (*MailingItem) Descriptor() ([]byte, []int) {
return file_request_request_proto_rawDescGZIP(), []int{8}
}
func (x *MailingItem) GetRequestId() string {
if x != nil {
return x.RequestId
}
return ""
}
func (x *MailingItem) GetRequestTxt() string {
if x != nil {
return x.RequestTxt
}
return ""
}
func (x *MailingItem) GetFinalTz() string {
if x != nil {
return x.FinalTz
}
return ""
}
func (x *MailingItem) GetMailingStatus() string {
if x != nil {
return x.MailingStatus
}
return ""
}
func (x *MailingItem) GetCreatedAt() *timestamppb.Timestamp {
if x != nil {
return x.CreatedAt
}
return nil
}
func (x *MailingItem) GetSuppliersFound() int32 {
if x != nil {
return x.SuppliersFound
}
return 0
}
var File_request_request_proto protoreflect.FileDescriptor
const file_request_request_proto_rawDesc = "" +
"\n" +
"\x15request/request.proto\x12\arequest\x1a\x1fgoogle/protobuf/timestamp.proto\"\x85\x01\n" +
"\x0fCreateTZRequest\x12\x17\n" +
"\auser_id\x18\x01 \x01(\x03R\x06userId\x12\x1f\n" +
"\vrequest_txt\x18\x02 \x01(\tR\n" +
"requestTxt\x12\x1b\n" +
"\tfile_data\x18\x03 \x01(\fR\bfileData\x12\x1b\n" +
"\tfile_name\x18\x04 \x01(\tR\bfileName\"J\n" +
"\x10CreateTZResponse\x12\x1d\n" +
"\n" +
"request_id\x18\x01 \x01(\tR\trequestId\x12\x17\n" +
"\atz_text\x18\x02 \x01(\tR\x06tzText\"e\n" +
"\x10ApproveTZRequest\x12\x1d\n" +
"\n" +
"request_id\x18\x01 \x01(\tR\trequestId\x12\x19\n" +
"\bfinal_tz\x18\x02 \x01(\tR\afinalTz\x12\x17\n" +
"\auser_id\x18\x03 \x01(\x03R\x06userId\"T\n" +
"\x11ApproveTZResponse\x12\x18\n" +
"\asuccess\x18\x01 \x01(\bR\asuccess\x12%\n" +
"\x0emailing_status\x18\x02 \x01(\tR\rmailingStatus\"0\n" +
"\x15GetMailingListRequest\x12\x17\n" +
"\auser_id\x18\x01 \x01(\x03R\x06userId\"D\n" +
"\x16GetMailingListResponse\x12*\n" +
"\x05items\x18\x01 \x03(\v2\x14.request.MailingItemR\x05items\"S\n" +
"\x19GetMailingListByIDRequest\x12\x1d\n" +
"\n" +
"request_id\x18\x01 \x01(\tR\trequestId\x12\x17\n" +
"\auser_id\x18\x02 \x01(\x03R\x06userId\"F\n" +
"\x1aGetMailingListByIDResponse\x12(\n" +
"\x04item\x18\x01 \x01(\v2\x14.request.MailingItemR\x04item\"\xf3\x01\n" +
"\vMailingItem\x12\x1d\n" +
"\n" +
"request_id\x18\x01 \x01(\tR\trequestId\x12\x1f\n" +
"\vrequest_txt\x18\x02 \x01(\tR\n" +
"requestTxt\x12\x19\n" +
"\bfinal_tz\x18\x03 \x01(\tR\afinalTz\x12%\n" +
"\x0emailing_status\x18\x04 \x01(\tR\rmailingStatus\x129\n" +
"\n" +
"created_at\x18\x05 \x01(\v2\x1a.google.protobuf.TimestampR\tcreatedAt\x12'\n" +
"\x0fsuppliers_found\x18\x06 \x01(\x05R\x0esuppliersFound2\xc7\x02\n" +
"\x0eRequestService\x12?\n" +
"\bCreateTZ\x12\x18.request.CreateTZRequest\x1a\x19.request.CreateTZResponse\x12B\n" +
"\tApproveTZ\x12\x19.request.ApproveTZRequest\x1a\x1a.request.ApproveTZResponse\x12Q\n" +
"\x0eGetMailingList\x12\x1e.request.GetMailingListRequest\x1a\x1f.request.GetMailingListResponse\x12]\n" +
"\x12GetMailingListByID\x12\".request.GetMailingListByIDRequest\x1a#.request.GetMailingListByIDResponseB?Z=git.techease.ru/Smart-search/smart-search-back/pkg/pb/requestb\x06proto3"
var (
file_request_request_proto_rawDescOnce sync.Once
file_request_request_proto_rawDescData []byte
)
func file_request_request_proto_rawDescGZIP() []byte {
file_request_request_proto_rawDescOnce.Do(func() {
file_request_request_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_request_request_proto_rawDesc), len(file_request_request_proto_rawDesc)))
})
return file_request_request_proto_rawDescData
}
var file_request_request_proto_msgTypes = make([]protoimpl.MessageInfo, 9)
var file_request_request_proto_goTypes = []any{
(*CreateTZRequest)(nil), // 0: request.CreateTZRequest
(*CreateTZResponse)(nil), // 1: request.CreateTZResponse
(*ApproveTZRequest)(nil), // 2: request.ApproveTZRequest
(*ApproveTZResponse)(nil), // 3: request.ApproveTZResponse
(*GetMailingListRequest)(nil), // 4: request.GetMailingListRequest
(*GetMailingListResponse)(nil), // 5: request.GetMailingListResponse
(*GetMailingListByIDRequest)(nil), // 6: request.GetMailingListByIDRequest
(*GetMailingListByIDResponse)(nil), // 7: request.GetMailingListByIDResponse
(*MailingItem)(nil), // 8: request.MailingItem
(*timestamppb.Timestamp)(nil), // 9: google.protobuf.Timestamp
}
var file_request_request_proto_depIdxs = []int32{
8, // 0: request.GetMailingListResponse.items:type_name -> request.MailingItem
8, // 1: request.GetMailingListByIDResponse.item:type_name -> request.MailingItem
9, // 2: request.MailingItem.created_at:type_name -> google.protobuf.Timestamp
0, // 3: request.RequestService.CreateTZ:input_type -> request.CreateTZRequest
2, // 4: request.RequestService.ApproveTZ:input_type -> request.ApproveTZRequest
4, // 5: request.RequestService.GetMailingList:input_type -> request.GetMailingListRequest
6, // 6: request.RequestService.GetMailingListByID:input_type -> request.GetMailingListByIDRequest
1, // 7: request.RequestService.CreateTZ:output_type -> request.CreateTZResponse
3, // 8: request.RequestService.ApproveTZ:output_type -> request.ApproveTZResponse
5, // 9: request.RequestService.GetMailingList:output_type -> request.GetMailingListResponse
7, // 10: request.RequestService.GetMailingListByID:output_type -> request.GetMailingListByIDResponse
7, // [7:11] is the sub-list for method output_type
3, // [3:7] 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_request_request_proto_init() }
func file_request_request_proto_init() {
if File_request_request_proto != nil {
return
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: unsafe.Slice(unsafe.StringData(file_request_request_proto_rawDesc), len(file_request_request_proto_rawDesc)),
NumEnums: 0,
NumMessages: 9,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_request_request_proto_goTypes,
DependencyIndexes: file_request_request_proto_depIdxs,
MessageInfos: file_request_request_proto_msgTypes,
}.Build()
File_request_request_proto = out.File
file_request_request_proto_goTypes = nil
file_request_request_proto_depIdxs = nil
}

View 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: request/request.proto
package request
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 (
RequestService_CreateTZ_FullMethodName = "/request.RequestService/CreateTZ"
RequestService_ApproveTZ_FullMethodName = "/request.RequestService/ApproveTZ"
RequestService_GetMailingList_FullMethodName = "/request.RequestService/GetMailingList"
RequestService_GetMailingListByID_FullMethodName = "/request.RequestService/GetMailingListByID"
)
// RequestServiceClient is the client API for RequestService 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 RequestServiceClient interface {
CreateTZ(ctx context.Context, in *CreateTZRequest, opts ...grpc.CallOption) (*CreateTZResponse, error)
ApproveTZ(ctx context.Context, in *ApproveTZRequest, opts ...grpc.CallOption) (*ApproveTZResponse, error)
GetMailingList(ctx context.Context, in *GetMailingListRequest, opts ...grpc.CallOption) (*GetMailingListResponse, error)
GetMailingListByID(ctx context.Context, in *GetMailingListByIDRequest, opts ...grpc.CallOption) (*GetMailingListByIDResponse, error)
}
type requestServiceClient struct {
cc grpc.ClientConnInterface
}
func NewRequestServiceClient(cc grpc.ClientConnInterface) RequestServiceClient {
return &requestServiceClient{cc}
}
func (c *requestServiceClient) CreateTZ(ctx context.Context, in *CreateTZRequest, opts ...grpc.CallOption) (*CreateTZResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(CreateTZResponse)
err := c.cc.Invoke(ctx, RequestService_CreateTZ_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *requestServiceClient) ApproveTZ(ctx context.Context, in *ApproveTZRequest, opts ...grpc.CallOption) (*ApproveTZResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(ApproveTZResponse)
err := c.cc.Invoke(ctx, RequestService_ApproveTZ_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *requestServiceClient) GetMailingList(ctx context.Context, in *GetMailingListRequest, opts ...grpc.CallOption) (*GetMailingListResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(GetMailingListResponse)
err := c.cc.Invoke(ctx, RequestService_GetMailingList_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *requestServiceClient) GetMailingListByID(ctx context.Context, in *GetMailingListByIDRequest, opts ...grpc.CallOption) (*GetMailingListByIDResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(GetMailingListByIDResponse)
err := c.cc.Invoke(ctx, RequestService_GetMailingListByID_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
// RequestServiceServer is the server API for RequestService service.
// All implementations must embed UnimplementedRequestServiceServer
// for forward compatibility.
type RequestServiceServer interface {
CreateTZ(context.Context, *CreateTZRequest) (*CreateTZResponse, error)
ApproveTZ(context.Context, *ApproveTZRequest) (*ApproveTZResponse, error)
GetMailingList(context.Context, *GetMailingListRequest) (*GetMailingListResponse, error)
GetMailingListByID(context.Context, *GetMailingListByIDRequest) (*GetMailingListByIDResponse, error)
mustEmbedUnimplementedRequestServiceServer()
}
// UnimplementedRequestServiceServer 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 UnimplementedRequestServiceServer struct{}
func (UnimplementedRequestServiceServer) CreateTZ(context.Context, *CreateTZRequest) (*CreateTZResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method CreateTZ not implemented")
}
func (UnimplementedRequestServiceServer) ApproveTZ(context.Context, *ApproveTZRequest) (*ApproveTZResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ApproveTZ not implemented")
}
func (UnimplementedRequestServiceServer) GetMailingList(context.Context, *GetMailingListRequest) (*GetMailingListResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetMailingList not implemented")
}
func (UnimplementedRequestServiceServer) GetMailingListByID(context.Context, *GetMailingListByIDRequest) (*GetMailingListByIDResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetMailingListByID not implemented")
}
func (UnimplementedRequestServiceServer) mustEmbedUnimplementedRequestServiceServer() {}
func (UnimplementedRequestServiceServer) testEmbeddedByValue() {}
// UnsafeRequestServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to RequestServiceServer will
// result in compilation errors.
type UnsafeRequestServiceServer interface {
mustEmbedUnimplementedRequestServiceServer()
}
func RegisterRequestServiceServer(s grpc.ServiceRegistrar, srv RequestServiceServer) {
// If the following call pancis, it indicates UnimplementedRequestServiceServer 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(&RequestService_ServiceDesc, srv)
}
func _RequestService_CreateTZ_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(CreateTZRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(RequestServiceServer).CreateTZ(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: RequestService_CreateTZ_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(RequestServiceServer).CreateTZ(ctx, req.(*CreateTZRequest))
}
return interceptor(ctx, in, info, handler)
}
func _RequestService_ApproveTZ_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ApproveTZRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(RequestServiceServer).ApproveTZ(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: RequestService_ApproveTZ_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(RequestServiceServer).ApproveTZ(ctx, req.(*ApproveTZRequest))
}
return interceptor(ctx, in, info, handler)
}
func _RequestService_GetMailingList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetMailingListRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(RequestServiceServer).GetMailingList(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: RequestService_GetMailingList_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(RequestServiceServer).GetMailingList(ctx, req.(*GetMailingListRequest))
}
return interceptor(ctx, in, info, handler)
}
func _RequestService_GetMailingListByID_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetMailingListByIDRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(RequestServiceServer).GetMailingListByID(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: RequestService_GetMailingListByID_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(RequestServiceServer).GetMailingListByID(ctx, req.(*GetMailingListByIDRequest))
}
return interceptor(ctx, in, info, handler)
}
// RequestService_ServiceDesc is the grpc.ServiceDesc for RequestService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var RequestService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "request.RequestService",
HandlerType: (*RequestServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "CreateTZ",
Handler: _RequestService_CreateTZ_Handler,
},
{
MethodName: "ApproveTZ",
Handler: _RequestService_ApproveTZ_Handler,
},
{
MethodName: "GetMailingList",
Handler: _RequestService_GetMailingList_Handler,
},
{
MethodName: "GetMailingListByID",
Handler: _RequestService_GetMailingListByID_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "request/request.proto",
}