service

package
v0.0.0-...-440c409 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 28, 2024 License: MIT Imports: 2 Imported by: 0

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
}

type UserClient

type UserClient interface {
	CheckUsersExistence(ctx context.Context, usernames []string) error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL