// Statup // Copyright (C) 2018. Hunter Long and the project contributors // Written by Hunter Long and the project contributors // // https://github.com/hunterlong/statup // // The licenses for most software and other practical works are designed // to take away your freedom to share and change the works. By contrast, // the GNU General Public License is intended to guarantee your freedom to // share and change all versions of a program--to make sure it remains free // software for all its users. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . package notifiers import ( "github.com/GeertJohan/go.rice/embedded" "time" ) func init() { // define files file2 := &embedded.EmbeddedFile{ Filename: "failure.html", FileModTime: time.Unix(1531720141, 0), Content: string("\n\n\n \n \n Sample Email\n\n\n\n\n\n \n \n \n
\n \n\n \n \n \n
\n \n\n \n \n \n
\n

{{ .Service.Name }} is Offline!

\n

\n Your Statup service '{{.Service.Name}}' has been triggered with a HTTP status code of '{{.Service.LastStatusCode}}' and is currently offline based on your requirements. This failure was created on {{.Service.CreatedAt}}.\n

\n\n {{if .Service.LastResponse }}\n

Last Response

\n

\n {{ .Service.LastResponse }}\n

\n {{end}}\n\n \n \n \n
\n View Service\n \n Statup Dashboard\n
\n
\n
\n
\n\n"), } file3 := &embedded.EmbeddedFile{ Filename: "message.html", FileModTime: time.Unix(1530546686, 0), Content: string("\n\n\n \n \n Sample Email\n\n\n\n\n\n \n \n \n
\n \n\n \n \n \n
\n \n\n \n \n \n
\n

Looks Like Emails Work!

\n

\n Since you got this email, it confirms that your Statup Status Page email system is working correctly.\n

\n

\n

\n Enjoy using Statup!\n
Statup.io Team

\n\n \n\n
\n
\n
\n
\n\n"), } // define dirs dir1 := &embedded.EmbeddedDir{ Filename: "", DirModTime: time.Unix(1531720141, 0), ChildFiles: []*embedded.EmbeddedFile{ file2, // "failure.html" file3, // "message.html" }, } // link ChildDirs dir1.ChildDirs = []*embedded.EmbeddedDir{} // register embeddedBox embedded.RegisterEmbeddedBox(`emails`, &embedded.EmbeddedBox{ Name: `emails`, Time: time.Unix(1531720141, 0), Dirs: map[string]*embedded.EmbeddedDir{ "": dir1, }, Files: map[string]*embedded.EmbeddedFile{ "failure.html": file2, "message.html": file3, }, }) }