chat

package
v0.0.0-...-2e430cb Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Storage

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

func NewChatStorage

func NewChatStorage(
	database *mongo.Database,
) *Storage

func (*Storage) CountChatsWithProfitability

func (storage *Storage) CountChatsWithProfitability(
	ctx context.Context,
	profitability model.ProfitabilitySettingsType,
) (int64, error)

func (*Storage) CreateChat

func (storage *Storage) CreateChat(
	ctx context.Context,
	chat model.Chat,
) error

func (*Storage) DeleteChat

func (storage *Storage) DeleteChat(
	ctx context.Context,
	chatID model.ChatID,
) error

func (*Storage) GetChatByChatID

func (storage *Storage) GetChatByChatID(
	ctx context.Context,
	chatID model.ChatID,
) (*model.Chat, error)

func (*Storage) GetChatsWithProfitability

func (storage *Storage) GetChatsWithProfitability(
	ctx context.Context,
	settingsType model.ProfitabilitySettingsType,
	skipCount, limit int64,
) ([]model.Chat, error)

func (*Storage) UpdateChatProfitability

func (storage *Storage) UpdateChatProfitability(
	ctx context.Context,
	chatID model.ChatID,
	newProfitability model.ProfitabilitySettingsType,
) error

Jump to

Keyboard shortcuts

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