624 lines
23 KiB
Go
624 lines
23 KiB
Go
// Code generated by protoc-gen-go.
|
|
// source: core.proto
|
|
// DO NOT EDIT!
|
|
|
|
package ricochet
|
|
|
|
import proto "github.com/golang/protobuf/proto"
|
|
import fmt "fmt"
|
|
import math "math"
|
|
|
|
import (
|
|
context "golang.org/x/net/context"
|
|
grpc "google.golang.org/grpc"
|
|
)
|
|
|
|
// Reference imports to suppress errors if they are not otherwise used.
|
|
var _ = proto.Marshal
|
|
var _ = fmt.Errorf
|
|
var _ = math.Inf
|
|
|
|
type ServerStatusRequest struct {
|
|
RpcVersion int32 `protobuf:"varint,1,opt,name=rpcVersion" json:"rpcVersion,omitempty"`
|
|
}
|
|
|
|
func (m *ServerStatusRequest) Reset() { *m = ServerStatusRequest{} }
|
|
func (m *ServerStatusRequest) String() string { return proto.CompactTextString(m) }
|
|
func (*ServerStatusRequest) ProtoMessage() {}
|
|
func (*ServerStatusRequest) Descriptor() ([]byte, []int) { return fileDescriptor3, []int{0} }
|
|
|
|
type ServerStatusReply struct {
|
|
RpcVersion int32 `protobuf:"varint,1,opt,name=rpcVersion" json:"rpcVersion,omitempty"`
|
|
ServerVersion string `protobuf:"bytes,2,opt,name=serverVersion" json:"serverVersion,omitempty"`
|
|
}
|
|
|
|
func (m *ServerStatusReply) Reset() { *m = ServerStatusReply{} }
|
|
func (m *ServerStatusReply) String() string { return proto.CompactTextString(m) }
|
|
func (*ServerStatusReply) ProtoMessage() {}
|
|
func (*ServerStatusReply) Descriptor() ([]byte, []int) { return fileDescriptor3, []int{1} }
|
|
|
|
func init() {
|
|
proto.RegisterType((*ServerStatusRequest)(nil), "ricochet.ServerStatusRequest")
|
|
proto.RegisterType((*ServerStatusReply)(nil), "ricochet.ServerStatusReply")
|
|
}
|
|
|
|
// Reference imports to suppress errors if they are not otherwise used.
|
|
var _ context.Context
|
|
var _ grpc.ClientConn
|
|
|
|
// This is a compile-time assertion to ensure that this generated file
|
|
// is compatible with the grpc package it is being compiled against.
|
|
const _ = grpc.SupportPackageIsVersion3
|
|
|
|
// Client API for RicochetCore service
|
|
|
|
type RicochetCoreClient interface {
|
|
// Query RPC server version and status
|
|
GetServerStatus(ctx context.Context, in *ServerStatusRequest, opts ...grpc.CallOption) (*ServerStatusReply, error)
|
|
// Open a stream to monitor changes to network status. The current
|
|
// NetworkStatus will be sent immediately, and the stream will receive a
|
|
// new NetworkStatus after any changes until the stream is closed.
|
|
MonitorNetwork(ctx context.Context, in *MonitorNetworkRequest, opts ...grpc.CallOption) (RicochetCore_MonitorNetworkClient, error)
|
|
// Start connecting to the network. Before StartNetwork is called (by any
|
|
// client), the backend will not make any connections or appear online.
|
|
// This call blocks until the first connection attempt succeeds or fails,
|
|
// and returns the current network status, but connection attempts will
|
|
// continue unless this call returns an RPC error, or until StopNetwork
|
|
// is called.
|
|
StartNetwork(ctx context.Context, in *StartNetworkRequest, opts ...grpc.CallOption) (*NetworkStatus, error)
|
|
// Stop all network connections and go offline. Blocks until the network
|
|
// has been taken offline, and returns the new network status.
|
|
StopNetwork(ctx context.Context, in *StopNetworkRequest, opts ...grpc.CallOption) (*NetworkStatus, error)
|
|
// XXX Service status
|
|
GetIdentity(ctx context.Context, in *IdentityRequest, opts ...grpc.CallOption) (*Identity, error)
|
|
MonitorContacts(ctx context.Context, in *MonitorContactsRequest, opts ...grpc.CallOption) (RicochetCore_MonitorContactsClient, error)
|
|
AddContactRequest(ctx context.Context, in *ContactRequest, opts ...grpc.CallOption) (*Contact, error)
|
|
UpdateContact(ctx context.Context, in *Contact, opts ...grpc.CallOption) (*Contact, error)
|
|
DeleteContact(ctx context.Context, in *DeleteContactRequest, opts ...grpc.CallOption) (*DeleteContactReply, error)
|
|
AcceptInboundRequest(ctx context.Context, in *ContactRequest, opts ...grpc.CallOption) (*Contact, error)
|
|
RejectInboundRequest(ctx context.Context, in *ContactRequest, opts ...grpc.CallOption) (*RejectInboundRequestReply, error)
|
|
StreamConversations(ctx context.Context, opts ...grpc.CallOption) (RicochetCore_StreamConversationsClient, error)
|
|
}
|
|
|
|
type ricochetCoreClient struct {
|
|
cc *grpc.ClientConn
|
|
}
|
|
|
|
func NewRicochetCoreClient(cc *grpc.ClientConn) RicochetCoreClient {
|
|
return &ricochetCoreClient{cc}
|
|
}
|
|
|
|
func (c *ricochetCoreClient) GetServerStatus(ctx context.Context, in *ServerStatusRequest, opts ...grpc.CallOption) (*ServerStatusReply, error) {
|
|
out := new(ServerStatusReply)
|
|
err := grpc.Invoke(ctx, "/ricochet.RicochetCore/GetServerStatus", in, out, c.cc, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *ricochetCoreClient) MonitorNetwork(ctx context.Context, in *MonitorNetworkRequest, opts ...grpc.CallOption) (RicochetCore_MonitorNetworkClient, error) {
|
|
stream, err := grpc.NewClientStream(ctx, &_RicochetCore_serviceDesc.Streams[0], c.cc, "/ricochet.RicochetCore/MonitorNetwork", opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
x := &ricochetCoreMonitorNetworkClient{stream}
|
|
if err := x.ClientStream.SendMsg(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if err := x.ClientStream.CloseSend(); err != nil {
|
|
return nil, err
|
|
}
|
|
return x, nil
|
|
}
|
|
|
|
type RicochetCore_MonitorNetworkClient interface {
|
|
Recv() (*NetworkStatus, error)
|
|
grpc.ClientStream
|
|
}
|
|
|
|
type ricochetCoreMonitorNetworkClient struct {
|
|
grpc.ClientStream
|
|
}
|
|
|
|
func (x *ricochetCoreMonitorNetworkClient) Recv() (*NetworkStatus, error) {
|
|
m := new(NetworkStatus)
|
|
if err := x.ClientStream.RecvMsg(m); err != nil {
|
|
return nil, err
|
|
}
|
|
return m, nil
|
|
}
|
|
|
|
func (c *ricochetCoreClient) StartNetwork(ctx context.Context, in *StartNetworkRequest, opts ...grpc.CallOption) (*NetworkStatus, error) {
|
|
out := new(NetworkStatus)
|
|
err := grpc.Invoke(ctx, "/ricochet.RicochetCore/StartNetwork", in, out, c.cc, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *ricochetCoreClient) StopNetwork(ctx context.Context, in *StopNetworkRequest, opts ...grpc.CallOption) (*NetworkStatus, error) {
|
|
out := new(NetworkStatus)
|
|
err := grpc.Invoke(ctx, "/ricochet.RicochetCore/StopNetwork", in, out, c.cc, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *ricochetCoreClient) GetIdentity(ctx context.Context, in *IdentityRequest, opts ...grpc.CallOption) (*Identity, error) {
|
|
out := new(Identity)
|
|
err := grpc.Invoke(ctx, "/ricochet.RicochetCore/GetIdentity", in, out, c.cc, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *ricochetCoreClient) MonitorContacts(ctx context.Context, in *MonitorContactsRequest, opts ...grpc.CallOption) (RicochetCore_MonitorContactsClient, error) {
|
|
stream, err := grpc.NewClientStream(ctx, &_RicochetCore_serviceDesc.Streams[1], c.cc, "/ricochet.RicochetCore/MonitorContacts", opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
x := &ricochetCoreMonitorContactsClient{stream}
|
|
if err := x.ClientStream.SendMsg(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if err := x.ClientStream.CloseSend(); err != nil {
|
|
return nil, err
|
|
}
|
|
return x, nil
|
|
}
|
|
|
|
type RicochetCore_MonitorContactsClient interface {
|
|
Recv() (*ContactEvent, error)
|
|
grpc.ClientStream
|
|
}
|
|
|
|
type ricochetCoreMonitorContactsClient struct {
|
|
grpc.ClientStream
|
|
}
|
|
|
|
func (x *ricochetCoreMonitorContactsClient) Recv() (*ContactEvent, error) {
|
|
m := new(ContactEvent)
|
|
if err := x.ClientStream.RecvMsg(m); err != nil {
|
|
return nil, err
|
|
}
|
|
return m, nil
|
|
}
|
|
|
|
func (c *ricochetCoreClient) AddContactRequest(ctx context.Context, in *ContactRequest, opts ...grpc.CallOption) (*Contact, error) {
|
|
out := new(Contact)
|
|
err := grpc.Invoke(ctx, "/ricochet.RicochetCore/AddContactRequest", in, out, c.cc, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *ricochetCoreClient) UpdateContact(ctx context.Context, in *Contact, opts ...grpc.CallOption) (*Contact, error) {
|
|
out := new(Contact)
|
|
err := grpc.Invoke(ctx, "/ricochet.RicochetCore/UpdateContact", in, out, c.cc, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *ricochetCoreClient) DeleteContact(ctx context.Context, in *DeleteContactRequest, opts ...grpc.CallOption) (*DeleteContactReply, error) {
|
|
out := new(DeleteContactReply)
|
|
err := grpc.Invoke(ctx, "/ricochet.RicochetCore/DeleteContact", in, out, c.cc, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *ricochetCoreClient) AcceptInboundRequest(ctx context.Context, in *ContactRequest, opts ...grpc.CallOption) (*Contact, error) {
|
|
out := new(Contact)
|
|
err := grpc.Invoke(ctx, "/ricochet.RicochetCore/AcceptInboundRequest", in, out, c.cc, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *ricochetCoreClient) RejectInboundRequest(ctx context.Context, in *ContactRequest, opts ...grpc.CallOption) (*RejectInboundRequestReply, error) {
|
|
out := new(RejectInboundRequestReply)
|
|
err := grpc.Invoke(ctx, "/ricochet.RicochetCore/RejectInboundRequest", in, out, c.cc, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *ricochetCoreClient) StreamConversations(ctx context.Context, opts ...grpc.CallOption) (RicochetCore_StreamConversationsClient, error) {
|
|
stream, err := grpc.NewClientStream(ctx, &_RicochetCore_serviceDesc.Streams[2], c.cc, "/ricochet.RicochetCore/StreamConversations", opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
x := &ricochetCoreStreamConversationsClient{stream}
|
|
return x, nil
|
|
}
|
|
|
|
type RicochetCore_StreamConversationsClient interface {
|
|
Send(*ConversationEvent) error
|
|
Recv() (*ConversationEvent, error)
|
|
grpc.ClientStream
|
|
}
|
|
|
|
type ricochetCoreStreamConversationsClient struct {
|
|
grpc.ClientStream
|
|
}
|
|
|
|
func (x *ricochetCoreStreamConversationsClient) Send(m *ConversationEvent) error {
|
|
return x.ClientStream.SendMsg(m)
|
|
}
|
|
|
|
func (x *ricochetCoreStreamConversationsClient) Recv() (*ConversationEvent, error) {
|
|
m := new(ConversationEvent)
|
|
if err := x.ClientStream.RecvMsg(m); err != nil {
|
|
return nil, err
|
|
}
|
|
return m, nil
|
|
}
|
|
|
|
// Server API for RicochetCore service
|
|
|
|
type RicochetCoreServer interface {
|
|
// Query RPC server version and status
|
|
GetServerStatus(context.Context, *ServerStatusRequest) (*ServerStatusReply, error)
|
|
// Open a stream to monitor changes to network status. The current
|
|
// NetworkStatus will be sent immediately, and the stream will receive a
|
|
// new NetworkStatus after any changes until the stream is closed.
|
|
MonitorNetwork(*MonitorNetworkRequest, RicochetCore_MonitorNetworkServer) error
|
|
// Start connecting to the network. Before StartNetwork is called (by any
|
|
// client), the backend will not make any connections or appear online.
|
|
// This call blocks until the first connection attempt succeeds or fails,
|
|
// and returns the current network status, but connection attempts will
|
|
// continue unless this call returns an RPC error, or until StopNetwork
|
|
// is called.
|
|
StartNetwork(context.Context, *StartNetworkRequest) (*NetworkStatus, error)
|
|
// Stop all network connections and go offline. Blocks until the network
|
|
// has been taken offline, and returns the new network status.
|
|
StopNetwork(context.Context, *StopNetworkRequest) (*NetworkStatus, error)
|
|
// XXX Service status
|
|
GetIdentity(context.Context, *IdentityRequest) (*Identity, error)
|
|
MonitorContacts(*MonitorContactsRequest, RicochetCore_MonitorContactsServer) error
|
|
AddContactRequest(context.Context, *ContactRequest) (*Contact, error)
|
|
UpdateContact(context.Context, *Contact) (*Contact, error)
|
|
DeleteContact(context.Context, *DeleteContactRequest) (*DeleteContactReply, error)
|
|
AcceptInboundRequest(context.Context, *ContactRequest) (*Contact, error)
|
|
RejectInboundRequest(context.Context, *ContactRequest) (*RejectInboundRequestReply, error)
|
|
StreamConversations(RicochetCore_StreamConversationsServer) error
|
|
}
|
|
|
|
func RegisterRicochetCoreServer(s *grpc.Server, srv RicochetCoreServer) {
|
|
s.RegisterService(&_RicochetCore_serviceDesc, srv)
|
|
}
|
|
|
|
func _RicochetCore_GetServerStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(ServerStatusRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(RicochetCoreServer).GetServerStatus(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/ricochet.RicochetCore/GetServerStatus",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(RicochetCoreServer).GetServerStatus(ctx, req.(*ServerStatusRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _RicochetCore_MonitorNetwork_Handler(srv interface{}, stream grpc.ServerStream) error {
|
|
m := new(MonitorNetworkRequest)
|
|
if err := stream.RecvMsg(m); err != nil {
|
|
return err
|
|
}
|
|
return srv.(RicochetCoreServer).MonitorNetwork(m, &ricochetCoreMonitorNetworkServer{stream})
|
|
}
|
|
|
|
type RicochetCore_MonitorNetworkServer interface {
|
|
Send(*NetworkStatus) error
|
|
grpc.ServerStream
|
|
}
|
|
|
|
type ricochetCoreMonitorNetworkServer struct {
|
|
grpc.ServerStream
|
|
}
|
|
|
|
func (x *ricochetCoreMonitorNetworkServer) Send(m *NetworkStatus) error {
|
|
return x.ServerStream.SendMsg(m)
|
|
}
|
|
|
|
func _RicochetCore_StartNetwork_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(StartNetworkRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(RicochetCoreServer).StartNetwork(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/ricochet.RicochetCore/StartNetwork",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(RicochetCoreServer).StartNetwork(ctx, req.(*StartNetworkRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _RicochetCore_StopNetwork_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(StopNetworkRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(RicochetCoreServer).StopNetwork(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/ricochet.RicochetCore/StopNetwork",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(RicochetCoreServer).StopNetwork(ctx, req.(*StopNetworkRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _RicochetCore_GetIdentity_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(IdentityRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(RicochetCoreServer).GetIdentity(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/ricochet.RicochetCore/GetIdentity",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(RicochetCoreServer).GetIdentity(ctx, req.(*IdentityRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _RicochetCore_MonitorContacts_Handler(srv interface{}, stream grpc.ServerStream) error {
|
|
m := new(MonitorContactsRequest)
|
|
if err := stream.RecvMsg(m); err != nil {
|
|
return err
|
|
}
|
|
return srv.(RicochetCoreServer).MonitorContacts(m, &ricochetCoreMonitorContactsServer{stream})
|
|
}
|
|
|
|
type RicochetCore_MonitorContactsServer interface {
|
|
Send(*ContactEvent) error
|
|
grpc.ServerStream
|
|
}
|
|
|
|
type ricochetCoreMonitorContactsServer struct {
|
|
grpc.ServerStream
|
|
}
|
|
|
|
func (x *ricochetCoreMonitorContactsServer) Send(m *ContactEvent) error {
|
|
return x.ServerStream.SendMsg(m)
|
|
}
|
|
|
|
func _RicochetCore_AddContactRequest_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(ContactRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(RicochetCoreServer).AddContactRequest(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/ricochet.RicochetCore/AddContactRequest",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(RicochetCoreServer).AddContactRequest(ctx, req.(*ContactRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _RicochetCore_UpdateContact_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(Contact)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(RicochetCoreServer).UpdateContact(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/ricochet.RicochetCore/UpdateContact",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(RicochetCoreServer).UpdateContact(ctx, req.(*Contact))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _RicochetCore_DeleteContact_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(DeleteContactRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(RicochetCoreServer).DeleteContact(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/ricochet.RicochetCore/DeleteContact",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(RicochetCoreServer).DeleteContact(ctx, req.(*DeleteContactRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _RicochetCore_AcceptInboundRequest_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(ContactRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(RicochetCoreServer).AcceptInboundRequest(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/ricochet.RicochetCore/AcceptInboundRequest",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(RicochetCoreServer).AcceptInboundRequest(ctx, req.(*ContactRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _RicochetCore_RejectInboundRequest_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(ContactRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(RicochetCoreServer).RejectInboundRequest(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/ricochet.RicochetCore/RejectInboundRequest",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(RicochetCoreServer).RejectInboundRequest(ctx, req.(*ContactRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _RicochetCore_StreamConversations_Handler(srv interface{}, stream grpc.ServerStream) error {
|
|
return srv.(RicochetCoreServer).StreamConversations(&ricochetCoreStreamConversationsServer{stream})
|
|
}
|
|
|
|
type RicochetCore_StreamConversationsServer interface {
|
|
Send(*ConversationEvent) error
|
|
Recv() (*ConversationEvent, error)
|
|
grpc.ServerStream
|
|
}
|
|
|
|
type ricochetCoreStreamConversationsServer struct {
|
|
grpc.ServerStream
|
|
}
|
|
|
|
func (x *ricochetCoreStreamConversationsServer) Send(m *ConversationEvent) error {
|
|
return x.ServerStream.SendMsg(m)
|
|
}
|
|
|
|
func (x *ricochetCoreStreamConversationsServer) Recv() (*ConversationEvent, error) {
|
|
m := new(ConversationEvent)
|
|
if err := x.ServerStream.RecvMsg(m); err != nil {
|
|
return nil, err
|
|
}
|
|
return m, nil
|
|
}
|
|
|
|
var _RicochetCore_serviceDesc = grpc.ServiceDesc{
|
|
ServiceName: "ricochet.RicochetCore",
|
|
HandlerType: (*RicochetCoreServer)(nil),
|
|
Methods: []grpc.MethodDesc{
|
|
{
|
|
MethodName: "GetServerStatus",
|
|
Handler: _RicochetCore_GetServerStatus_Handler,
|
|
},
|
|
{
|
|
MethodName: "StartNetwork",
|
|
Handler: _RicochetCore_StartNetwork_Handler,
|
|
},
|
|
{
|
|
MethodName: "StopNetwork",
|
|
Handler: _RicochetCore_StopNetwork_Handler,
|
|
},
|
|
{
|
|
MethodName: "GetIdentity",
|
|
Handler: _RicochetCore_GetIdentity_Handler,
|
|
},
|
|
{
|
|
MethodName: "AddContactRequest",
|
|
Handler: _RicochetCore_AddContactRequest_Handler,
|
|
},
|
|
{
|
|
MethodName: "UpdateContact",
|
|
Handler: _RicochetCore_UpdateContact_Handler,
|
|
},
|
|
{
|
|
MethodName: "DeleteContact",
|
|
Handler: _RicochetCore_DeleteContact_Handler,
|
|
},
|
|
{
|
|
MethodName: "AcceptInboundRequest",
|
|
Handler: _RicochetCore_AcceptInboundRequest_Handler,
|
|
},
|
|
{
|
|
MethodName: "RejectInboundRequest",
|
|
Handler: _RicochetCore_RejectInboundRequest_Handler,
|
|
},
|
|
},
|
|
Streams: []grpc.StreamDesc{
|
|
{
|
|
StreamName: "MonitorNetwork",
|
|
Handler: _RicochetCore_MonitorNetwork_Handler,
|
|
ServerStreams: true,
|
|
},
|
|
{
|
|
StreamName: "MonitorContacts",
|
|
Handler: _RicochetCore_MonitorContacts_Handler,
|
|
ServerStreams: true,
|
|
},
|
|
{
|
|
StreamName: "StreamConversations",
|
|
Handler: _RicochetCore_StreamConversations_Handler,
|
|
ServerStreams: true,
|
|
ClientStreams: true,
|
|
},
|
|
},
|
|
Metadata: fileDescriptor3,
|
|
}
|
|
|
|
func init() { proto.RegisterFile("core.proto", fileDescriptor3) }
|
|
|
|
var fileDescriptor3 = []byte{
|
|
// 414 bytes of a gzipped FileDescriptorProto
|
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x9c, 0x54, 0x41, 0xaf, 0xd2, 0x40,
|
|
0x10, 0x4e, 0x4d, 0x24, 0x3a, 0x50, 0x0c, 0x2b, 0x51, 0x2c, 0x88, 0x04, 0x3d, 0x70, 0x22, 0x44,
|
|
0xc3, 0xcd, 0x83, 0xa4, 0xa8, 0x21, 0x11, 0x0f, 0x6d, 0x30, 0xf1, 0x58, 0xb6, 0x93, 0x58, 0xc5,
|
|
0x6e, 0xdd, 0x0e,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