Documentation ¶
Index ¶
- type CreateBody
- type MessagesPage
- type PreparedMessage
- type Service
- func (ms *Service) AddMessage(body *CreateBody) (*PreparedMessage, error)
- func (s *Service) CheckChatAccess(chatId, botId, userId string) (*chat.Chat, error)
- func (s *Service) CreateChat(userId string, botId string) (*chat.Chat, error)
- func (s *Service) DeleteChat(id string) error
- func (ms *Service) DeleteMessagesByChat(chatId string) error
- func (s *Service) GetChat(id string) (*chat.Chat, error)
- func (s *Service) GetChats(userId string, botId string) ([]*chat.Chat, error)
- func (s *Service) GetMessage(id string) (*chat.Message, error)
- func (ms *Service) GetMessagesByChat(chatId, senderId string, page, limit int, since int64) (*MessagesPage, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CreateBody ¶
type MessagesPage ¶
type MessagesPage struct { ChatId string `json:"chatId"` Total int `json:"total"` Page int `json:"page"` Limit int `json:"limit"` Messages []*PreparedMessage `json:"messages"` }
type PreparedMessage ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func (*Service) AddMessage ¶
func (ms *Service) AddMessage(body *CreateBody) (*PreparedMessage, error)
func (*Service) CheckChatAccess ¶
func (*Service) CreateChat ¶
func (*Service) DeleteChat ¶
func (*Service) DeleteMessagesByChat ¶
func (*Service) GetMessagesByChat ¶
Click to show internal directories.
Click to hide internal directories.