l-ai-memories-proto/memory_grpc.pb.go
2026-03-14 06:54:02 +03:00

248 lines
10 KiB
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.6.1
// - protoc v7.34.0
// source: memory.proto
package proto
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 (
MemoryService_StoreMemory_FullMethodName = "/memory.MemoryService/StoreMemory"
MemoryService_GetMemories_FullMethodName = "/memory.MemoryService/GetMemories"
MemoryService_ProcessMessage_FullMethodName = "/memory.MemoryService/ProcessMessage"
MemoryService_HealthCheck_FullMethodName = "/memory.MemoryService/HealthCheck"
)
// MemoryServiceClient is the client API for MemoryService 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.
//
// MemoryService - сервис для работы с памятью
type MemoryServiceClient interface {
// StoreMemory сохраняет воспоминание
StoreMemory(ctx context.Context, in *StoreMemoryRequest, opts ...grpc.CallOption) (*StoreMemoryResponse, error)
// GetMemories получает воспоминания пользователя
GetMemories(ctx context.Context, in *GetMemoriesRequest, opts ...grpc.CallOption) (*GetMemoriesResponse, error)
// ProcessMessage обрабатывает сообщение и извлекает факты
ProcessMessage(ctx context.Context, in *ProcessMessageRequest, opts ...grpc.CallOption) (*ProcessMessageResponse, error)
// HealthCheck проверяет здоровье сервиса
HealthCheck(ctx context.Context, in *HealthCheckRequest, opts ...grpc.CallOption) (*HealthCheckResponse, error)
}
type memoryServiceClient struct {
cc grpc.ClientConnInterface
}
func NewMemoryServiceClient(cc grpc.ClientConnInterface) MemoryServiceClient {
return &memoryServiceClient{cc}
}
func (c *memoryServiceClient) StoreMemory(ctx context.Context, in *StoreMemoryRequest, opts ...grpc.CallOption) (*StoreMemoryResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(StoreMemoryResponse)
err := c.cc.Invoke(ctx, MemoryService_StoreMemory_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *memoryServiceClient) GetMemories(ctx context.Context, in *GetMemoriesRequest, opts ...grpc.CallOption) (*GetMemoriesResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(GetMemoriesResponse)
err := c.cc.Invoke(ctx, MemoryService_GetMemories_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *memoryServiceClient) ProcessMessage(ctx context.Context, in *ProcessMessageRequest, opts ...grpc.CallOption) (*ProcessMessageResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(ProcessMessageResponse)
err := c.cc.Invoke(ctx, MemoryService_ProcessMessage_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *memoryServiceClient) HealthCheck(ctx context.Context, in *HealthCheckRequest, opts ...grpc.CallOption) (*HealthCheckResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(HealthCheckResponse)
err := c.cc.Invoke(ctx, MemoryService_HealthCheck_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
// MemoryServiceServer is the server API for MemoryService service.
// All implementations must embed UnimplementedMemoryServiceServer
// for forward compatibility.
//
// MemoryService - сервис для работы с памятью
type MemoryServiceServer interface {
// StoreMemory сохраняет воспоминание
StoreMemory(context.Context, *StoreMemoryRequest) (*StoreMemoryResponse, error)
// GetMemories получает воспоминания пользователя
GetMemories(context.Context, *GetMemoriesRequest) (*GetMemoriesResponse, error)
// ProcessMessage обрабатывает сообщение и извлекает факты
ProcessMessage(context.Context, *ProcessMessageRequest) (*ProcessMessageResponse, error)
// HealthCheck проверяет здоровье сервиса
HealthCheck(context.Context, *HealthCheckRequest) (*HealthCheckResponse, error)
mustEmbedUnimplementedMemoryServiceServer()
}
// UnimplementedMemoryServiceServer 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 UnimplementedMemoryServiceServer struct{}
func (UnimplementedMemoryServiceServer) StoreMemory(context.Context, *StoreMemoryRequest) (*StoreMemoryResponse, error) {
return nil, status.Error(codes.Unimplemented, "method StoreMemory not implemented")
}
func (UnimplementedMemoryServiceServer) GetMemories(context.Context, *GetMemoriesRequest) (*GetMemoriesResponse, error) {
return nil, status.Error(codes.Unimplemented, "method GetMemories not implemented")
}
func (UnimplementedMemoryServiceServer) ProcessMessage(context.Context, *ProcessMessageRequest) (*ProcessMessageResponse, error) {
return nil, status.Error(codes.Unimplemented, "method ProcessMessage not implemented")
}
func (UnimplementedMemoryServiceServer) HealthCheck(context.Context, *HealthCheckRequest) (*HealthCheckResponse, error) {
return nil, status.Error(codes.Unimplemented, "method HealthCheck not implemented")
}
func (UnimplementedMemoryServiceServer) mustEmbedUnimplementedMemoryServiceServer() {}
func (UnimplementedMemoryServiceServer) testEmbeddedByValue() {}
// UnsafeMemoryServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to MemoryServiceServer will
// result in compilation errors.
type UnsafeMemoryServiceServer interface {
mustEmbedUnimplementedMemoryServiceServer()
}
func RegisterMemoryServiceServer(s grpc.ServiceRegistrar, srv MemoryServiceServer) {
// If the following call panics, it indicates UnimplementedMemoryServiceServer 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(&MemoryService_ServiceDesc, srv)
}
func _MemoryService_StoreMemory_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(StoreMemoryRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(MemoryServiceServer).StoreMemory(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: MemoryService_StoreMemory_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(MemoryServiceServer).StoreMemory(ctx, req.(*StoreMemoryRequest))
}
return interceptor(ctx, in, info, handler)
}
func _MemoryService_GetMemories_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetMemoriesRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(MemoryServiceServer).GetMemories(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: MemoryService_GetMemories_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(MemoryServiceServer).GetMemories(ctx, req.(*GetMemoriesRequest))
}
return interceptor(ctx, in, info, handler)
}
func _MemoryService_ProcessMessage_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ProcessMessageRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(MemoryServiceServer).ProcessMessage(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: MemoryService_ProcessMessage_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(MemoryServiceServer).ProcessMessage(ctx, req.(*ProcessMessageRequest))
}
return interceptor(ctx, in, info, handler)
}
func _MemoryService_HealthCheck_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(HealthCheckRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(MemoryServiceServer).HealthCheck(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: MemoryService_HealthCheck_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(MemoryServiceServer).HealthCheck(ctx, req.(*HealthCheckRequest))
}
return interceptor(ctx, in, info, handler)
}
// MemoryService_ServiceDesc is the grpc.ServiceDesc for MemoryService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var MemoryService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "memory.MemoryService",
HandlerType: (*MemoryServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "StoreMemory",
Handler: _MemoryService_StoreMemory_Handler,
},
{
MethodName: "GetMemories",
Handler: _MemoryService_GetMemories_Handler,
},
{
MethodName: "ProcessMessage",
Handler: _MemoryService_ProcessMessage_Handler,
},
{
MethodName: "HealthCheck",
Handler: _MemoryService_HealthCheck_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "memory.proto",
}