Spaces:
Paused
Paused
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 Download api/pkg/repositories/heartbeat_monitor_repository.go from red-kit/httpsms-gateway: direct link, hf CLI and curl.
- Browser
- Download file 1.23 kB
-
https://huggingface.co/spaces/red-kit/httpsms-gateway/resolve/main/api/pkg/repositories/heartbeat_monitor_repository.go
- Command line
-
hf download hf://spaces/red-kit/httpsms-gateway/api/pkg/repositories/heartbeat_monitor_repository.go
-
curl -L -o heartbeat_monitor_repository.go https://huggingface.co/spaces/red-kit/httpsms-gateway/resolve/main/api/pkg/repositories/heartbeat_monitor_repository.go
1.23 kB
| package repositories | |
| import ( | |
| "context" | |
| "github.com/google/uuid" | |
| "github.com/NdoleStudio/httpsms/pkg/entities" | |
| ) | |
| // HeartbeatMonitorRepository loads and persists an entities.HeartbeatMonitor | |
| type HeartbeatMonitorRepository interface { | |
| // Store a new entities.HeartbeatMonitor | |
| Store(ctx context.Context, heartbeat *entities.HeartbeatMonitor) error | |
| // Load a phone by user and phone number | |
| Load(ctx context.Context, userID entities.UserID, phoneNumber string) (*entities.HeartbeatMonitor, error) | |
| // Exists checks if a heartbeat monitor exists for a phone number | |
| Exists(ctx context.Context, userID entities.UserID, monitorID uuid.UUID) (bool, error) | |
| // UpdateQueueID updates the queueID of a monitor | |
| UpdateQueueID(ctx context.Context, monitorID uuid.UUID, queueID string) error | |
| // Delete an entities.HeartbeatMonitor | |
| Delete(ctx context.Context, userID entities.UserID, phoneNumber string) error | |
| // UpdatePhoneOnline updates the phone online status of a monitor | |
| UpdatePhoneOnline(ctx context.Context, userID entities.UserID, monitorID uuid.UUID, online bool) error | |
| // DeleteAllForUser deletes all entities.HeartbeatMonitor for a user | |
| DeleteAllForUser(ctx context.Context, userID entities.UserID) error | |
| } | |