Files
smart-search-back/pkg/pb/request/request_grpc.pb.go
vallyenfail 633bb3bb85
All checks were successful
Deploy Smart Search Backend Test / deploy (push) Successful in 2m31s
add service
2026-01-19 23:55:41 +03:00

236 lines
9.4 KiB
Go

// 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",
}