Files
mtusi2026lab2/internal/app/chat/usecase.go
T
2026-10-06 19:51:28 +03:00

19 lines
851 B
Go

package chat
import (
"context"
"gitflic.ru/akselbant/mtusi2026lab1-fork/internal/pkg/domain"
)
// UseCase is the application boundary required by the HTTP handler.
type UseCase interface {
Authenticate(ctx context.Context, rawUserID string) (domain.User, error)
CreateUser(ctx context.Context, user domain.User) (domain.User, error)
CreateChat(ctx context.Context, callerID string, chat domain.Chat) (domain.Chat, error)
GetChat(ctx context.Context, callerID string, chat domain.Chat) (domain.Chat, error)
ListChats(ctx context.Context, callerID string, pagination domain.Pagination) (domain.ChatPage, error)
CreateMessage(ctx context.Context, callerID string, message domain.Message) (domain.Message, error)
ListMessages(ctx context.Context, callerID string, chat domain.Chat, pagination domain.Pagination) (domain.MessagePage, error)
}