Documentation ¶
Index ¶
- Variables
- func NewConnectionServiceServer(redis cacherepo.IMessageCacheRepo, ur databaserepo.IUserRepo, ...) connectionServiceServer
- func NewMessageServiceServer(redis cacherepo.IMessageCacheRepo, userRepo databaserepo.IUserRepo, ...) messageServiceServer
- func RegisterConnectionServiceServer(s *grpc.Server, srv ConnectionServiceServer)
- func RegisterMessageServiceServer(s *grpc.Server, srv MessageServiceServer)
- type ConnRequest
- func (*ConnRequest) Descriptor() ([]byte, []int)
- func (m *ConnRequest) GetReceiverId() int32
- func (m *ConnRequest) GetSenderId() int32
- func (*ConnRequest) ProtoMessage()
- func (m *ConnRequest) Reset()
- func (m *ConnRequest) String() string
- func (m *ConnRequest) XXX_DiscardUnknown()
- func (m *ConnRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ConnRequest) XXX_Merge(src proto.Message)
- func (m *ConnRequest) XXX_Size() int
- func (m *ConnRequest) XXX_Unmarshal(b []byte) error
- type ConnectionServiceClient
- type ConnectionServiceServer
- type ConnectionService_CreateConnectionClient
- type ConnectionService_CreateConnectionServer
- type Message
- func (*Message) Descriptor() ([]byte, []int)
- func (m *Message) GetConversationId() int32
- func (m *Message) GetMessage() string
- func (m *Message) GetSenderId() int32
- func (m *Message) GetType() Message_Type
- func (*Message) ProtoMessage()
- func (m *Message) Reset()
- func (m *Message) String() string
- func (m *Message) XXX_DiscardUnknown()
- func (m *Message) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Message) XXX_Merge(src proto.Message)
- func (m *Message) XXX_Size() int
- func (m *Message) XXX_Unmarshal(b []byte) error
- type MessageResponse
- func (*MessageResponse) Descriptor() ([]byte, []int)
- func (m *MessageResponse) GetStatus() int32
- func (*MessageResponse) ProtoMessage()
- func (m *MessageResponse) Reset()
- func (m *MessageResponse) String() string
- func (m *MessageResponse) XXX_DiscardUnknown()
- func (m *MessageResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MessageResponse) XXX_Merge(src proto.Message)
- func (m *MessageResponse) XXX_Size() int
- func (m *MessageResponse) XXX_Unmarshal(b []byte) error
- type MessageServiceClient
- type MessageServiceServer
- type Message_Type
- type TermRequest
- func (*TermRequest) Descriptor() ([]byte, []int)
- func (m *TermRequest) GetSenderId() int32
- func (*TermRequest) ProtoMessage()
- func (m *TermRequest) Reset()
- func (m *TermRequest) String() string
- func (m *TermRequest) XXX_DiscardUnknown()
- func (m *TermRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *TermRequest) XXX_Merge(src proto.Message)
- func (m *TermRequest) XXX_Size() int
- func (m *TermRequest) XXX_Unmarshal(b []byte) error
- type TermResponse
- func (*TermResponse) Descriptor() ([]byte, []int)
- func (m *TermResponse) GetCode() int32
- func (*TermResponse) ProtoMessage()
- func (m *TermResponse) Reset()
- func (m *TermResponse) String() string
- func (m *TermResponse) XXX_DiscardUnknown()
- func (m *TermResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *TermResponse) XXX_Merge(src proto.Message)
- func (m *TermResponse) XXX_Size() int
- func (m *TermResponse) XXX_Unmarshal(b []byte) error
- type UnimplementedConnectionServiceServer
- type UnimplementedMessageServiceServer
Constants ¶
This section is empty.
Variables ¶
var Message_Type_name = map[int32]string{
0: "TEXT",
1: "IMAGE",
}
var Message_Type_value = map[string]int32{
"TEXT": 0,
"IMAGE": 1,
}
Functions ¶
func NewConnectionServiceServer ¶
func NewConnectionServiceServer(redis cacherepo.IMessageCacheRepo, ur databaserepo.IUserRepo, cr databaserepo.IConversationRepo, pr databaserepo.IParticipantRepo) connectionServiceServer
func NewMessageServiceServer ¶
func NewMessageServiceServer( redis cacherepo.IMessageCacheRepo, userRepo databaserepo.IUserRepo, conversationRepo databaserepo.IConversationRepo, participantRepo databaserepo.IParticipantRepo, messageRepo databaserepo.IMessageRepo) messageServiceServer
func RegisterConnectionServiceServer ¶
func RegisterConnectionServiceServer(s *grpc.Server, srv ConnectionServiceServer)
func RegisterMessageServiceServer ¶
func RegisterMessageServiceServer(s *grpc.Server, srv MessageServiceServer)
Types ¶
type ConnRequest ¶
type ConnRequest struct { SenderId int32 `protobuf:"varint,1,opt,name=sender_id,json=senderId,proto3" json:"sender_id,omitempty"` ReceiverId int32 `protobuf:"varint,2,opt,name=receiver_id,json=receiverId,proto3" json:"receiver_id,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*ConnRequest) Descriptor ¶
func (*ConnRequest) Descriptor() ([]byte, []int)
func (*ConnRequest) GetReceiverId ¶
func (m *ConnRequest) GetReceiverId() int32
func (*ConnRequest) GetSenderId ¶
func (m *ConnRequest) GetSenderId() int32
func (*ConnRequest) ProtoMessage ¶
func (*ConnRequest) ProtoMessage()
func (*ConnRequest) Reset ¶
func (m *ConnRequest) Reset()
func (*ConnRequest) String ¶
func (m *ConnRequest) String() string
func (*ConnRequest) XXX_DiscardUnknown ¶
func (m *ConnRequest) XXX_DiscardUnknown()
func (*ConnRequest) XXX_Marshal ¶
func (m *ConnRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ConnRequest) XXX_Merge ¶
func (m *ConnRequest) XXX_Merge(src proto.Message)
func (*ConnRequest) XXX_Size ¶
func (m *ConnRequest) XXX_Size() int
func (*ConnRequest) XXX_Unmarshal ¶
func (m *ConnRequest) XXX_Unmarshal(b []byte) error
type ConnectionServiceClient ¶
type ConnectionServiceClient interface { CreateConnection(ctx context.Context, in *ConnRequest, opts ...grpc.CallOption) (ConnectionService_CreateConnectionClient, error) TerminateConnection(ctx context.Context, in *TermRequest, opts ...grpc.CallOption) (*TermResponse, error) }
ConnectionServiceClient is the client API for ConnectionService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewConnectionServiceClient ¶
func NewConnectionServiceClient(cc *grpc.ClientConn) ConnectionServiceClient
type ConnectionServiceServer ¶
type ConnectionServiceServer interface { CreateConnection(*ConnRequest, ConnectionService_CreateConnectionServer) error TerminateConnection(context.Context, *TermRequest) (*TermResponse, error) }
ConnectionServiceServer is the server API for ConnectionService service.
type ConnectionService_CreateConnectionClient ¶
type ConnectionService_CreateConnectionClient interface { Recv() (*Message, error) grpc.ClientStream }
type ConnectionService_CreateConnectionServer ¶
type ConnectionService_CreateConnectionServer interface { Send(*Message) error grpc.ServerStream }
type Message ¶
type Message struct { Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` ConversationId int32 `protobuf:"varint,2,opt,name=conversation_id,json=conversationId,proto3" json:"conversation_id,omitempty"` SenderId int32 `protobuf:"varint,3,opt,name=sender_id,json=senderId,proto3" json:"sender_id,omitempty"` Type Message_Type `protobuf:"varint,4,opt,name=type,proto3,enum=Message_Type" json:"type,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Message) Descriptor ¶
func (*Message) GetConversationId ¶
func (*Message) GetMessage ¶
func (*Message) GetSenderId ¶
func (*Message) GetType ¶
func (m *Message) GetType() Message_Type
func (*Message) ProtoMessage ¶
func (*Message) ProtoMessage()
func (*Message) XXX_DiscardUnknown ¶
func (m *Message) XXX_DiscardUnknown()
func (*Message) XXX_Marshal ¶
func (*Message) XXX_Unmarshal ¶
type MessageResponse ¶
type MessageResponse struct { Status int32 `protobuf:"varint,1,opt,name=status,proto3" json:"status,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*MessageResponse) Descriptor ¶
func (*MessageResponse) Descriptor() ([]byte, []int)
func (*MessageResponse) GetStatus ¶
func (m *MessageResponse) GetStatus() int32
func (*MessageResponse) ProtoMessage ¶
func (*MessageResponse) ProtoMessage()
func (*MessageResponse) Reset ¶
func (m *MessageResponse) Reset()
func (*MessageResponse) String ¶
func (m *MessageResponse) String() string
func (*MessageResponse) XXX_DiscardUnknown ¶
func (m *MessageResponse) XXX_DiscardUnknown()
func (*MessageResponse) XXX_Marshal ¶
func (m *MessageResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MessageResponse) XXX_Merge ¶
func (m *MessageResponse) XXX_Merge(src proto.Message)
func (*MessageResponse) XXX_Size ¶
func (m *MessageResponse) XXX_Size() int
func (*MessageResponse) XXX_Unmarshal ¶
func (m *MessageResponse) XXX_Unmarshal(b []byte) error
type MessageServiceClient ¶
type MessageServiceClient interface {
SendMessage(ctx context.Context, in *Message, opts ...grpc.CallOption) (*MessageResponse, error)
}
MessageServiceClient is the client API for MessageService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewMessageServiceClient ¶
func NewMessageServiceClient(cc *grpc.ClientConn) MessageServiceClient
type MessageServiceServer ¶
type MessageServiceServer interface {
SendMessage(context.Context, *Message) (*MessageResponse, error)
}
MessageServiceServer is the server API for MessageService service.
type Message_Type ¶
type Message_Type int32
const ( Message_TEXT Message_Type = 0 Message_IMAGE Message_Type = 1 )
func (Message_Type) EnumDescriptor ¶
func (Message_Type) EnumDescriptor() ([]byte, []int)
func (Message_Type) String ¶
func (x Message_Type) String() string
type TermRequest ¶
type TermRequest struct { SenderId int32 `protobuf:"varint,1,opt,name=sender_id,json=senderId,proto3" json:"sender_id,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*TermRequest) Descriptor ¶
func (*TermRequest) Descriptor() ([]byte, []int)
func (*TermRequest) GetSenderId ¶
func (m *TermRequest) GetSenderId() int32
func (*TermRequest) ProtoMessage ¶
func (*TermRequest) ProtoMessage()
func (*TermRequest) Reset ¶
func (m *TermRequest) Reset()
func (*TermRequest) String ¶
func (m *TermRequest) String() string
func (*TermRequest) XXX_DiscardUnknown ¶
func (m *TermRequest) XXX_DiscardUnknown()
func (*TermRequest) XXX_Marshal ¶
func (m *TermRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*TermRequest) XXX_Merge ¶
func (m *TermRequest) XXX_Merge(src proto.Message)
func (*TermRequest) XXX_Size ¶
func (m *TermRequest) XXX_Size() int
func (*TermRequest) XXX_Unmarshal ¶
func (m *TermRequest) XXX_Unmarshal(b []byte) error
type TermResponse ¶
type TermResponse struct { Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*TermResponse) Descriptor ¶
func (*TermResponse) Descriptor() ([]byte, []int)
func (*TermResponse) GetCode ¶
func (m *TermResponse) GetCode() int32
func (*TermResponse) ProtoMessage ¶
func (*TermResponse) ProtoMessage()
func (*TermResponse) Reset ¶
func (m *TermResponse) Reset()
func (*TermResponse) String ¶
func (m *TermResponse) String() string
func (*TermResponse) XXX_DiscardUnknown ¶
func (m *TermResponse) XXX_DiscardUnknown()
func (*TermResponse) XXX_Marshal ¶
func (m *TermResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*TermResponse) XXX_Merge ¶
func (m *TermResponse) XXX_Merge(src proto.Message)
func (*TermResponse) XXX_Size ¶
func (m *TermResponse) XXX_Size() int
func (*TermResponse) XXX_Unmarshal ¶
func (m *TermResponse) XXX_Unmarshal(b []byte) error
type UnimplementedConnectionServiceServer ¶
type UnimplementedConnectionServiceServer struct { }
UnimplementedConnectionServiceServer can be embedded to have forward compatible implementations.
func (*UnimplementedConnectionServiceServer) CreateConnection ¶
func (*UnimplementedConnectionServiceServer) CreateConnection(req *ConnRequest, srv ConnectionService_CreateConnectionServer) error
func (*UnimplementedConnectionServiceServer) TerminateConnection ¶
func (*UnimplementedConnectionServiceServer) TerminateConnection(ctx context.Context, req *TermRequest) (*TermResponse, error)
type UnimplementedMessageServiceServer ¶
type UnimplementedMessageServiceServer struct { }
UnimplementedMessageServiceServer can be embedded to have forward compatible implementations.
func (*UnimplementedMessageServiceServer) SendMessage ¶
func (*UnimplementedMessageServiceServer) SendMessage(ctx context.Context, req *Message) (*MessageResponse, error)