Files
grosbeak/internal/types/jobs.go
Matt Jadud f53639af2f Queueing, prepping to fetch
A lot more to go, but this is the core.

Need to think about how to test the queue handlers.
2025-11-30 21:29:30 -05:00

23 lines
388 B
Go

package types
import "encoding/json"
type Job interface {
AsJson() string
}
// Used by all of the jobs.
func _as_json(j Job) string {
as_json, _ := json.Marshal(j)
return string(as_json)
}
type EntreJob struct {
URL string `json:"url"`
UpdateFrequency UpdateFrequency `json:"update_frequency"`
}
func (ej *EntreJob) AsJson() string {
return _as_json(ej)
}