Documentation ¶
Index ¶
- Constants
- type PostgresRepositoryAdapter
- func (adapter *PostgresRepositoryAdapter) DeleteAllChatBirthdays(ctx context.Context, chatId int64) error
- func (adapter *PostgresRepositoryAdapter) DeleteAllUserBirthdays(ctx context.Context, userId int64) error
- func (adapter *PostgresRepositoryAdapter) DeleteBirthday(ctx context.Context, chatId int64, userId int64) error
- func (adapter *PostgresRepositoryAdapter) GetBirthdayDate(ctx context.Context, chatId int64, userId int64) (*time.Time, error)
- func (adapter *PostgresRepositoryAdapter) GetBirthdaysForDate(ctx context.Context, date time.Time) ([]birthday_bot.Birthday, error)
- func (adapter *PostgresRepositoryAdapter) GetNextBirthdays(ctx context.Context, chatId int64) ([]birthday_bot.Birthday, error)
- func (adapter *PostgresRepositoryAdapter) SaveBirthday(ctx context.Context, birthday birthday_bot.Birthday) error
- type TelegramBotWrapper
- func (wrapper *TelegramBotWrapper) SendMessage(ctx context.Context, chatId int64, text string) error
- func (wrapper *TelegramBotWrapper) SendReaction(ctx context.Context, chatId int64, messageId int, reaction string) error
- func (wrapper *TelegramBotWrapper) SendReply(ctx context.Context, chatId int64, messageId int, text string) error
Constants ¶
View Source
const FEBRUARY_28TH_YEAR_DAY = 59
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PostgresRepositoryAdapter ¶
type PostgresRepositoryAdapter struct {
// contains filtered or unexported fields
}
func NewSqlRepositoryAdapter ¶
func NewSqlRepositoryAdapter(database *pgxpool.Pool, clock *common.SystemClock) *PostgresRepositoryAdapter
func (*PostgresRepositoryAdapter) DeleteAllChatBirthdays ¶
func (adapter *PostgresRepositoryAdapter) DeleteAllChatBirthdays(ctx context.Context, chatId int64) error
func (*PostgresRepositoryAdapter) DeleteAllUserBirthdays ¶
func (adapter *PostgresRepositoryAdapter) DeleteAllUserBirthdays(ctx context.Context, userId int64) error
func (*PostgresRepositoryAdapter) DeleteBirthday ¶
func (*PostgresRepositoryAdapter) GetBirthdayDate ¶
func (*PostgresRepositoryAdapter) GetBirthdaysForDate ¶
func (adapter *PostgresRepositoryAdapter) GetBirthdaysForDate(ctx context.Context, date time.Time) ([]birthday_bot.Birthday, error)
func (*PostgresRepositoryAdapter) GetNextBirthdays ¶
func (adapter *PostgresRepositoryAdapter) GetNextBirthdays(ctx context.Context, chatId int64) ([]birthday_bot.Birthday, error)
func (*PostgresRepositoryAdapter) SaveBirthday ¶
func (adapter *PostgresRepositoryAdapter) SaveBirthday(ctx context.Context, birthday birthday_bot.Birthday) error
type TelegramBotWrapper ¶
type TelegramBotWrapper struct { BotId int64 // contains filtered or unexported fields }
func NewTelegramWrapper ¶
func NewTelegramWrapper(ctx context.Context, bot *telegram.Bot) *TelegramBotWrapper
func (*TelegramBotWrapper) SendMessage ¶
func (*TelegramBotWrapper) SendReaction ¶
Click to show internal directories.
Click to hide internal directories.