Documentation ¶
Index ¶
- type ConversationManager
- type ConversationService
- func (s *ConversationService) AddMember(ctx context.Context, r *pb.MemberRequest) (*google_protobuf.Empty, error)
- func (s *ConversationService) Create(ctx context.Context, r *pb.CreateConversationRequest) (*pb.CreateConversationResponse, error)
- func (s *ConversationService) Get(ctx context.Context, r *pb.GetConversationsRequest) (*pb.GetConversationsResponse, error)
- func (s *ConversationService) Leave(ctx context.Context, r *pb.LeaveConversationRequest) (*google_protobuf.Empty, error)
- func (s *ConversationService) RemoveMember(ctx context.Context, r *pb.MemberRequest) (*google_protobuf.Empty, error)
- type MessageManager
- type MessageService
- func (s *MessageService) Comunicate(str pb.MessageService_ComunicateServer) error
- func (s *MessageService) GetHistory(cx context.Context, r *pb.GetHistoryRequest) (*pb.GetHistoryResponse, error)
- func (s *MessageService) ReadHistory(cx context.Context, r *pb.ReadHistoryRequest) (*google_protobuf.Empty, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConversationManager ¶
type ConversationManager interface { CreateSchema(schema string) error GetByUserID(userID string, limit int32, offset int32) ([]*pb.Conversation, error) GetByID(id string) (*pb.Conversation, error) Create(*pb.Conversation) error Update(*pb.Conversation) error AddMember(cID, memberID string) error RemoveMember(cID, memberID string) error }
type ConversationService ¶
type ConversationService struct {
// contains filtered or unexported fields
}
func NewConversationService ¶
func NewConversationService(rsaPublicKey []byte, m ConversationManager) (*ConversationService, error)
func (*ConversationService) AddMember ¶
func (s *ConversationService) AddMember(ctx context.Context, r *pb.MemberRequest) (*google_protobuf.Empty, error)
func (*ConversationService) Create ¶
func (s *ConversationService) Create(ctx context.Context, r *pb.CreateConversationRequest) (*pb.CreateConversationResponse, error)
func (*ConversationService) Get ¶
func (s *ConversationService) Get(ctx context.Context, r *pb.GetConversationsRequest) (*pb.GetConversationsResponse, error)
func (*ConversationService) Leave ¶
func (s *ConversationService) Leave(ctx context.Context, r *pb.LeaveConversationRequest) (*google_protobuf.Empty, error)
func (*ConversationService) RemoveMember ¶
func (s *ConversationService) RemoveMember(ctx context.Context, r *pb.MemberRequest) (*google_protobuf.Empty, error)
type MessageManager ¶
type MessageService ¶
type MessageService struct {
// contains filtered or unexported fields
}
func NewMessageService ¶
func NewMessageService(rsaPublicKey []byte, m MessageManager, c ConversationManager, nc *nats.EncodedConn) (*MessageService, error)
func (*MessageService) Comunicate ¶
func (s *MessageService) Comunicate(str pb.MessageService_ComunicateServer) error
Comunicate Send and Receive Messages or events to/from conversations.
func (*MessageService) GetHistory ¶
func (s *MessageService) GetHistory(cx context.Context, r *pb.GetHistoryRequest) (*pb.GetHistoryResponse, error)
GetHistory return the history of messages for an conversation in DESC order.
func (*MessageService) ReadHistory ¶
func (s *MessageService) ReadHistory(cx context.Context, r *pb.ReadHistoryRequest) (*google_protobuf.Empty, error)
ReadHistory notifies the reading of messages from a conversation.
Click to show internal directories.
Click to hide internal directories.