2020-03-04 10:29:00 +00:00
|
|
|
package messages
|
|
|
|
|
|
|
|
import (
|
|
|
|
"time"
|
|
|
|
)
|
|
|
|
|
2020-03-04 14:20:47 +00:00
|
|
|
func Samples() {
|
2020-03-04 10:29:00 +00:00
|
|
|
m1 := &Message{
|
|
|
|
Title: "Routine Downtime",
|
|
|
|
Description: "This is an example a upcoming message for a service!",
|
|
|
|
ServiceId: 1,
|
|
|
|
StartOn: time.Now().UTC().Add(15 * time.Minute),
|
|
|
|
EndOn: time.Now().UTC().Add(2 * time.Hour),
|
|
|
|
}
|
|
|
|
|
2020-03-04 14:20:47 +00:00
|
|
|
m1.Create()
|
|
|
|
|
2020-03-04 10:29:00 +00:00
|
|
|
m2 := &Message{
|
|
|
|
Title: "Server Reboot",
|
|
|
|
Description: "This is another example a upcoming message for a service!",
|
|
|
|
ServiceId: 3,
|
|
|
|
StartOn: time.Now().UTC().Add(15 * time.Minute),
|
|
|
|
EndOn: time.Now().UTC().Add(2 * time.Hour),
|
|
|
|
}
|
|
|
|
|
2020-03-04 14:20:47 +00:00
|
|
|
m2.Create()
|
2020-03-04 10:29:00 +00:00
|
|
|
}
|