Documentation
¶
Index ¶
- type Handler
- type MessageDetailRequest
- type MessageDetailResponse
- type MessageReadRequest
- type MessageReadResponse
- type MessageSendRequest
- type MessageSendResponse
- type MessagesListRequest
- type MessagesListResponse
- type MessagesUnreadCountRequest
- type MessagesUnreadCountResponse
- type Service
- func (s *Service) Detail(ctx context.Context, req *MessageDetailRequest) (*MessageDetailResponse, error)
- func (s *Service) List(ctx context.Context, req *MessagesListRequest) (*MessagesListResponse, error)
- func (s *Service) Read(ctx context.Context, req *MessageReadRequest) (*MessageReadResponse, error)
- func (s *Service) Send(ctx context.Context, req *MessageSendRequest) (*MessageSendResponse, error)
- func (s *Service) Stream(ctx context.Context, req *StreamMessagesRequest) (*StreamMessagesResponse, error)
- func (s *Service) UnreadCount(ctx context.Context, req *MessagesUnreadCountRequest) (*MessagesUnreadCountResponse, error)
- type StreamMessagesRequest
- type StreamMessagesResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
func NewHandler ¶
func (*Handler) UnreadCount ¶
UnreadCount handles the request to get unread message count
type MessageDetailRequest ¶
type MessageDetailRequest struct {
ID string `uri:"id"`
}
type MessageDetailResponse ¶
type MessageReadRequest ¶
type MessageReadRequest struct {
ID string `uri:"id"`
}
type MessageReadResponse ¶
type MessageSendRequest ¶
type MessageSendResponse ¶
type MessagesListRequest ¶
type MessagesListResponse ¶
type MessagesUnreadCountRequest ¶
type MessagesUnreadCountRequest struct{}
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func NewService(svcCtx *svc.ServiceContext) *Service
func (*Service) Detail ¶
func (s *Service) Detail(ctx context.Context, req *MessageDetailRequest) (*MessageDetailResponse, error)
Detail returns the details of a message
func (*Service) List ¶
func (s *Service) List(ctx context.Context, req *MessagesListRequest) (*MessagesListResponse, error)
List returns the list of messages
func (*Service) Read ¶
func (s *Service) Read(ctx context.Context, req *MessageReadRequest) (*MessageReadResponse, error)
Read marks a message as read
func (*Service) Send ¶
func (s *Service) Send(ctx context.Context, req *MessageSendRequest) (*MessageSendResponse, error)
Send sends a new message
func (*Service) Stream ¶
func (s *Service) Stream(ctx context.Context, req *StreamMessagesRequest) (*StreamMessagesResponse, error)
Stream returns recent messages for streaming
func (*Service) UnreadCount ¶
func (s *Service) UnreadCount(ctx context.Context, req *MessagesUnreadCountRequest) (*MessagesUnreadCountResponse, error)
UnreadCount returns the count of unread messages
type StreamMessagesRequest ¶
type StreamMessagesRequest struct {
}
StreamMessagesRequest is for streaming messages
type StreamMessagesResponse ¶
type StreamMessagesResponse struct {
Code int `json:"code"`
Message string `json:"message"`
Data interface{} `json:"data,omitempty"`
}
StreamMessagesResponse is for streaming messages response
Click to show internal directories.
Click to hide internal directories.