Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ProcessScheduledReleases ¶
func ProcessScheduledReleases(w http.ResponseWriter, r *http.Request)
ProcessScheduledReleases is triggered by Cloud Scheduler every minute. It queries the API for pending releases and publishes them.
Environment variables:
- API_BASE_URL: Content API base URL (e.g., https://api-staging-854568123236.us-central1.run.app)
Authentication:
Uses Cloud Run IAM authentication. The function's service account must have roles/run.invoker on the target Content API service.
Types ¶
type PendingReleasesResponse ¶
type PendingReleasesResponse struct {
Success bool `json:"success"`
Data []ScheduledRelease `json:"data"`
}
PendingReleasesResponse from the API
type ScheduledRelease ¶
type ScheduledRelease struct {
ID int64 `json:"id"`
ContentID string `json:"content_id"`
ContentType string `json:"content_type"`
ArtistPubkey string `json:"artist_pubkey"`
ScheduledAt string `json:"scheduled_at"`
NotifyEmail *string `json:"notify_email,omitempty"`
NotifyOnPublish bool `json:"notify_on_publish"`
}
ScheduledRelease represents a pending scheduled release from the database
Click to show internal directories.
Click to hide internal directories.