tgchats

package
v0.23.0 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2023 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var MapScheduleHours = map[int][]int64{
	2: {8, 20},
	3: {0, 8, 16},
	4: {2, 8, 14, 20},
}

Functions

func NewModel

func NewModel() func(NewModelParams) (*Model, error)

Types

type Model

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

func (*Model) DeleteAllSubscribersByChatID added in v0.17.0

func (m *Model) DeleteAllSubscribersByChatID(chatID int64) error

func (*Model) DeleteOneFeatureFlagByChatID added in v0.17.0

func (m *Model) DeleteOneFeatureFlagByChatID(chatID int64) error

func (*Model) DeleteOneOptionByChatID added in v0.17.0

func (m *Model) DeleteOneOptionByChatID(chatID int64) error

func (*Model) DisableChatHistoriesRecap

func (m *Model) DisableChatHistoriesRecap(chatID int64, chatType telegram.ChatType, chatTitle string) error

func (*Model) EnableChatHistoriesRecap

func (m *Model) EnableChatHistoriesRecap(chatID int64, chatType telegram.ChatType, chatTitle string) error

func (*Model) FindAutoRecapsSubscribers added in v0.14.0

func (m *Model) FindAutoRecapsSubscribers(chatID int64) ([]*ent.TelegramChatAutoRecapsSubscribers, error)

func (*Model) FindOneAutoRecapsSubscriber added in v0.14.0

func (m *Model) FindOneAutoRecapsSubscriber(chatID int64, userID int64) (*ent.TelegramChatAutoRecapsSubscribers, error)

func (*Model) FindOneOrCreateRecapsOption added in v0.23.0

func (m *Model) FindOneOrCreateRecapsOption(chatID int64) (*ent.TelegramChatRecapsOptions, error)

func (*Model) FindOneRecapsOption added in v0.14.0

func (m *Model) FindOneRecapsOption(chatID int64) (*ent.TelegramChatRecapsOptions, error)

func (*Model) HasChatHistoriesRecapEnabled

func (m *Model) HasChatHistoriesRecapEnabled(chatID int64, chatTitle string) (bool, error)

func (*Model) ListChatHistoriesRecapEnabledChats

func (m *Model) ListChatHistoriesRecapEnabledChats() ([]*ent.TelegramChatFeatureFlags, error)

func (*Model) ManualRecapRatePerSeconds added in v0.16.0

func (m *Model) ManualRecapRatePerSeconds(option *ent.TelegramChatRecapsOptions) time.Duration

func (*Model) MigrateFeatureFlagsOfChatFromChatIDToChatID added in v0.20.0

func (m *Model) MigrateFeatureFlagsOfChatFromChatIDToChatID(fromChatID int64, toChatID int64) error

func (*Model) MigrateOptionOfChatFromChatIDToChatID added in v0.20.0

func (m *Model) MigrateOptionOfChatFromChatIDToChatID(fromChatID int64, toChatID int64) error

func (*Model) MigrateSubscribersOfChatFromChatIDToChatID added in v0.20.0

func (m *Model) MigrateSubscribersOfChatFromChatIDToChatID(fromChatID int64, toChatID int64) error

func (*Model) QueueOneSendChatHistoriesRecapTaskForChatID

func (m *Model) QueueOneSendChatHistoriesRecapTaskForChatID(chatID int64, options *ent.TelegramChatRecapsOptions) error

func (*Model) QueueSendChatHistoriesRecapTask

func (m *Model) QueueSendChatHistoriesRecapTask()

func (*Model) SetAutoRecapRatesPerDay added in v0.23.0

func (m *Model) SetAutoRecapRatesPerDay(chatID int64, ratesPerDay int) error

func (*Model) SetRecapsRecapMode added in v0.14.0

func (m *Model) SetRecapsRecapMode(chatID int64, recapMode tgchat.AutoRecapSendMode) error

func (*Model) SubscribeToAutoRecaps added in v0.14.0

func (m *Model) SubscribeToAutoRecaps(chatID int64, userID int64) error

func (*Model) UnsubscribeToAutoRecaps added in v0.14.0

func (m *Model) UnsubscribeToAutoRecaps(chatID int64, userID int64) error

type NewModelParams

type NewModelParams struct {
	fx.In

	Config *configs.Config
	Ent    *datastore.Ent
	Digger *datastore.AutoRecapTimeCapsuleDigger
	Logger *logger.Logger
}

Jump to

Keyboard shortcuts

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