hyapp-server/api/proto/activity/v1/activity_grpc.pb.go
2026-05-06 21:22:39 +08:00

498 lines
22 KiB
Go

// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.5.1
// - protoc v5.27.3
// source: proto/activity/v1/activity.proto
package activityv1
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 (
ActivityService_PingActivity_FullMethodName = "/hyapp.activity.v1.ActivityService/PingActivity"
ActivityService_GetActivityStatus_FullMethodName = "/hyapp.activity.v1.ActivityService/GetActivityStatus"
)
// ActivityServiceClient is the client API for ActivityService 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.
//
// ActivityService 只暴露同步查询,不把事件消费伪装成 RPC。
type ActivityServiceClient interface {
PingActivity(ctx context.Context, in *PingActivityRequest, opts ...grpc.CallOption) (*PingActivityResponse, error)
GetActivityStatus(ctx context.Context, in *GetActivityStatusRequest, opts ...grpc.CallOption) (*GetActivityStatusResponse, error)
}
type activityServiceClient struct {
cc grpc.ClientConnInterface
}
func NewActivityServiceClient(cc grpc.ClientConnInterface) ActivityServiceClient {
return &activityServiceClient{cc}
}
func (c *activityServiceClient) PingActivity(ctx context.Context, in *PingActivityRequest, opts ...grpc.CallOption) (*PingActivityResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(PingActivityResponse)
err := c.cc.Invoke(ctx, ActivityService_PingActivity_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *activityServiceClient) GetActivityStatus(ctx context.Context, in *GetActivityStatusRequest, opts ...grpc.CallOption) (*GetActivityStatusResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(GetActivityStatusResponse)
err := c.cc.Invoke(ctx, ActivityService_GetActivityStatus_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
// ActivityServiceServer is the server API for ActivityService service.
// All implementations must embed UnimplementedActivityServiceServer
// for forward compatibility.
//
// ActivityService 只暴露同步查询,不把事件消费伪装成 RPC。
type ActivityServiceServer interface {
PingActivity(context.Context, *PingActivityRequest) (*PingActivityResponse, error)
GetActivityStatus(context.Context, *GetActivityStatusRequest) (*GetActivityStatusResponse, error)
mustEmbedUnimplementedActivityServiceServer()
}
// UnimplementedActivityServiceServer 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 UnimplementedActivityServiceServer struct{}
func (UnimplementedActivityServiceServer) PingActivity(context.Context, *PingActivityRequest) (*PingActivityResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method PingActivity not implemented")
}
func (UnimplementedActivityServiceServer) GetActivityStatus(context.Context, *GetActivityStatusRequest) (*GetActivityStatusResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetActivityStatus not implemented")
}
func (UnimplementedActivityServiceServer) mustEmbedUnimplementedActivityServiceServer() {}
func (UnimplementedActivityServiceServer) testEmbeddedByValue() {}
// UnsafeActivityServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to ActivityServiceServer will
// result in compilation errors.
type UnsafeActivityServiceServer interface {
mustEmbedUnimplementedActivityServiceServer()
}
func RegisterActivityServiceServer(s grpc.ServiceRegistrar, srv ActivityServiceServer) {
// If the following call pancis, it indicates UnimplementedActivityServiceServer 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(&ActivityService_ServiceDesc, srv)
}
func _ActivityService_PingActivity_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(PingActivityRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ActivityServiceServer).PingActivity(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: ActivityService_PingActivity_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ActivityServiceServer).PingActivity(ctx, req.(*PingActivityRequest))
}
return interceptor(ctx, in, info, handler)
}
func _ActivityService_GetActivityStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetActivityStatusRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ActivityServiceServer).GetActivityStatus(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: ActivityService_GetActivityStatus_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ActivityServiceServer).GetActivityStatus(ctx, req.(*GetActivityStatusRequest))
}
return interceptor(ctx, in, info, handler)
}
// ActivityService_ServiceDesc is the grpc.ServiceDesc for ActivityService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var ActivityService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "hyapp.activity.v1.ActivityService",
HandlerType: (*ActivityServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "PingActivity",
Handler: _ActivityService_PingActivity_Handler,
},
{
MethodName: "GetActivityStatus",
Handler: _ActivityService_GetActivityStatus_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "proto/activity/v1/activity.proto",
}
const (
MessageInboxService_ListMessageTabs_FullMethodName = "/hyapp.activity.v1.MessageInboxService/ListMessageTabs"
MessageInboxService_ListInboxMessages_FullMethodName = "/hyapp.activity.v1.MessageInboxService/ListInboxMessages"
MessageInboxService_MarkInboxMessageRead_FullMethodName = "/hyapp.activity.v1.MessageInboxService/MarkInboxMessageRead"
MessageInboxService_MarkInboxSectionRead_FullMethodName = "/hyapp.activity.v1.MessageInboxService/MarkInboxSectionRead"
MessageInboxService_DeleteInboxMessage_FullMethodName = "/hyapp.activity.v1.MessageInboxService/DeleteInboxMessage"
MessageInboxService_CreateInboxMessage_FullMethodName = "/hyapp.activity.v1.MessageInboxService/CreateInboxMessage"
MessageInboxService_CreateFanoutJob_FullMethodName = "/hyapp.activity.v1.MessageInboxService/CreateFanoutJob"
)
// MessageInboxServiceClient is the client API for MessageInboxService 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.
//
// MessageInboxService 拥有 App system/activity 个人 inbox 事实。
type MessageInboxServiceClient interface {
ListMessageTabs(ctx context.Context, in *ListMessageTabsRequest, opts ...grpc.CallOption) (*ListMessageTabsResponse, error)
ListInboxMessages(ctx context.Context, in *ListInboxMessagesRequest, opts ...grpc.CallOption) (*ListInboxMessagesResponse, error)
MarkInboxMessageRead(ctx context.Context, in *MarkInboxMessageReadRequest, opts ...grpc.CallOption) (*MarkInboxMessageReadResponse, error)
MarkInboxSectionRead(ctx context.Context, in *MarkInboxSectionReadRequest, opts ...grpc.CallOption) (*MarkInboxSectionReadResponse, error)
DeleteInboxMessage(ctx context.Context, in *DeleteInboxMessageRequest, opts ...grpc.CallOption) (*DeleteInboxMessageResponse, error)
CreateInboxMessage(ctx context.Context, in *CreateInboxMessageRequest, opts ...grpc.CallOption) (*CreateInboxMessageResponse, error)
CreateFanoutJob(ctx context.Context, in *CreateFanoutJobRequest, opts ...grpc.CallOption) (*CreateFanoutJobResponse, error)
}
type messageInboxServiceClient struct {
cc grpc.ClientConnInterface
}
func NewMessageInboxServiceClient(cc grpc.ClientConnInterface) MessageInboxServiceClient {
return &messageInboxServiceClient{cc}
}
func (c *messageInboxServiceClient) ListMessageTabs(ctx context.Context, in *ListMessageTabsRequest, opts ...grpc.CallOption) (*ListMessageTabsResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(ListMessageTabsResponse)
err := c.cc.Invoke(ctx, MessageInboxService_ListMessageTabs_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *messageInboxServiceClient) ListInboxMessages(ctx context.Context, in *ListInboxMessagesRequest, opts ...grpc.CallOption) (*ListInboxMessagesResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(ListInboxMessagesResponse)
err := c.cc.Invoke(ctx, MessageInboxService_ListInboxMessages_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *messageInboxServiceClient) MarkInboxMessageRead(ctx context.Context, in *MarkInboxMessageReadRequest, opts ...grpc.CallOption) (*MarkInboxMessageReadResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(MarkInboxMessageReadResponse)
err := c.cc.Invoke(ctx, MessageInboxService_MarkInboxMessageRead_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *messageInboxServiceClient) MarkInboxSectionRead(ctx context.Context, in *MarkInboxSectionReadRequest, opts ...grpc.CallOption) (*MarkInboxSectionReadResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(MarkInboxSectionReadResponse)
err := c.cc.Invoke(ctx, MessageInboxService_MarkInboxSectionRead_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *messageInboxServiceClient) DeleteInboxMessage(ctx context.Context, in *DeleteInboxMessageRequest, opts ...grpc.CallOption) (*DeleteInboxMessageResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(DeleteInboxMessageResponse)
err := c.cc.Invoke(ctx, MessageInboxService_DeleteInboxMessage_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *messageInboxServiceClient) CreateInboxMessage(ctx context.Context, in *CreateInboxMessageRequest, opts ...grpc.CallOption) (*CreateInboxMessageResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(CreateInboxMessageResponse)
err := c.cc.Invoke(ctx, MessageInboxService_CreateInboxMessage_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *messageInboxServiceClient) CreateFanoutJob(ctx context.Context, in *CreateFanoutJobRequest, opts ...grpc.CallOption) (*CreateFanoutJobResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(CreateFanoutJobResponse)
err := c.cc.Invoke(ctx, MessageInboxService_CreateFanoutJob_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
// MessageInboxServiceServer is the server API for MessageInboxService service.
// All implementations must embed UnimplementedMessageInboxServiceServer
// for forward compatibility.
//
// MessageInboxService 拥有 App system/activity 个人 inbox 事实。
type MessageInboxServiceServer interface {
ListMessageTabs(context.Context, *ListMessageTabsRequest) (*ListMessageTabsResponse, error)
ListInboxMessages(context.Context, *ListInboxMessagesRequest) (*ListInboxMessagesResponse, error)
MarkInboxMessageRead(context.Context, *MarkInboxMessageReadRequest) (*MarkInboxMessageReadResponse, error)
MarkInboxSectionRead(context.Context, *MarkInboxSectionReadRequest) (*MarkInboxSectionReadResponse, error)
DeleteInboxMessage(context.Context, *DeleteInboxMessageRequest) (*DeleteInboxMessageResponse, error)
CreateInboxMessage(context.Context, *CreateInboxMessageRequest) (*CreateInboxMessageResponse, error)
CreateFanoutJob(context.Context, *CreateFanoutJobRequest) (*CreateFanoutJobResponse, error)
mustEmbedUnimplementedMessageInboxServiceServer()
}
// UnimplementedMessageInboxServiceServer 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 UnimplementedMessageInboxServiceServer struct{}
func (UnimplementedMessageInboxServiceServer) ListMessageTabs(context.Context, *ListMessageTabsRequest) (*ListMessageTabsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ListMessageTabs not implemented")
}
func (UnimplementedMessageInboxServiceServer) ListInboxMessages(context.Context, *ListInboxMessagesRequest) (*ListInboxMessagesResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ListInboxMessages not implemented")
}
func (UnimplementedMessageInboxServiceServer) MarkInboxMessageRead(context.Context, *MarkInboxMessageReadRequest) (*MarkInboxMessageReadResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method MarkInboxMessageRead not implemented")
}
func (UnimplementedMessageInboxServiceServer) MarkInboxSectionRead(context.Context, *MarkInboxSectionReadRequest) (*MarkInboxSectionReadResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method MarkInboxSectionRead not implemented")
}
func (UnimplementedMessageInboxServiceServer) DeleteInboxMessage(context.Context, *DeleteInboxMessageRequest) (*DeleteInboxMessageResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method DeleteInboxMessage not implemented")
}
func (UnimplementedMessageInboxServiceServer) CreateInboxMessage(context.Context, *CreateInboxMessageRequest) (*CreateInboxMessageResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method CreateInboxMessage not implemented")
}
func (UnimplementedMessageInboxServiceServer) CreateFanoutJob(context.Context, *CreateFanoutJobRequest) (*CreateFanoutJobResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method CreateFanoutJob not implemented")
}
func (UnimplementedMessageInboxServiceServer) mustEmbedUnimplementedMessageInboxServiceServer() {}
func (UnimplementedMessageInboxServiceServer) testEmbeddedByValue() {}
// UnsafeMessageInboxServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to MessageInboxServiceServer will
// result in compilation errors.
type UnsafeMessageInboxServiceServer interface {
mustEmbedUnimplementedMessageInboxServiceServer()
}
func RegisterMessageInboxServiceServer(s grpc.ServiceRegistrar, srv MessageInboxServiceServer) {
// If the following call pancis, it indicates UnimplementedMessageInboxServiceServer 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(&MessageInboxService_ServiceDesc, srv)
}
func _MessageInboxService_ListMessageTabs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ListMessageTabsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(MessageInboxServiceServer).ListMessageTabs(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: MessageInboxService_ListMessageTabs_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(MessageInboxServiceServer).ListMessageTabs(ctx, req.(*ListMessageTabsRequest))
}
return interceptor(ctx, in, info, handler)
}
func _MessageInboxService_ListInboxMessages_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ListInboxMessagesRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(MessageInboxServiceServer).ListInboxMessages(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: MessageInboxService_ListInboxMessages_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(MessageInboxServiceServer).ListInboxMessages(ctx, req.(*ListInboxMessagesRequest))
}
return interceptor(ctx, in, info, handler)
}
func _MessageInboxService_MarkInboxMessageRead_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(MarkInboxMessageReadRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(MessageInboxServiceServer).MarkInboxMessageRead(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: MessageInboxService_MarkInboxMessageRead_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(MessageInboxServiceServer).MarkInboxMessageRead(ctx, req.(*MarkInboxMessageReadRequest))
}
return interceptor(ctx, in, info, handler)
}
func _MessageInboxService_MarkInboxSectionRead_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(MarkInboxSectionReadRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(MessageInboxServiceServer).MarkInboxSectionRead(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: MessageInboxService_MarkInboxSectionRead_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(MessageInboxServiceServer).MarkInboxSectionRead(ctx, req.(*MarkInboxSectionReadRequest))
}
return interceptor(ctx, in, info, handler)
}
func _MessageInboxService_DeleteInboxMessage_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(DeleteInboxMessageRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(MessageInboxServiceServer).DeleteInboxMessage(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: MessageInboxService_DeleteInboxMessage_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(MessageInboxServiceServer).DeleteInboxMessage(ctx, req.(*DeleteInboxMessageRequest))
}
return interceptor(ctx, in, info, handler)
}
func _MessageInboxService_CreateInboxMessage_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(CreateInboxMessageRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(MessageInboxServiceServer).CreateInboxMessage(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: MessageInboxService_CreateInboxMessage_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(MessageInboxServiceServer).CreateInboxMessage(ctx, req.(*CreateInboxMessageRequest))
}
return interceptor(ctx, in, info, handler)
}
func _MessageInboxService_CreateFanoutJob_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(CreateFanoutJobRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(MessageInboxServiceServer).CreateFanoutJob(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: MessageInboxService_CreateFanoutJob_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(MessageInboxServiceServer).CreateFanoutJob(ctx, req.(*CreateFanoutJobRequest))
}
return interceptor(ctx, in, info, handler)
}
// MessageInboxService_ServiceDesc is the grpc.ServiceDesc for MessageInboxService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var MessageInboxService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "hyapp.activity.v1.MessageInboxService",
HandlerType: (*MessageInboxServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "ListMessageTabs",
Handler: _MessageInboxService_ListMessageTabs_Handler,
},
{
MethodName: "ListInboxMessages",
Handler: _MessageInboxService_ListInboxMessages_Handler,
},
{
MethodName: "MarkInboxMessageRead",
Handler: _MessageInboxService_MarkInboxMessageRead_Handler,
},
{
MethodName: "MarkInboxSectionRead",
Handler: _MessageInboxService_MarkInboxSectionRead_Handler,
},
{
MethodName: "DeleteInboxMessage",
Handler: _MessageInboxService_DeleteInboxMessage_Handler,
},
{
MethodName: "CreateInboxMessage",
Handler: _MessageInboxService_CreateInboxMessage_Handler,
},
{
MethodName: "CreateFanoutJob",
Handler: _MessageInboxService_CreateFanoutJob_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "proto/activity/v1/activity.proto",
}