Documentation ¶
Index ¶
Constants ¶
View Source
const ( CreateAlert = "/create/alert" //CreateAlert path for creating an alert GetAlerts = "/get/alerts" //GetAlerts path for getting all the alerts DeleteAlert = "/delete/alert/:id" //DeleteAlert path for deleting an alert GetToken = "/get/token" //GetToken path for getting a JWT token )
Variables ¶
This section is empty.
Functions ¶
func JWTAuthentication ¶
This is the middleware function that will be used to protect routes with JWT authentication
func NewEndpoint ¶
func NewEndpoint(app Application) *endpoint
func RegisterHTTPHandlers ¶
func RegisterHTTPHandlers(e *gin.RouterGroup, app Application)
Types ¶
type Application ¶
type Application interface { CreateAlert(c *gin.Context) // CreateAlert implements Application to create an alert GetAlerts(c *gin.Context) // GetAlerts implements Application to get all the alerts DeleteAlert(c *gin.Context) // DeleteAlert implements Application to delete an alert GetToken(c *gin.Context) // GetToken implements Application to get a JWT token }
Click to show internal directories.
Click to hide internal directories.