httpsms-gateway / api /pkg /emails /user_email_factory.go
ML Intern deploy
Deploy httpSMS gateway to Hugging Face Spaces (Docker SDK): nginx :7860 -> Go API :8000, Nuxt SPA, Android APK, bootstrap-mode entrypoint
83a59ca
Raw History Blame Contribute Delete
803 Bytes
package emails
import (
"time"
"github.com/NdoleStudio/httpsms/pkg/entities"
)
// UserEmailFactory generates emails to a user
type UserEmailFactory interface {
// PhoneDead sends an emails when the user's phone is not sending heartbeats
PhoneDead(user *entities.User, lastHeartbeatTimestamp time.Time, owner string) (*Email, error)
// UsageLimitExceeded sends an email when the user's limit is exceeded
UsageLimitExceeded(user *entities.User, usage *entities.BillingUsage) (*Email, error)
// UsageLimitAlert sends an email when a user is approaching the limit
UsageLimitAlert(user *entities.User, usage *entities.BillingUsage) (*Email, error)
// APIKeyRotated sends an email when the API key is rotated
APIKeyRotated(email string, timestamp time.Time, timezone string) (*Email, error)
}