Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChatService ¶
type ChatService interface { CreateChat(ctx context.Context, usernames []string, title string) (int64, error) DeleteChat(ctx context.Context, chatID int64) error SendMessage(ctx context.Context, text string, chatID int64) error GetChatMessagesAndCount(ctx context.Context, chatID, page, pageSize int64) ( []*serviceModel.ChatMessage, uint64, error, ) GetAvailableChatsAndCount( ctx context.Context, page, pageSize int64, ) ([]*serviceModel.Chat, uint64, error) ConnectChat(stream Stream, chatID int64) error InitMessagesChan(chatID int64) chan *serviceModel.ChatMessage GetChannels() map[int64]chan *serviceModel.ChatMessage CheckChatAvailability(ctx context.Context, chatID int64, username string) error CheckCtxUserChatAvailability(ctx context.Context, chatID int64) error }
type Stream ¶
type Stream interface { Send(message *serviceModel.ChatMessage) error Context() context.Context }
Click to show internal directories.
Click to hide internal directories.