usecases

package
v0.0.0-...-bae6b6e Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrChatsNotFound is returned when chats are not found.
	ErrChatsNotFound = errors.New("chats not found")
	// ErrChatsNotAllow is returned when chats are not allowed.
	ErrChatsNotAllow = errors.New("chats not allowed")
	// ErrCanNotSend is returned when a message cannot be sent.
	ErrCanNotSend = errors.New("can not send message")
)
View Source
var (
	// ErrCompanyNotFound is returned when a company is not found.
	ErrCompanyNotFound = errors.New("company not found")
)

Functions

func NewChatUsecases

func NewChatUsecases(cs chatsStorage, coms companyStorage) *chatUsecases

NewChatUsecases returns a new instance of the chatUsecases struct, which provides use cases for managing chats. It takes in a chatsStorage interface and a companyStorage interface as parameters.

func NewCompanyUsecases

func NewCompanyUsecases(cs companyStorage, chs chatStorage) *companyUsecases

NewCompanyUsecases creates a new instance of companyUsecases.

func NewSendMessageUsecases

func NewSendMessageUsecases(logger *slog.Logger, cg chatGeter, bs botSender) *sendMessageUsacases

NewSendMessageUsecases creates a new instance of sendMessageUsacases with the provided dependencies.

Types

This section is empty.

Directories

Path Synopsis
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

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