2016-08-02 02:58:10 +00:00
|
|
|
// 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() {}
|
2016-08-17 00:43:39 +00:00
|
|
|
func (*ServerStatusRequest) Descriptor() ([]byte, []int) { return fileDescriptor3, []int{0} }
|
2016-08-02 02:58:10 +00:00
|
|
|
|
|
|
|
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() {}
|
2016-08-17 00:43:39 +00:00
|
|
|
func (*ServerStatusReply) Descriptor() ([]byte, []int) { return fileDescriptor3, []int{1} }
|
2016-08-02 02:58:10 +00:00
|
|
|
|
|
|
|
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 {
|
2016-08-17 00:43:39 +00:00
|
|
|
// Query RPC server version and status
|
2016-08-02 02:58:10 +00:00
|
|
|
GetServerStatus(ctx context.Context, in *ServerStatusRequest, opts ...grpc.CallOption) (*ServerStatusReply, error)
|
2016-08-17 00:43:39 +00:00
|
|
|
// 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.
|
2016-08-02 02:58:10 +00:00
|
|
|
MonitorNetwork(ctx context.Context, in *MonitorNetworkRequest, opts ...grpc.CallOption) (RicochetCore_MonitorNetworkClient, error)
|
2016-08-17 00:43:39 +00:00
|
|
|
// 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.
|
2016-08-02 02:58:10 +00:00
|
|
|
StartNetwork(ctx context.Context, in *StartNetworkRequest, opts ...grpc.CallOption) (*NetworkStatus, error)
|
2016-08-17 00:43:39 +00:00
|
|
|
// Stop all network connections and go offline. Blocks until the network
|
|
|
|
// has been taken offline, and returns the new network status.
|
2016-08-02 02:58:10 +00:00
|
|
|
StopNetwork(ctx context.Context, in *StopNetworkRequest, opts ...grpc.CallOption) (*NetworkStatus, error)
|
2016-08-17 00:43:39 +00:00
|
|
|
// XXX Service status
|
|
|
|
GetIdentity(ctx context.Context, in *IdentityRequest, opts ...grpc.CallOption) (*Identity, error)
|
2016-09-16 00:30:37 +00:00
|
|
|
// Query contacts and monitor for contact changes. The full contact list
|
|
|
|
// is sent in POPULATE events, terminated by a POPULATE event with no
|
|
|
|
// subject. Any new, removed, or modified contacts, including changes in
|
|
|
|
// the state of contacts, are sent as ADD, UPDATE, or DELETE events until
|
|
|
|
// the stream is closed.
|
2016-08-17 00:43:39 +00:00
|
|
|
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)
|
2016-10-05 21:38:18 +00:00
|
|
|
// Open a stream to monitor messages in conversations with contacts.
|
|
|
|
MonitorConversations(ctx context.Context, in *MonitorConversationsRequest, opts ...grpc.CallOption) (RicochetCore_MonitorConversationsClient, error)
|
|
|
|
SendMessage(ctx context.Context, in *Message, opts ...grpc.CallOption) (*Message, error)
|
2016-08-02 02:58:10 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
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
|
|
|
|
}
|
|
|
|
|
2016-08-17 00:43:39 +00:00
|
|
|
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
|
|
|
|
}
|
|
|
|
|
2016-10-05 21:38:18 +00:00
|
|
|
func (c *ricochetCoreClient) MonitorConversations(ctx context.Context, in *MonitorConversationsRequest, opts ...grpc.CallOption) (RicochetCore_MonitorConversationsClient, error) {
|
|
|
|
stream, err := grpc.NewClientStream(ctx, &_RicochetCore_serviceDesc.Streams[2], c.cc, "/ricochet.RicochetCore/MonitorConversations", opts...)
|
2016-08-17 00:43:39 +00:00
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
2016-10-05 21:38:18 +00:00
|
|
|
x := &ricochetCoreMonitorConversationsClient{stream}
|
|
|
|
if err := x.ClientStream.SendMsg(in); err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
if err := x.ClientStream.CloseSend(); err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
2016-08-17 00:43:39 +00:00
|
|
|
return x, nil
|
|
|
|
}
|
|
|
|
|
2016-10-05 21:38:18 +00:00
|
|
|
type RicochetCore_MonitorConversationsClient interface {
|
2016-08-17 00:43:39 +00:00
|
|
|
Recv() (*ConversationEvent, error)
|
|
|
|
grpc.ClientStream
|
|
|
|
}
|
|
|
|
|
2016-10-05 21:38:18 +00:00
|
|
|
type ricochetCoreMonitorConversationsClient struct {
|
2016-08-17 00:43:39 +00:00
|
|
|
grpc.ClientStream
|
|
|
|
}
|
|
|
|
|
2016-10-05 21:38:18 +00:00
|
|
|
func (x *ricochetCoreMonitorConversationsClient) Recv() (*ConversationEvent, error) {
|
2016-08-17 00:43:39 +00:00
|
|
|
m := new(ConversationEvent)
|
|
|
|
if err := x.ClientStream.RecvMsg(m); err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
return m, nil
|
|
|
|
}
|
|
|
|
|
2016-10-05 21:38:18 +00:00
|
|
|
func (c *ricochetCoreClient) SendMessage(ctx context.Context, in *Message, opts ...grpc.CallOption) (*Message, error) {
|
|
|
|
out := new(Message)
|
|
|
|
err := grpc.Invoke(ctx, "/ricochet.RicochetCore/SendMessage", in, out, c.cc, opts...)
|
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
return out, nil
|
|
|
|
}
|
|
|
|
|
2016-08-02 02:58:10 +00:00
|
|
|
// Server API for RicochetCore service
|
|
|
|
|
|
|
|
type RicochetCoreServer interface {
|
2016-08-17 00:43:39 +00:00
|
|
|
// Query RPC server version and status
|
2016-08-02 02:58:10 +00:00
|
|
|
GetServerStatus(context.Context, *ServerStatusRequest) (*ServerStatusReply, error)
|
2016-08-17 00:43:39 +00:00
|
|
|
// 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.
|
2016-08-02 02:58:10 +00:00
|
|
|
MonitorNetwork(*MonitorNetworkRequest, RicochetCore_MonitorNetworkServer) error
|
2016-08-17 00:43:39 +00:00
|
|
|
// 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.
|
2016-08-02 02:58:10 +00:00
|
|
|
StartNetwork(context.Context, *StartNetworkRequest) (*NetworkStatus, error)
|
2016-08-17 00:43:39 +00:00
|
|
|
// Stop all network connections and go offline. Blocks until the network
|
|
|
|
// has been taken offline, and returns the new network status.
|
2016-08-02 02:58:10 +00:00
|
|
|
StopNetwork(context.Context, *StopNetworkRequest) (*NetworkStatus, error)
|
2016-08-17 00:43:39 +00:00
|
|
|
// XXX Service status
|
|
|
|
GetIdentity(context.Context, *IdentityRequest) (*Identity, error)
|
2016-09-16 00:30:37 +00:00
|
|
|
// Query contacts and monitor for contact changes. The full contact list
|
|
|
|
// is sent in POPULATE events, terminated by a POPULATE event with no
|
|
|
|
// subject. Any new, removed, or modified contacts, including changes in
|
|
|
|
// the state of contacts, are sent as ADD, UPDATE, or DELETE events until
|
|
|
|
// the stream is closed.
|
2016-08-17 00:43:39 +00:00
|
|
|
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)
|
2016-10-05 21:38:18 +00:00
|
|
|
// Open a stream to monitor messages in conversations with contacts.
|
|
|
|
MonitorConversations(*MonitorConversationsRequest, RicochetCore_MonitorConversationsServer) error
|
|
|
|
SendMessage(context.Context, *Message) (*Message, error)
|
2016-08-02 02:58:10 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
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)
|
|
|
|
}
|
|
|
|
|
2016-08-17 00:43:39 +00:00
|
|
|
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)
|
|
|
|
}
|
|
|
|
|
2016-10-05 21:38:18 +00:00
|
|
|
func _RicochetCore_MonitorConversations_Handler(srv interface{}, stream grpc.ServerStream) error {
|
|
|
|
m := new(MonitorConversationsRequest)
|
|
|
|
if err := stream.RecvMsg(m); err != nil {
|
|
|
|
return err
|
|
|
|
}
|
|
|
|
return srv.(RicochetCoreServer).MonitorConversations(m, &ricochetCoreMonitorConversationsServer{stream})
|
2016-08-17 00:43:39 +00:00
|
|
|
}
|
|
|
|
|
2016-10-05 21:38:18 +00:00
|
|
|
type RicochetCore_MonitorConversationsServer interface {
|
2016-08-17 00:43:39 +00:00
|
|
|
Send(*ConversationEvent) error
|
|
|
|
grpc.ServerStream
|
|
|
|
}
|
|
|
|
|
2016-10-05 21:38:18 +00:00
|
|
|
type ricochetCoreMonitorConversationsServer struct {
|
2016-08-17 00:43:39 +00:00
|
|
|
grpc.ServerStream
|
|
|
|
}
|
|
|
|
|
2016-10-05 21:38:18 +00:00
|
|
|
func (x *ricochetCoreMonitorConversationsServer) Send(m *ConversationEvent) error {
|
2016-08-17 00:43:39 +00:00
|
|
|
return x.ServerStream.SendMsg(m)
|
|
|
|
}
|
|
|
|
|
2016-10-05 21:38:18 +00:00
|
|
|
func _RicochetCore_SendMessage_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
|
|
in := new(Message)
|
|
|
|
if err := dec(in); err != nil {
|
2016-08-17 00:43:39 +00:00
|
|
|
return nil, err
|
|
|
|
}
|
2016-10-05 21:38:18 +00:00
|
|
|
if interceptor == nil {
|
|
|
|
return srv.(RicochetCoreServer).SendMessage(ctx, in)
|
|
|
|
}
|
|
|
|
info := &grpc.UnaryServerInfo{
|
|
|
|
Server: srv,
|
|
|
|
FullMethod: "/ricochet.RicochetCore/SendMessage",
|
|
|
|
}
|
|
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
|
|
return srv.(RicochetCoreServer).SendMessage(ctx, req.(*Message))
|
|
|
|
}
|
|
|
|
return interceptor(ctx, in, info, handler)
|
2016-08-17 00:43:39 +00:00
|
|
|
}
|
|
|
|
|
2016-08-02 02:58:10 +00:00
|
|
|
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,
|
|
|
|
},
|
2016-08-17 00:43:39 +00:00
|
|
|
{
|
|
|
|
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,
|
|
|
|
},
|
2016-10-05 21:38:18 +00:00
|
|
|
{
|
|
|
|
MethodName: "SendMessage",
|
|
|
|
Handler: _RicochetCore_SendMessage_Handler,
|
|
|
|
},
|
2016-08-02 02:58:10 +00:00
|
|
|
},
|
|
|
|
Streams: []grpc.StreamDesc{
|
|
|
|
{
|
|
|
|
StreamName: "MonitorNetwork",
|
|
|
|
Handler: _RicochetCore_MonitorNetwork_Handler,
|
|
|
|
ServerStreams: true,
|
|
|
|
},
|
2016-08-17 00:43:39 +00:00
|
|
|
{
|
|
|
|
StreamName: "MonitorContacts",
|
|
|
|
Handler: _RicochetCore_MonitorContacts_Handler,
|
|
|
|
ServerStreams: true,
|
|
|
|
},
|
|
|
|
{
|
2016-10-05 21:38:18 +00:00
|
|
|
StreamName: "MonitorConversations",
|
|
|
|
Handler: _RicochetCore_MonitorConversations_Handler,
|
2016-08-17 00:43:39 +00:00
|
|
|
ServerStreams: true,
|
|
|
|
},
|
2016-08-02 02:58:10 +00:00
|
|
|
},
|
2016-08-17 00:43:39 +00:00
|
|
|
Metadata: fileDescriptor3,
|
|
|
|
}
|
|
|
|
|
|
|
|
func init() { proto.RegisterFile("core.proto", fileDescriptor3) }
|
|
|
|
|
|
|
|
var fileDescriptor3 = []byte{
|
2016-10-05 21:38:18 +00:00
|
|
|
// 429 bytes of a gzipped FileDescriptorProto
|
|
|
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x9c, 0x54, 0x5d, 0xaf, 0xd2, 0x40,
|
|
|
|
0x10, 0x0d, 0x26, 0x7e, 0xcd, 0xbd, 0xbd, 0x86, 0x95, 0xe8, 0xb5, 0x22, 0x12, 0xd4, 0xc4, 0x27,
|
|
|
|
0x62, 0x24, 0xbc, 0xf9, 0x20, 0x01, 0x35, 0x24, 0xd6, 0x87, 0x12, 0x4c, 0x4c, 0x7c, 0x29, 0xdb,
|
|
|
|
0x89, 0x56, 0xc9, 0x6e, 0xdd, 0x1d, 0x30, 0xfc, 0x38, 0xff, 0x9b, 0x0b, 0xdd, 0x65, 0xdb, 0xb4,
|
|
|
|
0x04, 0xe3, 0x1b, 0x7b, 0xce, 0x99, 0xd3, 0x99, 0xb3, 0xb3, 0x00, 0x70, 0xa9, 0x70, 0x98, 0x2b,
|
|
|
|
0x49, 0x92, 0xdd, 0x51, 0x19, 0x97, 0xfc, 0x3b, 0x52, 0x18, 0x08, 0xa4, 0xdf, 0x52, 0xfd, 0x2c,
|
|
|
|
0x88, 0xf0, 0x2a, 0x4b, 0x51, 0x50, 0x46, 0x3b, 0x7b, 0x0e, 0xb8, 0x14, 0x94, 0x70, 0xb2, 0x47,
|
|
|
|
0x66, 0x8e, 0x5b, 0x54, 0x3a, 0xa1, 0x4c, 0x8a, 0x02, 0x1b, 0x8c, 0xe1, 0xfe, 0x02, 0x95, 0x41,
|
|
|
|
0x17, 0x94, 0xd0, 0x46, 0xc7, 0xf8, 0x6b, 0x83, 0x9a, 0x58, 0x0f, 0x40, 0xe5, 0xfc, 0xb3, 0x11,
|
|
|
|
0x1b, 0xe9, 0x75, 0xab, 0xdf, 0x7a, 0x79, 0x33, 0x2e, 0x21, 0x83, 0x2f, 0xd0, 0xae, 0x96, 0xe5,
|
|
|
|
0xeb, 0xdd, 0xb9, 0x22, 0xf6, 0x1c, 0x02, 0x7d, 0x28, 0x72, 0x92, 0x1b, 0x46, 0x72, 0x37, 0xae,
|
|
|
|
0x82, 0xaf, 0xff, 0xdc, 0x86, 0xcb, 0xd8, 0x0e, 0x38, 0x35, 0x43, 0xb3, 0x08, 0xee, 0x7d, 0x40,
|
|
|
|
0x2a, 0x7f, 0x8e, 0x3d, 0x19, 0xba, 0x08, 0x86, 0x0d, 0xdd, 0x87, 0x8f, 0x4f, 0xd1, 0xfb, 0x2e,
|
|
|
|
0x3f, 0xc2, 0x55, 0x24, 0x45, 0x46, 0x52, 0x7d, 0x2a, 0xc2, 0x63, 0x4f, 0xbd, 0xbc, 0xca, 0x38,
|
|
|
|
0xbf, 0x87, 0x5e, 0x60, 0x99, 0xc2, 0xf0, 0x55, 0x8b, 0xbd, 0x87, 0x4b, 0xf3, 0x5b, 0x91, 0xf3,
|
|
|
|
0x2a, 0x77, 0x56, 0xc2, 0xcf, 0x39, 0xb1, 0x19, 0x5c, 0x2c, 0x48, 0xe6, 0xce, 0xa6, 0x5b, 0xb6,
|
|
|
|
0x39, 0xc2, 0x67, 0x5d, 0xde, 0xc0, 0x85, 0x89, 0x6a, 0x6e, 0xb7, 0x80, 0x3d, 0xf2, 0x3a, 0x87,
|
|
|
|
0x39, 0x0b, 0x56, 0xa7, 0xf6, 0x41, 0xdb, 0xf9, 0xa7, 0xc5, 0xde, 0x68, 0xd6, 0xaf, 0x45, 0xe3,
|
|
|
|
0x28, 0x67, 0xf4, 0xc0, 0x2b, 0x2c, 0xf5, 0x6e, 0x6b, 0xfc, 0x4c, 0x34, 0x6f, 0xa1, 0x3d, 0x49,
|
|
|
|
0x53, 0x0b, 0xba, 0xc5, 0xba, 0xae, 0xc9, 0x9d, 0x51, 0xbb, 0xc6, 0xb0, 0x31, 0x04, 0xcb, 0x3c,
|
|
|
|
0x4d, 0x08, 0x1d, 0x50, 0xd7, 0x34, 0x95, 0x45, 0x10, 0xcc, 0x70, 0x8d, 0xbe, 0xac, 0xe7, 0x35,
|
|
|
|
0x15, 0xc2, 0x7d, 0xba, 0x7b, 0x92, 0xdf, 0x2f, 0xcc, 0x14, 0x3a, 0x13, 0xce, 0x31, 0xa7, 0xb9,
|
|
|
|
0x58, 0xc9, 0x8d, 0x48, 0xff, 0x6b, 0x94, 0x25, 0x74, 0x62, 0xfc, 0x81, 0xfc, 0xdf, 0x4d, 0x9e,
|
|
|
|
0x79, 0xa6, 0xa9, 0xb2, 0xe8, 0xed, 0x2b, 0x74, 0xfc, 0xbd, 0x1c, 0xdf, 0xb6, 0x66, 0x2f, 0x9a,
|
|
|
|
0xee, 0xcd, 0xf3, 0x0d, 0x0f, 0xa5, 0xcc, 0xbb, 0x1b, 0x1c, 0x99, 0xa5, 0x44, 0x91, 0x46, 0xa8,
|
|
|
|
0x75, 0xf2, 0x0d, 0xcb, 0xe9, 0x5b, 0x28, 0xac, 0x43, 0xab, 0x5b, 0x87, 0x3f, 0x96, 0xd1, 0xdf,
|
|
|
|
0x00, 0x00, 0x00, 0xff, 0xff, 0xa3, 0x96, 0xd5, 0x66, 0xb2, 0x04, 0x00, 0x00,
|
2016-08-02 02:58:10 +00:00
|
|
|
}
|