dialog

package
v0.0.0-...-7669f62 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateDialogParams

type CreateDialogParams struct {
	ParticipantsIDs []model.UserID
}

type CreateMessageParams

type CreateMessageParams struct {
	DialogID model.DialogID
	SenderID model.UserID
	Text     string
}

type GetDialogMessagesParams

type GetDialogMessagesParams struct {
	UserID   model.UserID
	DialogID model.DialogID
}

type Service

type Service interface {
	CreateDialog(ctx context.Context, params *CreateDialogParams) (*model.Dialog, error)
	CreateMessage(ctx context.Context, params *CreateMessageParams) error
	GetDialogMessages(ctx context.Context, params *GetDialogMessagesParams) ([]*model.Message, error)
}

type ServiceImpl

type ServiceImpl struct {
	// contains filtered or unexported fields
}

func NewServiceImpl

func NewServiceImpl(logger *zap.Logger, storage storage.Storage, client counter.Client) *ServiceImpl

func (*ServiceImpl) CreateDialog

func (s *ServiceImpl) CreateDialog(ctx context.Context, params *CreateDialogParams) (*model.Dialog, error)

func (*ServiceImpl) CreateMessage

func (s *ServiceImpl) CreateMessage(ctx context.Context, params *CreateMessageParams) error

func (*ServiceImpl) GetDialogMessages

func (s *ServiceImpl) GetDialogMessages(ctx context.Context, params *GetDialogMessagesParams) ([]*model.Message, error)

Jump to

Keyboard shortcuts

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