mirror of
https://github.com/mautrix/signal.git
synced 2026-09-17 08:12:05 -04:00
490 lines
22 KiB
Go
Generated
490 lines
22 KiB
Go
Generated
//
|
|
// Copyright 2025 Signal Messenger, LLC
|
|
// SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
|
// versions:
|
|
// - protoc-gen-go-grpc v1.6.2
|
|
// - protoc v7.34.1
|
|
// source: org/signal/chat/messages.proto
|
|
|
|
package messages
|
|
|
|
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 (
|
|
Messages_SendMessage_FullMethodName = "/org.signal.chat.messages.Messages/SendMessage"
|
|
Messages_SendSyncMessage_FullMethodName = "/org.signal.chat.messages.Messages/SendSyncMessage"
|
|
Messages_GetMessages_FullMethodName = "/org.signal.chat.messages.Messages/GetMessages"
|
|
)
|
|
|
|
// MessagesClient is the client API for Messages 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.
|
|
//
|
|
// Provides methods for sending "unsealed sender" messages.
|
|
type MessagesClient interface {
|
|
// Sends an "unsealed sender" message to all devices linked to a single
|
|
// destination account.
|
|
//
|
|
// The destination account must not be the same as the authenticated caller.
|
|
// Callers should use `SendSyncMessage` to send messages to themselves.
|
|
SendMessage(ctx context.Context, in *SendAuthenticatedSenderMessageRequest, opts ...grpc.CallOption) (*SendMessageAuthenticatedSenderResponse, error)
|
|
// Sends a "sync" message to all other devices linked to the authenticated
|
|
// sender's account.
|
|
SendSyncMessage(ctx context.Context, in *SendSyncMessageRequest, opts ...grpc.CallOption) (*SendMessageAuthenticatedSenderResponse, error)
|
|
// Retrieve messages for the authenticated device. When the caller receives
|
|
// and successfully processes a message returned in a GetMessagesResponse they
|
|
// must send a corresponding GetMessagesRequest indicating that the message
|
|
// has been processed (an ack). Acks should only be sent for messages
|
|
// delivered via the currently open RPC.
|
|
//
|
|
// Only the first GetMessagesRequest may contain request parameters that
|
|
// configure the stream. The first request must not contain an ack.
|
|
//
|
|
// The server will keep the stream open until the client disconnects. Only
|
|
// one GetMessages stream may be open per device. If a second GetMessages
|
|
// stream is opened, the server may terminate any of the streams with
|
|
// a STREAM_CLOSED error reason. A GetMessagesStreamClosed message will be
|
|
// present in the error details.
|
|
GetMessages(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[GetMessagesRequest, GetMessagesResponse], error)
|
|
}
|
|
|
|
type messagesClient struct {
|
|
cc grpc.ClientConnInterface
|
|
}
|
|
|
|
func NewMessagesClient(cc grpc.ClientConnInterface) MessagesClient {
|
|
return &messagesClient{cc}
|
|
}
|
|
|
|
func (c *messagesClient) SendMessage(ctx context.Context, in *SendAuthenticatedSenderMessageRequest, opts ...grpc.CallOption) (*SendMessageAuthenticatedSenderResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(SendMessageAuthenticatedSenderResponse)
|
|
err := c.cc.Invoke(ctx, Messages_SendMessage_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *messagesClient) SendSyncMessage(ctx context.Context, in *SendSyncMessageRequest, opts ...grpc.CallOption) (*SendMessageAuthenticatedSenderResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(SendMessageAuthenticatedSenderResponse)
|
|
err := c.cc.Invoke(ctx, Messages_SendSyncMessage_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *messagesClient) GetMessages(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[GetMessagesRequest, GetMessagesResponse], error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
stream, err := c.cc.NewStream(ctx, &Messages_ServiceDesc.Streams[0], Messages_GetMessages_FullMethodName, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
x := &grpc.GenericClientStream[GetMessagesRequest, GetMessagesResponse]{ClientStream: stream}
|
|
return x, nil
|
|
}
|
|
|
|
// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
|
|
type Messages_GetMessagesClient = grpc.BidiStreamingClient[GetMessagesRequest, GetMessagesResponse]
|
|
|
|
// MessagesServer is the server API for Messages service.
|
|
// All implementations must embed UnimplementedMessagesServer
|
|
// for forward compatibility.
|
|
//
|
|
// Provides methods for sending "unsealed sender" messages.
|
|
type MessagesServer interface {
|
|
// Sends an "unsealed sender" message to all devices linked to a single
|
|
// destination account.
|
|
//
|
|
// The destination account must not be the same as the authenticated caller.
|
|
// Callers should use `SendSyncMessage` to send messages to themselves.
|
|
SendMessage(context.Context, *SendAuthenticatedSenderMessageRequest) (*SendMessageAuthenticatedSenderResponse, error)
|
|
// Sends a "sync" message to all other devices linked to the authenticated
|
|
// sender's account.
|
|
SendSyncMessage(context.Context, *SendSyncMessageRequest) (*SendMessageAuthenticatedSenderResponse, error)
|
|
// Retrieve messages for the authenticated device. When the caller receives
|
|
// and successfully processes a message returned in a GetMessagesResponse they
|
|
// must send a corresponding GetMessagesRequest indicating that the message
|
|
// has been processed (an ack). Acks should only be sent for messages
|
|
// delivered via the currently open RPC.
|
|
//
|
|
// Only the first GetMessagesRequest may contain request parameters that
|
|
// configure the stream. The first request must not contain an ack.
|
|
//
|
|
// The server will keep the stream open until the client disconnects. Only
|
|
// one GetMessages stream may be open per device. If a second GetMessages
|
|
// stream is opened, the server may terminate any of the streams with
|
|
// a STREAM_CLOSED error reason. A GetMessagesStreamClosed message will be
|
|
// present in the error details.
|
|
GetMessages(grpc.BidiStreamingServer[GetMessagesRequest, GetMessagesResponse]) error
|
|
mustEmbedUnimplementedMessagesServer()
|
|
}
|
|
|
|
// UnimplementedMessagesServer 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 UnimplementedMessagesServer struct{}
|
|
|
|
func (UnimplementedMessagesServer) SendMessage(context.Context, *SendAuthenticatedSenderMessageRequest) (*SendMessageAuthenticatedSenderResponse, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method SendMessage not implemented")
|
|
}
|
|
func (UnimplementedMessagesServer) SendSyncMessage(context.Context, *SendSyncMessageRequest) (*SendMessageAuthenticatedSenderResponse, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method SendSyncMessage not implemented")
|
|
}
|
|
func (UnimplementedMessagesServer) GetMessages(grpc.BidiStreamingServer[GetMessagesRequest, GetMessagesResponse]) error {
|
|
return status.Error(codes.Unimplemented, "method GetMessages not implemented")
|
|
}
|
|
func (UnimplementedMessagesServer) mustEmbedUnimplementedMessagesServer() {}
|
|
func (UnimplementedMessagesServer) testEmbeddedByValue() {}
|
|
|
|
// UnsafeMessagesServer may be embedded to opt out of forward compatibility for this service.
|
|
// Use of this interface is not recommended, as added methods to MessagesServer will
|
|
// result in compilation errors.
|
|
type UnsafeMessagesServer interface {
|
|
mustEmbedUnimplementedMessagesServer()
|
|
}
|
|
|
|
func RegisterMessagesServer(s grpc.ServiceRegistrar, srv MessagesServer) {
|
|
// If the following call panics, it indicates UnimplementedMessagesServer 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(&Messages_ServiceDesc, srv)
|
|
}
|
|
|
|
func _Messages_SendMessage_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(SendAuthenticatedSenderMessageRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(MessagesServer).SendMessage(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: Messages_SendMessage_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(MessagesServer).SendMessage(ctx, req.(*SendAuthenticatedSenderMessageRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Messages_SendSyncMessage_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(SendSyncMessageRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(MessagesServer).SendSyncMessage(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: Messages_SendSyncMessage_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(MessagesServer).SendSyncMessage(ctx, req.(*SendSyncMessageRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Messages_GetMessages_Handler(srv interface{}, stream grpc.ServerStream) error {
|
|
return srv.(MessagesServer).GetMessages(&grpc.GenericServerStream[GetMessagesRequest, GetMessagesResponse]{ServerStream: stream})
|
|
}
|
|
|
|
// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
|
|
type Messages_GetMessagesServer = grpc.BidiStreamingServer[GetMessagesRequest, GetMessagesResponse]
|
|
|
|
// Messages_ServiceDesc is the grpc.ServiceDesc for Messages service.
|
|
// It's only intended for direct use with grpc.RegisterService,
|
|
// and not to be introspected or modified (even as a copy)
|
|
var Messages_ServiceDesc = grpc.ServiceDesc{
|
|
ServiceName: "org.signal.chat.messages.Messages",
|
|
HandlerType: (*MessagesServer)(nil),
|
|
Methods: []grpc.MethodDesc{
|
|
{
|
|
MethodName: "SendMessage",
|
|
Handler: _Messages_SendMessage_Handler,
|
|
},
|
|
{
|
|
MethodName: "SendSyncMessage",
|
|
Handler: _Messages_SendSyncMessage_Handler,
|
|
},
|
|
},
|
|
Streams: []grpc.StreamDesc{
|
|
{
|
|
StreamName: "GetMessages",
|
|
Handler: _Messages_GetMessages_Handler,
|
|
ServerStreams: true,
|
|
ClientStreams: true,
|
|
},
|
|
},
|
|
Metadata: "org/signal/chat/messages.proto",
|
|
}
|
|
|
|
const (
|
|
MessagesAnonymous_SendSingleRecipientMessage_FullMethodName = "/org.signal.chat.messages.MessagesAnonymous/SendSingleRecipientMessage"
|
|
MessagesAnonymous_SendMultiRecipientMessage_FullMethodName = "/org.signal.chat.messages.MessagesAnonymous/SendMultiRecipientMessage"
|
|
MessagesAnonymous_SendStory_FullMethodName = "/org.signal.chat.messages.MessagesAnonymous/SendStory"
|
|
MessagesAnonymous_SendMultiRecipientStory_FullMethodName = "/org.signal.chat.messages.MessagesAnonymous/SendMultiRecipientStory"
|
|
)
|
|
|
|
// MessagesAnonymousClient is the client API for MessagesAnonymous 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.
|
|
//
|
|
// Provides methods for sending "sealed sender" messages.
|
|
type MessagesAnonymousClient interface {
|
|
// Sends a "sealed sender" message to all devices linked to a single
|
|
// destination account.
|
|
//
|
|
// If this RPC is authorized with an unidentified access key, it will fail
|
|
// with an authorization failure if the credential is invalid OR if the
|
|
// destination account was not found. If it is authorized using a group send
|
|
// token, it will fail with an authorization failure if the credential is
|
|
// invalid and with an destination not found error if the account does not
|
|
// exist
|
|
SendSingleRecipientMessage(ctx context.Context, in *SendSealedSenderMessageRequest, opts ...grpc.CallOption) (*SendMessageResponse, error)
|
|
// Sends a "sealed sender" message with a common payload to all devices linked
|
|
// to multiple destination accounts.
|
|
SendMultiRecipientMessage(ctx context.Context, in *SendMultiRecipientMessageRequest, opts ...grpc.CallOption) (*SendMultiRecipientMessageResponse, error)
|
|
// Sends a story message to devices linked to a single destination account.
|
|
SendStory(ctx context.Context, in *SendStoryMessageRequest, opts ...grpc.CallOption) (*SendMessageResponse, error)
|
|
// Sends a story message with a common payload to devices linked to devices
|
|
// linked to multiple destination accounts.
|
|
SendMultiRecipientStory(ctx context.Context, in *SendMultiRecipientStoryRequest, opts ...grpc.CallOption) (*SendMultiRecipientMessageResponse, error)
|
|
}
|
|
|
|
type messagesAnonymousClient struct {
|
|
cc grpc.ClientConnInterface
|
|
}
|
|
|
|
func NewMessagesAnonymousClient(cc grpc.ClientConnInterface) MessagesAnonymousClient {
|
|
return &messagesAnonymousClient{cc}
|
|
}
|
|
|
|
func (c *messagesAnonymousClient) SendSingleRecipientMessage(ctx context.Context, in *SendSealedSenderMessageRequest, opts ...grpc.CallOption) (*SendMessageResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(SendMessageResponse)
|
|
err := c.cc.Invoke(ctx, MessagesAnonymous_SendSingleRecipientMessage_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *messagesAnonymousClient) SendMultiRecipientMessage(ctx context.Context, in *SendMultiRecipientMessageRequest, opts ...grpc.CallOption) (*SendMultiRecipientMessageResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(SendMultiRecipientMessageResponse)
|
|
err := c.cc.Invoke(ctx, MessagesAnonymous_SendMultiRecipientMessage_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *messagesAnonymousClient) SendStory(ctx context.Context, in *SendStoryMessageRequest, opts ...grpc.CallOption) (*SendMessageResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(SendMessageResponse)
|
|
err := c.cc.Invoke(ctx, MessagesAnonymous_SendStory_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *messagesAnonymousClient) SendMultiRecipientStory(ctx context.Context, in *SendMultiRecipientStoryRequest, opts ...grpc.CallOption) (*SendMultiRecipientMessageResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(SendMultiRecipientMessageResponse)
|
|
err := c.cc.Invoke(ctx, MessagesAnonymous_SendMultiRecipientStory_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
// MessagesAnonymousServer is the server API for MessagesAnonymous service.
|
|
// All implementations must embed UnimplementedMessagesAnonymousServer
|
|
// for forward compatibility.
|
|
//
|
|
// Provides methods for sending "sealed sender" messages.
|
|
type MessagesAnonymousServer interface {
|
|
// Sends a "sealed sender" message to all devices linked to a single
|
|
// destination account.
|
|
//
|
|
// If this RPC is authorized with an unidentified access key, it will fail
|
|
// with an authorization failure if the credential is invalid OR if the
|
|
// destination account was not found. If it is authorized using a group send
|
|
// token, it will fail with an authorization failure if the credential is
|
|
// invalid and with an destination not found error if the account does not
|
|
// exist
|
|
SendSingleRecipientMessage(context.Context, *SendSealedSenderMessageRequest) (*SendMessageResponse, error)
|
|
// Sends a "sealed sender" message with a common payload to all devices linked
|
|
// to multiple destination accounts.
|
|
SendMultiRecipientMessage(context.Context, *SendMultiRecipientMessageRequest) (*SendMultiRecipientMessageResponse, error)
|
|
// Sends a story message to devices linked to a single destination account.
|
|
SendStory(context.Context, *SendStoryMessageRequest) (*SendMessageResponse, error)
|
|
// Sends a story message with a common payload to devices linked to devices
|
|
// linked to multiple destination accounts.
|
|
SendMultiRecipientStory(context.Context, *SendMultiRecipientStoryRequest) (*SendMultiRecipientMessageResponse, error)
|
|
mustEmbedUnimplementedMessagesAnonymousServer()
|
|
}
|
|
|
|
// UnimplementedMessagesAnonymousServer 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 UnimplementedMessagesAnonymousServer struct{}
|
|
|
|
func (UnimplementedMessagesAnonymousServer) SendSingleRecipientMessage(context.Context, *SendSealedSenderMessageRequest) (*SendMessageResponse, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method SendSingleRecipientMessage not implemented")
|
|
}
|
|
func (UnimplementedMessagesAnonymousServer) SendMultiRecipientMessage(context.Context, *SendMultiRecipientMessageRequest) (*SendMultiRecipientMessageResponse, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method SendMultiRecipientMessage not implemented")
|
|
}
|
|
func (UnimplementedMessagesAnonymousServer) SendStory(context.Context, *SendStoryMessageRequest) (*SendMessageResponse, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method SendStory not implemented")
|
|
}
|
|
func (UnimplementedMessagesAnonymousServer) SendMultiRecipientStory(context.Context, *SendMultiRecipientStoryRequest) (*SendMultiRecipientMessageResponse, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method SendMultiRecipientStory not implemented")
|
|
}
|
|
func (UnimplementedMessagesAnonymousServer) mustEmbedUnimplementedMessagesAnonymousServer() {}
|
|
func (UnimplementedMessagesAnonymousServer) testEmbeddedByValue() {}
|
|
|
|
// UnsafeMessagesAnonymousServer may be embedded to opt out of forward compatibility for this service.
|
|
// Use of this interface is not recommended, as added methods to MessagesAnonymousServer will
|
|
// result in compilation errors.
|
|
type UnsafeMessagesAnonymousServer interface {
|
|
mustEmbedUnimplementedMessagesAnonymousServer()
|
|
}
|
|
|
|
func RegisterMessagesAnonymousServer(s grpc.ServiceRegistrar, srv MessagesAnonymousServer) {
|
|
// If the following call panics, it indicates UnimplementedMessagesAnonymousServer 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(&MessagesAnonymous_ServiceDesc, srv)
|
|
}
|
|
|
|
func _MessagesAnonymous_SendSingleRecipientMessage_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(SendSealedSenderMessageRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(MessagesAnonymousServer).SendSingleRecipientMessage(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: MessagesAnonymous_SendSingleRecipientMessage_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(MessagesAnonymousServer).SendSingleRecipientMessage(ctx, req.(*SendSealedSenderMessageRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _MessagesAnonymous_SendMultiRecipientMessage_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(SendMultiRecipientMessageRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(MessagesAnonymousServer).SendMultiRecipientMessage(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: MessagesAnonymous_SendMultiRecipientMessage_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(MessagesAnonymousServer).SendMultiRecipientMessage(ctx, req.(*SendMultiRecipientMessageRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _MessagesAnonymous_SendStory_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(SendStoryMessageRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(MessagesAnonymousServer).SendStory(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: MessagesAnonymous_SendStory_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(MessagesAnonymousServer).SendStory(ctx, req.(*SendStoryMessageRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _MessagesAnonymous_SendMultiRecipientStory_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(SendMultiRecipientStoryRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(MessagesAnonymousServer).SendMultiRecipientStory(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: MessagesAnonymous_SendMultiRecipientStory_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(MessagesAnonymousServer).SendMultiRecipientStory(ctx, req.(*SendMultiRecipientStoryRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
// MessagesAnonymous_ServiceDesc is the grpc.ServiceDesc for MessagesAnonymous service.
|
|
// It's only intended for direct use with grpc.RegisterService,
|
|
// and not to be introspected or modified (even as a copy)
|
|
var MessagesAnonymous_ServiceDesc = grpc.ServiceDesc{
|
|
ServiceName: "org.signal.chat.messages.MessagesAnonymous",
|
|
HandlerType: (*MessagesAnonymousServer)(nil),
|
|
Methods: []grpc.MethodDesc{
|
|
{
|
|
MethodName: "SendSingleRecipientMessage",
|
|
Handler: _MessagesAnonymous_SendSingleRecipientMessage_Handler,
|
|
},
|
|
{
|
|
MethodName: "SendMultiRecipientMessage",
|
|
Handler: _MessagesAnonymous_SendMultiRecipientMessage_Handler,
|
|
},
|
|
{
|
|
MethodName: "SendStory",
|
|
Handler: _MessagesAnonymous_SendStory_Handler,
|
|
},
|
|
{
|
|
MethodName: "SendMultiRecipientStory",
|
|
Handler: _MessagesAnonymous_SendMultiRecipientStory_Handler,
|
|
},
|
|
},
|
|
Streams: []grpc.StreamDesc{},
|
|
Metadata: "org/signal/chat/messages.proto",
|
|
}
|