Files
contracts/gen/go/users/users_grpc.pb.go
2026-04-11 17:05:04 +00:00

238 lines
9.6 KiB
Go

// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.6.1
// - protoc v4.25.9
// source: users/users.proto
package pb
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 (
UsersService_GetProfile_FullMethodName = "/users.v1.UsersService/GetProfile"
UsersService_UpdateProfile_FullMethodName = "/users.v1.UsersService/UpdateProfile"
UsersService_CreateProfile_FullMethodName = "/users.v1.UsersService/CreateProfile"
UsersService_SoftDeleteProfile_FullMethodName = "/users.v1.UsersService/SoftDeleteProfile"
)
// UsersServiceClient is the client API for UsersService 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 UsersServiceClient interface {
GetProfile(ctx context.Context, in *GetProfileRequest, opts ...grpc.CallOption) (*GetProfileResponse, error)
UpdateProfile(ctx context.Context, in *UpdateProfileRequest, opts ...grpc.CallOption) (*UpdateProfileResponse, error)
// Для системного использования (вызывается из Auth/Admin)
CreateProfile(ctx context.Context, in *CreateProfileRequest, opts ...grpc.CallOption) (*CreateProfileResponse, error)
SoftDeleteProfile(ctx context.Context, in *SoftDeleteProfileRequest, opts ...grpc.CallOption) (*SoftDeleteProfileResponse, error)
}
type usersServiceClient struct {
cc grpc.ClientConnInterface
}
func NewUsersServiceClient(cc grpc.ClientConnInterface) UsersServiceClient {
return &usersServiceClient{cc}
}
func (c *usersServiceClient) GetProfile(ctx context.Context, in *GetProfileRequest, opts ...grpc.CallOption) (*GetProfileResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(GetProfileResponse)
err := c.cc.Invoke(ctx, UsersService_GetProfile_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *usersServiceClient) UpdateProfile(ctx context.Context, in *UpdateProfileRequest, opts ...grpc.CallOption) (*UpdateProfileResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(UpdateProfileResponse)
err := c.cc.Invoke(ctx, UsersService_UpdateProfile_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *usersServiceClient) CreateProfile(ctx context.Context, in *CreateProfileRequest, opts ...grpc.CallOption) (*CreateProfileResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(CreateProfileResponse)
err := c.cc.Invoke(ctx, UsersService_CreateProfile_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *usersServiceClient) SoftDeleteProfile(ctx context.Context, in *SoftDeleteProfileRequest, opts ...grpc.CallOption) (*SoftDeleteProfileResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(SoftDeleteProfileResponse)
err := c.cc.Invoke(ctx, UsersService_SoftDeleteProfile_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
// UsersServiceServer is the server API for UsersService service.
// All implementations must embed UnimplementedUsersServiceServer
// for forward compatibility.
type UsersServiceServer interface {
GetProfile(context.Context, *GetProfileRequest) (*GetProfileResponse, error)
UpdateProfile(context.Context, *UpdateProfileRequest) (*UpdateProfileResponse, error)
// Для системного использования (вызывается из Auth/Admin)
CreateProfile(context.Context, *CreateProfileRequest) (*CreateProfileResponse, error)
SoftDeleteProfile(context.Context, *SoftDeleteProfileRequest) (*SoftDeleteProfileResponse, error)
mustEmbedUnimplementedUsersServiceServer()
}
// UnimplementedUsersServiceServer 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 UnimplementedUsersServiceServer struct{}
func (UnimplementedUsersServiceServer) GetProfile(context.Context, *GetProfileRequest) (*GetProfileResponse, error) {
return nil, status.Error(codes.Unimplemented, "method GetProfile not implemented")
}
func (UnimplementedUsersServiceServer) UpdateProfile(context.Context, *UpdateProfileRequest) (*UpdateProfileResponse, error) {
return nil, status.Error(codes.Unimplemented, "method UpdateProfile not implemented")
}
func (UnimplementedUsersServiceServer) CreateProfile(context.Context, *CreateProfileRequest) (*CreateProfileResponse, error) {
return nil, status.Error(codes.Unimplemented, "method CreateProfile not implemented")
}
func (UnimplementedUsersServiceServer) SoftDeleteProfile(context.Context, *SoftDeleteProfileRequest) (*SoftDeleteProfileResponse, error) {
return nil, status.Error(codes.Unimplemented, "method SoftDeleteProfile not implemented")
}
func (UnimplementedUsersServiceServer) mustEmbedUnimplementedUsersServiceServer() {}
func (UnimplementedUsersServiceServer) testEmbeddedByValue() {}
// UnsafeUsersServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to UsersServiceServer will
// result in compilation errors.
type UnsafeUsersServiceServer interface {
mustEmbedUnimplementedUsersServiceServer()
}
func RegisterUsersServiceServer(s grpc.ServiceRegistrar, srv UsersServiceServer) {
// If the following call panics, it indicates UnimplementedUsersServiceServer 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(&UsersService_ServiceDesc, srv)
}
func _UsersService_GetProfile_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetProfileRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(UsersServiceServer).GetProfile(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: UsersService_GetProfile_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(UsersServiceServer).GetProfile(ctx, req.(*GetProfileRequest))
}
return interceptor(ctx, in, info, handler)
}
func _UsersService_UpdateProfile_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(UpdateProfileRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(UsersServiceServer).UpdateProfile(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: UsersService_UpdateProfile_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(UsersServiceServer).UpdateProfile(ctx, req.(*UpdateProfileRequest))
}
return interceptor(ctx, in, info, handler)
}
func _UsersService_CreateProfile_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(CreateProfileRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(UsersServiceServer).CreateProfile(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: UsersService_CreateProfile_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(UsersServiceServer).CreateProfile(ctx, req.(*CreateProfileRequest))
}
return interceptor(ctx, in, info, handler)
}
func _UsersService_SoftDeleteProfile_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(SoftDeleteProfileRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(UsersServiceServer).SoftDeleteProfile(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: UsersService_SoftDeleteProfile_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(UsersServiceServer).SoftDeleteProfile(ctx, req.(*SoftDeleteProfileRequest))
}
return interceptor(ctx, in, info, handler)
}
// UsersService_ServiceDesc is the grpc.ServiceDesc for UsersService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var UsersService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "users.v1.UsersService",
HandlerType: (*UsersServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "GetProfile",
Handler: _UsersService_GetProfile_Handler,
},
{
MethodName: "UpdateProfile",
Handler: _UsersService_UpdateProfile_Handler,
},
{
MethodName: "CreateProfile",
Handler: _UsersService_CreateProfile_Handler,
},
{
MethodName: "SoftDeleteProfile",
Handler: _UsersService_SoftDeleteProfile_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "users/users.proto",
}