app

package
v0.0.0-...-ed888d6 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2024 License: AGPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetDatabase

func GetDatabase(dsn string) *gorm.DB

Types

type App

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

func New

func New(ctx context.Context, b *bot.Bot, dsn string) App

func (*App) CancelTimerHandler

func (a *App) CancelTimerHandler(ctx context.Context, b *bot.Bot, update *models.Update)

func (*App) CreateTimerHandler

func (a *App) CreateTimerHandler(ctx context.Context, b *bot.Bot, update *models.Update)

func (*App) ScheduleNotification

func (a *App) ScheduleNotification(ctx NotifyContext) uint

func (*App) SetOffsetHandler

func (a *App) SetOffsetHandler(ctx context.Context, b *bot.Bot, update *models.Update)

func (*App) Start

func (a *App) Start()

type NotifyContext

type NotifyContext struct {
	gorm.Model
	ChatId                 int64
	OriginalMessageId      int
	RescheduleCallbackData string
	TimeableName           string
	TriggerAt              int64
}

type UserOffset

type UserOffset struct {
	UserId int64
	Offset int
}

Jump to

Keyboard shortcuts

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