refactor-location #134
|
@ -0,0 +1,8 @@
|
||||||
|
package model
|
||||||
|
|
||||||
|
type QueueScheduleTaskRequest struct {
|
||||||
|
ID string `json:"id"`
|
||||||
|
NatsSubject string `json:"natsSubject"`
|
||||||
|
Data string `json:"data"`
|
||||||
|
StartAt int64 `json:"startAt"` // unix
|
||||||
|
}
|
|
@ -15,6 +15,7 @@ var prefixes = struct {
|
||||||
Staff string
|
Staff string
|
||||||
Segment string
|
Segment string
|
||||||
Product string
|
Product string
|
||||||
|
Queue string
|
||||||
Campaign string
|
Campaign string
|
||||||
Affiliate string
|
Affiliate string
|
||||||
}{
|
}{
|
||||||
|
@ -32,6 +33,7 @@ var prefixes = struct {
|
||||||
Staff: "staff",
|
Staff: "staff",
|
||||||
Segment: "segment",
|
Segment: "segment",
|
||||||
Product: "product",
|
Product: "product",
|
||||||
|
Queue: "queue",
|
||||||
Campaign: "campaign",
|
Campaign: "campaign",
|
||||||
Affiliate: "affiliate",
|
Affiliate: "affiliate",
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,13 @@
|
||||||
|
package subject
|
||||||
|
|
||||||
|
import "fmt"
|
||||||
|
|
||||||
|
func getQueueValue(val string) string {
|
||||||
|
return fmt.Sprintf("%s.%s", prefixes.Queue, val)
|
||||||
|
}
|
||||||
|
|
||||||
|
var Queue = struct {
|
||||||
|
ScheduleTask string
|
||||||
|
}{
|
||||||
|
ScheduleTask: getQueueValue("schedule_task"),
|
||||||
|
}
|
Loading…
Reference in New Issue