l-ai-core-proto/profiles_grpc.pb.go
Kaien e26dc84ccc feat: add UserProfileService, UserMoodHistoryService, UserMessageService protos
Add profiles.proto with UserProfileService and UserMoodHistoryService for
managing Telegram user profiles, avatars, mood history, and memorable moments.
Add messages.proto with UserMessageService for storing and querying chat messages.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-20 22:57:58 +03:00

652 lines
29 KiB
Go

// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.6.1
// - protoc v7.34.0
// source: profiles.proto
package proto
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
emptypb "google.golang.org/protobuf/types/known/emptypb"
)
// 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 (
UserProfileService_GetOrCreateProfile_FullMethodName = "/users.UserProfileService/GetOrCreateProfile"
UserProfileService_GetProfile_FullMethodName = "/users.UserProfileService/GetProfile"
UserProfileService_GetAllProfilesWithMessages_FullMethodName = "/users.UserProfileService/GetAllProfilesWithMessages"
UserProfileService_AddMessageToStats_FullMethodName = "/users.UserProfileService/AddMessageToStats"
UserProfileService_UpdateReactionCount_FullMethodName = "/users.UserProfileService/UpdateReactionCount"
UserProfileService_SetBotAttitude_FullMethodName = "/users.UserProfileService/SetBotAttitude"
UserProfileService_SaveMemorableMoment_FullMethodName = "/users.UserProfileService/SaveMemorableMoment"
UserProfileService_GetMemorableMoments_FullMethodName = "/users.UserProfileService/GetMemorableMoments"
UserProfileService_RecordMoodHistory_FullMethodName = "/users.UserProfileService/RecordMoodHistory"
)
// UserProfileServiceClient is the client API for UserProfileService 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.
//
// UserProfileService manages Telegram user profiles, avatars, and mood history
type UserProfileServiceClient interface {
GetOrCreateProfile(ctx context.Context, in *GetOrCreateProfileRequest, opts ...grpc.CallOption) (*UserProfile, error)
GetProfile(ctx context.Context, in *GetProfileRequest, opts ...grpc.CallOption) (*UserProfile, error)
GetAllProfilesWithMessages(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*GetAllProfilesResponse, error)
AddMessageToStats(ctx context.Context, in *AddMessageToStatsRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
UpdateReactionCount(ctx context.Context, in *UpdateReactionCountRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
SetBotAttitude(ctx context.Context, in *SetBotAttitudeRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
SaveMemorableMoment(ctx context.Context, in *SaveMemorableMomentRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
GetMemorableMoments(ctx context.Context, in *GetMemorableMomentsRequest, opts ...grpc.CallOption) (*GetMemorableMomentsResponse, error)
RecordMoodHistory(ctx context.Context, in *RecordMoodHistoryRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
}
type userProfileServiceClient struct {
cc grpc.ClientConnInterface
}
func NewUserProfileServiceClient(cc grpc.ClientConnInterface) UserProfileServiceClient {
return &userProfileServiceClient{cc}
}
func (c *userProfileServiceClient) GetOrCreateProfile(ctx context.Context, in *GetOrCreateProfileRequest, opts ...grpc.CallOption) (*UserProfile, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(UserProfile)
err := c.cc.Invoke(ctx, UserProfileService_GetOrCreateProfile_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *userProfileServiceClient) GetProfile(ctx context.Context, in *GetProfileRequest, opts ...grpc.CallOption) (*UserProfile, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(UserProfile)
err := c.cc.Invoke(ctx, UserProfileService_GetProfile_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *userProfileServiceClient) GetAllProfilesWithMessages(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*GetAllProfilesResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(GetAllProfilesResponse)
err := c.cc.Invoke(ctx, UserProfileService_GetAllProfilesWithMessages_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *userProfileServiceClient) AddMessageToStats(ctx context.Context, in *AddMessageToStatsRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, UserProfileService_AddMessageToStats_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *userProfileServiceClient) UpdateReactionCount(ctx context.Context, in *UpdateReactionCountRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, UserProfileService_UpdateReactionCount_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *userProfileServiceClient) SetBotAttitude(ctx context.Context, in *SetBotAttitudeRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, UserProfileService_SetBotAttitude_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *userProfileServiceClient) SaveMemorableMoment(ctx context.Context, in *SaveMemorableMomentRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, UserProfileService_SaveMemorableMoment_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *userProfileServiceClient) GetMemorableMoments(ctx context.Context, in *GetMemorableMomentsRequest, opts ...grpc.CallOption) (*GetMemorableMomentsResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(GetMemorableMomentsResponse)
err := c.cc.Invoke(ctx, UserProfileService_GetMemorableMoments_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *userProfileServiceClient) RecordMoodHistory(ctx context.Context, in *RecordMoodHistoryRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, UserProfileService_RecordMoodHistory_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
// UserProfileServiceServer is the server API for UserProfileService service.
// All implementations must embed UnimplementedUserProfileServiceServer
// for forward compatibility.
//
// UserProfileService manages Telegram user profiles, avatars, and mood history
type UserProfileServiceServer interface {
GetOrCreateProfile(context.Context, *GetOrCreateProfileRequest) (*UserProfile, error)
GetProfile(context.Context, *GetProfileRequest) (*UserProfile, error)
GetAllProfilesWithMessages(context.Context, *emptypb.Empty) (*GetAllProfilesResponse, error)
AddMessageToStats(context.Context, *AddMessageToStatsRequest) (*emptypb.Empty, error)
UpdateReactionCount(context.Context, *UpdateReactionCountRequest) (*emptypb.Empty, error)
SetBotAttitude(context.Context, *SetBotAttitudeRequest) (*emptypb.Empty, error)
SaveMemorableMoment(context.Context, *SaveMemorableMomentRequest) (*emptypb.Empty, error)
GetMemorableMoments(context.Context, *GetMemorableMomentsRequest) (*GetMemorableMomentsResponse, error)
RecordMoodHistory(context.Context, *RecordMoodHistoryRequest) (*emptypb.Empty, error)
mustEmbedUnimplementedUserProfileServiceServer()
}
// UnimplementedUserProfileServiceServer 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 UnimplementedUserProfileServiceServer struct{}
func (UnimplementedUserProfileServiceServer) GetOrCreateProfile(context.Context, *GetOrCreateProfileRequest) (*UserProfile, error) {
return nil, status.Error(codes.Unimplemented, "method GetOrCreateProfile not implemented")
}
func (UnimplementedUserProfileServiceServer) GetProfile(context.Context, *GetProfileRequest) (*UserProfile, error) {
return nil, status.Error(codes.Unimplemented, "method GetProfile not implemented")
}
func (UnimplementedUserProfileServiceServer) GetAllProfilesWithMessages(context.Context, *emptypb.Empty) (*GetAllProfilesResponse, error) {
return nil, status.Error(codes.Unimplemented, "method GetAllProfilesWithMessages not implemented")
}
func (UnimplementedUserProfileServiceServer) AddMessageToStats(context.Context, *AddMessageToStatsRequest) (*emptypb.Empty, error) {
return nil, status.Error(codes.Unimplemented, "method AddMessageToStats not implemented")
}
func (UnimplementedUserProfileServiceServer) UpdateReactionCount(context.Context, *UpdateReactionCountRequest) (*emptypb.Empty, error) {
return nil, status.Error(codes.Unimplemented, "method UpdateReactionCount not implemented")
}
func (UnimplementedUserProfileServiceServer) SetBotAttitude(context.Context, *SetBotAttitudeRequest) (*emptypb.Empty, error) {
return nil, status.Error(codes.Unimplemented, "method SetBotAttitude not implemented")
}
func (UnimplementedUserProfileServiceServer) SaveMemorableMoment(context.Context, *SaveMemorableMomentRequest) (*emptypb.Empty, error) {
return nil, status.Error(codes.Unimplemented, "method SaveMemorableMoment not implemented")
}
func (UnimplementedUserProfileServiceServer) GetMemorableMoments(context.Context, *GetMemorableMomentsRequest) (*GetMemorableMomentsResponse, error) {
return nil, status.Error(codes.Unimplemented, "method GetMemorableMoments not implemented")
}
func (UnimplementedUserProfileServiceServer) RecordMoodHistory(context.Context, *RecordMoodHistoryRequest) (*emptypb.Empty, error) {
return nil, status.Error(codes.Unimplemented, "method RecordMoodHistory not implemented")
}
func (UnimplementedUserProfileServiceServer) mustEmbedUnimplementedUserProfileServiceServer() {}
func (UnimplementedUserProfileServiceServer) testEmbeddedByValue() {}
// UnsafeUserProfileServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to UserProfileServiceServer will
// result in compilation errors.
type UnsafeUserProfileServiceServer interface {
mustEmbedUnimplementedUserProfileServiceServer()
}
func RegisterUserProfileServiceServer(s grpc.ServiceRegistrar, srv UserProfileServiceServer) {
// If the following call panics, it indicates UnimplementedUserProfileServiceServer 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(&UserProfileService_ServiceDesc, srv)
}
func _UserProfileService_GetOrCreateProfile_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetOrCreateProfileRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(UserProfileServiceServer).GetOrCreateProfile(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: UserProfileService_GetOrCreateProfile_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(UserProfileServiceServer).GetOrCreateProfile(ctx, req.(*GetOrCreateProfileRequest))
}
return interceptor(ctx, in, info, handler)
}
func _UserProfileService_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.(UserProfileServiceServer).GetProfile(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: UserProfileService_GetProfile_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(UserProfileServiceServer).GetProfile(ctx, req.(*GetProfileRequest))
}
return interceptor(ctx, in, info, handler)
}
func _UserProfileService_GetAllProfilesWithMessages_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(emptypb.Empty)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(UserProfileServiceServer).GetAllProfilesWithMessages(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: UserProfileService_GetAllProfilesWithMessages_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(UserProfileServiceServer).GetAllProfilesWithMessages(ctx, req.(*emptypb.Empty))
}
return interceptor(ctx, in, info, handler)
}
func _UserProfileService_AddMessageToStats_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(AddMessageToStatsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(UserProfileServiceServer).AddMessageToStats(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: UserProfileService_AddMessageToStats_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(UserProfileServiceServer).AddMessageToStats(ctx, req.(*AddMessageToStatsRequest))
}
return interceptor(ctx, in, info, handler)
}
func _UserProfileService_UpdateReactionCount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(UpdateReactionCountRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(UserProfileServiceServer).UpdateReactionCount(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: UserProfileService_UpdateReactionCount_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(UserProfileServiceServer).UpdateReactionCount(ctx, req.(*UpdateReactionCountRequest))
}
return interceptor(ctx, in, info, handler)
}
func _UserProfileService_SetBotAttitude_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(SetBotAttitudeRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(UserProfileServiceServer).SetBotAttitude(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: UserProfileService_SetBotAttitude_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(UserProfileServiceServer).SetBotAttitude(ctx, req.(*SetBotAttitudeRequest))
}
return interceptor(ctx, in, info, handler)
}
func _UserProfileService_SaveMemorableMoment_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(SaveMemorableMomentRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(UserProfileServiceServer).SaveMemorableMoment(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: UserProfileService_SaveMemorableMoment_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(UserProfileServiceServer).SaveMemorableMoment(ctx, req.(*SaveMemorableMomentRequest))
}
return interceptor(ctx, in, info, handler)
}
func _UserProfileService_GetMemorableMoments_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetMemorableMomentsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(UserProfileServiceServer).GetMemorableMoments(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: UserProfileService_GetMemorableMoments_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(UserProfileServiceServer).GetMemorableMoments(ctx, req.(*GetMemorableMomentsRequest))
}
return interceptor(ctx, in, info, handler)
}
func _UserProfileService_RecordMoodHistory_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(RecordMoodHistoryRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(UserProfileServiceServer).RecordMoodHistory(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: UserProfileService_RecordMoodHistory_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(UserProfileServiceServer).RecordMoodHistory(ctx, req.(*RecordMoodHistoryRequest))
}
return interceptor(ctx, in, info, handler)
}
// UserProfileService_ServiceDesc is the grpc.ServiceDesc for UserProfileService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var UserProfileService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "users.UserProfileService",
HandlerType: (*UserProfileServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "GetOrCreateProfile",
Handler: _UserProfileService_GetOrCreateProfile_Handler,
},
{
MethodName: "GetProfile",
Handler: _UserProfileService_GetProfile_Handler,
},
{
MethodName: "GetAllProfilesWithMessages",
Handler: _UserProfileService_GetAllProfilesWithMessages_Handler,
},
{
MethodName: "AddMessageToStats",
Handler: _UserProfileService_AddMessageToStats_Handler,
},
{
MethodName: "UpdateReactionCount",
Handler: _UserProfileService_UpdateReactionCount_Handler,
},
{
MethodName: "SetBotAttitude",
Handler: _UserProfileService_SetBotAttitude_Handler,
},
{
MethodName: "SaveMemorableMoment",
Handler: _UserProfileService_SaveMemorableMoment_Handler,
},
{
MethodName: "GetMemorableMoments",
Handler: _UserProfileService_GetMemorableMoments_Handler,
},
{
MethodName: "RecordMoodHistory",
Handler: _UserProfileService_RecordMoodHistory_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "profiles.proto",
}
const (
UserMoodHistoryService_GetMoodHistoryByUser_FullMethodName = "/users.UserMoodHistoryService/GetMoodHistoryByUser"
UserMoodHistoryService_GetMoodHistoryByTimeRange_FullMethodName = "/users.UserMoodHistoryService/GetMoodHistoryByTimeRange"
UserMoodHistoryService_GetRecentMoodHistory_FullMethodName = "/users.UserMoodHistoryService/GetRecentMoodHistory"
UserMoodHistoryService_GetLastMoodBeforeTime_FullMethodName = "/users.UserMoodHistoryService/GetLastMoodBeforeTime"
)
// UserMoodHistoryServiceClient is the client API for UserMoodHistoryService 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.
//
// UserMoodHistoryService provides mood history queries
type UserMoodHistoryServiceClient interface {
GetMoodHistoryByUser(ctx context.Context, in *GetMoodHistoryByUserRequest, opts ...grpc.CallOption) (*GetMoodHistoryResponse, error)
GetMoodHistoryByTimeRange(ctx context.Context, in *GetMoodHistoryByTimeRangeRequest, opts ...grpc.CallOption) (*GetMoodHistoryResponse, error)
GetRecentMoodHistory(ctx context.Context, in *GetRecentMoodHistoryRequest, opts ...grpc.CallOption) (*GetMoodHistoryResponse, error)
GetLastMoodBeforeTime(ctx context.Context, in *GetLastMoodBeforeTimeRequest, opts ...grpc.CallOption) (*GetMoodHistoryResponse, error)
}
type userMoodHistoryServiceClient struct {
cc grpc.ClientConnInterface
}
func NewUserMoodHistoryServiceClient(cc grpc.ClientConnInterface) UserMoodHistoryServiceClient {
return &userMoodHistoryServiceClient{cc}
}
func (c *userMoodHistoryServiceClient) GetMoodHistoryByUser(ctx context.Context, in *GetMoodHistoryByUserRequest, opts ...grpc.CallOption) (*GetMoodHistoryResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(GetMoodHistoryResponse)
err := c.cc.Invoke(ctx, UserMoodHistoryService_GetMoodHistoryByUser_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *userMoodHistoryServiceClient) GetMoodHistoryByTimeRange(ctx context.Context, in *GetMoodHistoryByTimeRangeRequest, opts ...grpc.CallOption) (*GetMoodHistoryResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(GetMoodHistoryResponse)
err := c.cc.Invoke(ctx, UserMoodHistoryService_GetMoodHistoryByTimeRange_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *userMoodHistoryServiceClient) GetRecentMoodHistory(ctx context.Context, in *GetRecentMoodHistoryRequest, opts ...grpc.CallOption) (*GetMoodHistoryResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(GetMoodHistoryResponse)
err := c.cc.Invoke(ctx, UserMoodHistoryService_GetRecentMoodHistory_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *userMoodHistoryServiceClient) GetLastMoodBeforeTime(ctx context.Context, in *GetLastMoodBeforeTimeRequest, opts ...grpc.CallOption) (*GetMoodHistoryResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(GetMoodHistoryResponse)
err := c.cc.Invoke(ctx, UserMoodHistoryService_GetLastMoodBeforeTime_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
// UserMoodHistoryServiceServer is the server API for UserMoodHistoryService service.
// All implementations must embed UnimplementedUserMoodHistoryServiceServer
// for forward compatibility.
//
// UserMoodHistoryService provides mood history queries
type UserMoodHistoryServiceServer interface {
GetMoodHistoryByUser(context.Context, *GetMoodHistoryByUserRequest) (*GetMoodHistoryResponse, error)
GetMoodHistoryByTimeRange(context.Context, *GetMoodHistoryByTimeRangeRequest) (*GetMoodHistoryResponse, error)
GetRecentMoodHistory(context.Context, *GetRecentMoodHistoryRequest) (*GetMoodHistoryResponse, error)
GetLastMoodBeforeTime(context.Context, *GetLastMoodBeforeTimeRequest) (*GetMoodHistoryResponse, error)
mustEmbedUnimplementedUserMoodHistoryServiceServer()
}
// UnimplementedUserMoodHistoryServiceServer 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 UnimplementedUserMoodHistoryServiceServer struct{}
func (UnimplementedUserMoodHistoryServiceServer) GetMoodHistoryByUser(context.Context, *GetMoodHistoryByUserRequest) (*GetMoodHistoryResponse, error) {
return nil, status.Error(codes.Unimplemented, "method GetMoodHistoryByUser not implemented")
}
func (UnimplementedUserMoodHistoryServiceServer) GetMoodHistoryByTimeRange(context.Context, *GetMoodHistoryByTimeRangeRequest) (*GetMoodHistoryResponse, error) {
return nil, status.Error(codes.Unimplemented, "method GetMoodHistoryByTimeRange not implemented")
}
func (UnimplementedUserMoodHistoryServiceServer) GetRecentMoodHistory(context.Context, *GetRecentMoodHistoryRequest) (*GetMoodHistoryResponse, error) {
return nil, status.Error(codes.Unimplemented, "method GetRecentMoodHistory not implemented")
}
func (UnimplementedUserMoodHistoryServiceServer) GetLastMoodBeforeTime(context.Context, *GetLastMoodBeforeTimeRequest) (*GetMoodHistoryResponse, error) {
return nil, status.Error(codes.Unimplemented, "method GetLastMoodBeforeTime not implemented")
}
func (UnimplementedUserMoodHistoryServiceServer) mustEmbedUnimplementedUserMoodHistoryServiceServer() {
}
func (UnimplementedUserMoodHistoryServiceServer) testEmbeddedByValue() {}
// UnsafeUserMoodHistoryServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to UserMoodHistoryServiceServer will
// result in compilation errors.
type UnsafeUserMoodHistoryServiceServer interface {
mustEmbedUnimplementedUserMoodHistoryServiceServer()
}
func RegisterUserMoodHistoryServiceServer(s grpc.ServiceRegistrar, srv UserMoodHistoryServiceServer) {
// If the following call panics, it indicates UnimplementedUserMoodHistoryServiceServer 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(&UserMoodHistoryService_ServiceDesc, srv)
}
func _UserMoodHistoryService_GetMoodHistoryByUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetMoodHistoryByUserRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(UserMoodHistoryServiceServer).GetMoodHistoryByUser(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: UserMoodHistoryService_GetMoodHistoryByUser_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(UserMoodHistoryServiceServer).GetMoodHistoryByUser(ctx, req.(*GetMoodHistoryByUserRequest))
}
return interceptor(ctx, in, info, handler)
}
func _UserMoodHistoryService_GetMoodHistoryByTimeRange_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetMoodHistoryByTimeRangeRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(UserMoodHistoryServiceServer).GetMoodHistoryByTimeRange(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: UserMoodHistoryService_GetMoodHistoryByTimeRange_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(UserMoodHistoryServiceServer).GetMoodHistoryByTimeRange(ctx, req.(*GetMoodHistoryByTimeRangeRequest))
}
return interceptor(ctx, in, info, handler)
}
func _UserMoodHistoryService_GetRecentMoodHistory_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetRecentMoodHistoryRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(UserMoodHistoryServiceServer).GetRecentMoodHistory(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: UserMoodHistoryService_GetRecentMoodHistory_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(UserMoodHistoryServiceServer).GetRecentMoodHistory(ctx, req.(*GetRecentMoodHistoryRequest))
}
return interceptor(ctx, in, info, handler)
}
func _UserMoodHistoryService_GetLastMoodBeforeTime_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetLastMoodBeforeTimeRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(UserMoodHistoryServiceServer).GetLastMoodBeforeTime(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: UserMoodHistoryService_GetLastMoodBeforeTime_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(UserMoodHistoryServiceServer).GetLastMoodBeforeTime(ctx, req.(*GetLastMoodBeforeTimeRequest))
}
return interceptor(ctx, in, info, handler)
}
// UserMoodHistoryService_ServiceDesc is the grpc.ServiceDesc for UserMoodHistoryService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var UserMoodHistoryService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "users.UserMoodHistoryService",
HandlerType: (*UserMoodHistoryServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "GetMoodHistoryByUser",
Handler: _UserMoodHistoryService_GetMoodHistoryByUser_Handler,
},
{
MethodName: "GetMoodHistoryByTimeRange",
Handler: _UserMoodHistoryService_GetMoodHistoryByTimeRange_Handler,
},
{
MethodName: "GetRecentMoodHistory",
Handler: _UserMoodHistoryService_GetRecentMoodHistory_Handler,
},
{
MethodName: "GetLastMoodBeforeTime",
Handler: _UserMoodHistoryService_GetLastMoodBeforeTime_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "profiles.proto",
}