Files
mtusi2026lab2/internal/app/chat/usecase.go
T
Khakimov Dmitrij 300ef7714e
Skeleton contracts / contracts (pull_request) Canceled after 0s
lab2 done
2026-10-06 22:38:28 +03:00

22 lines
1010 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 {
Ready(context.Context) error
CreateSession(context.Context, string, string) (domain.Login, error)
DeleteSession(context.Context, string) error
Authenticate(ctx context.Context, token string) (domain.User, error)
CreateUser(ctx context.Context, user domain.User, password string) (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)
}