candles based alerts

This commit is contained in:
yash 2026-02-26 16:02:11 +03:00
parent bec3b7de5b
commit 999f675da9
11 changed files with 316 additions and 15 deletions

View file

@ -2,6 +2,7 @@ package repository
import (
"context"
"time"
"gitea.computernetthings.ru/yash/crypto_alert_bot/internal/entities"
"github.com/shopspring/decimal"
@ -22,4 +23,9 @@ type Storage interface {
DeleteAlert(ctx context.Context, id entities.AlertID) error
DisableAlert(ctx context.Context, id entities.AlertID) error
UpdateAlertPrice(ctx context.Context, id entities.AlertID, price decimal.Decimal) error
// GetLastAlertCheck returns the time of the last completed alert check.
// Returns zero time if no check has been recorded yet.
GetLastAlertCheck(ctx context.Context) (time.Time, error)
SetLastAlertCheck(ctx context.Context, t time.Time) error
}