Documentation ¶
Index ¶
- Variables
- func BatchCreate(req *request.Request, res *response.Response, next func())
- func BatchIndex(req *request.Request, res *response.Response, next func())
- func BatchList(req *request.Request, res *response.Response, next func())
- func BatchLogs(req *request.Request, res *response.Response, next func())
- func BatchUpdateMGStatus(req *request.Request, res *response.Response, next func())
- func BatchUpdateSGStatus(req *request.Request, res *response.Response, next func())
- func GetStats(req *request.Request, res *response.Response, next func())
- func IsLoggedIn(res *response.Response) bool
- func LoginIndex(req *request.Request, res *response.Response, next func())
- func LoginVerify(req *request.Request, res *response.Response, next func())
- func UserIndex(req *request.Request, res *response.Response, next func())
- func UserLogout(req *request.Request, res *response.Response, next func())
- func UserUpdate(req *request.Request, res *response.Response, next func())
Constants ¶
This section is empty.
Variables ¶
View Source
var BatchController = func() interface{} { var Router = express.Router() Router.Post("/api/batch", BatchCreate) Router.Get("/api/batches", BatchList) Router.Get("/api/batch/:id", BatchIndex) Router.Get("/api/batch/:id/logs", BatchLogs) return *Router }()
View Source
var LoginController = func() interface{} { var Router = express.Router() Router.Get("/api/login", LoginIndex) Router.Get("/api/login/oAuth", LoginVerify) return *Router }()
View Source
var StatsController = func() interface{} { var Router = express.Router() Router.Get("/api/stats", GetStats) return *Router }()
View Source
var UserController = func() interface{} { var Router = express.Router() Router.Get("/api/user", UserIndex) Router.Get("/api/user/logout", UserLogout) Router.Post("/api/user", UserUpdate) return *Router }()
View Source
var WebhookController = func() interface{} { var Router = express.Router() Router.Post("/api/webhook/sendgrid", BatchUpdateSGStatus) Router.Post("/api/webhook/mailgun", BatchUpdateMGStatus) return *Router }()
Functions ¶
func BatchCreate ¶
Create a new mail Batch for dispatch
func BatchIndex ¶
Fetches data of a batch, provided the api_key
func BatchLogs ¶
Retrieves all the logs associated to a batch, a batch can have multiple logs attached to it, each corresponding to a individual recipient
func BatchUpdateMGStatus ¶
MailGun Webhook Mailgun service only provides delivered, bounced and hardfail status so we can only take actions in case of a bounced email only.
func BatchUpdateSGStatus ¶
Updates Sendgrid status Sendgrid is by far the best way to handle emails The status varies with granular details which helps in taking decisions properly. Sendgrid posts an array of JSON events.
func IsLoggedIn ¶
func UserLogout ¶
Logout handler
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.