Documentation ¶
Index ¶
- Variables
- func NewModel() func(NewModelParams) (*Model, error)
- type Model
- func (m *Model) DeleteAllSubscribersByChatID(chatID int64) error
- func (m *Model) DeleteOneFeatureFlagByChatID(chatID int64) error
- func (m *Model) DeleteOneOptionByChatID(chatID int64) error
- func (m *Model) DisableChatHistoriesRecap(chatID int64, chatType telegram.ChatType, chatTitle string) error
- func (m *Model) EnableChatHistoriesRecap(chatID int64, chatType telegram.ChatType, chatTitle string) error
- func (m *Model) FindAutoRecapsSubscribers(chatID int64) ([]*ent.TelegramChatAutoRecapsSubscribers, error)
- func (m *Model) FindOneAutoRecapsSubscriber(chatID int64, userID int64) (*ent.TelegramChatAutoRecapsSubscribers, error)
- func (m *Model) FindOneOrCreateRecapsOption(chatID int64) (*ent.TelegramChatRecapsOptions, error)
- func (m *Model) FindOneRecapsOption(chatID int64) (*ent.TelegramChatRecapsOptions, error)
- func (m *Model) HasChatHistoriesRecapEnabled(chatID int64, chatTitle string) (bool, error)
- func (m *Model) ListChatHistoriesRecapEnabledChats() ([]*ent.TelegramChatFeatureFlags, error)
- func (m *Model) ManualRecapRatePerSeconds(option *ent.TelegramChatRecapsOptions) time.Duration
- func (m *Model) MigrateFeatureFlagsOfChatFromChatIDToChatID(fromChatID int64, toChatID int64) error
- func (m *Model) MigrateOptionOfChatFromChatIDToChatID(fromChatID int64, toChatID int64) error
- func (m *Model) MigrateSubscribersOfChatFromChatIDToChatID(fromChatID int64, toChatID int64) error
- func (m *Model) QueueOneSendChatHistoriesRecapTaskForChatID(chatID int64, options *ent.TelegramChatRecapsOptions) error
- func (m *Model) QueueSendChatHistoriesRecapTask()
- func (m *Model) SetAutoRecapRatesPerDay(chatID int64, ratesPerDay int) error
- func (m *Model) SetRecapsRecapMode(chatID int64, recapMode tgchat.AutoRecapSendMode) error
- func (m *Model) SubscribeToAutoRecaps(chatID int64, userID int64) error
- func (m *Model) UnsubscribeToAutoRecaps(chatID int64, userID int64) error
- type NewModelParams
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 (*Model) DeleteOneFeatureFlagByChatID ¶ added in v0.17.0
func (*Model) DeleteOneOptionByChatID ¶ added in v0.17.0
func (*Model) DisableChatHistoriesRecap ¶
func (*Model) EnableChatHistoriesRecap ¶
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 (*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 (*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 (*Model) MigrateOptionOfChatFromChatIDToChatID ¶ added in v0.20.0
func (*Model) MigrateSubscribersOfChatFromChatIDToChatID ¶ added in v0.20.0
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 (*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
Click to show internal directories.
Click to hide internal directories.