Documentation ¶
Index ¶
- func APIKeyCreate(c *gin.Context)
- func APIKeyDelete(c *gin.Context)
- func APIKeyDetail(c *gin.Context)
- func APIKeyList(c *gin.Context)
- func APIKeyUpdate(c *gin.Context)
- func MemberCreate(c *gin.Context)
- func MemberDelete(c *gin.Context)
- func MemberDetail(c *gin.Context)
- func MemberList(c *gin.Context)
- func MemberUpdate(c *gin.Context)
- func ProjectCreate(c *gin.Context)
- func ProjectDelete(c *gin.Context)
- func ProjectDetail(c *gin.Context)
- func ProjectList(c *gin.Context)
- func ProjectUpdate(c *gin.Context)
- func TenantCreate(c *gin.Context)
- func TenantDelete(c *gin.Context)
- func TenantDetail(c *gin.Context)
- func TenantList(c *gin.Context)
- func TenantUpdate(c *gin.Context)
- func TopicCreate(c *gin.Context)
- func TopicDelete(c *gin.Context)
- func TopicDetail(c *gin.Context)
- func TopicList(c *gin.Context)
- func TopicUpdate(c *gin.Context)
- type Server
- func (s *Server) Available() gin.HandlerFunc
- func (s *Server) Healthy() bool
- func (s *Server) Serve() (err error)
- func (s *Server) SetHealth(health bool)
- func (s *Server) SetURL(url string)
- func (s *Server) Shutdown() (err error)
- func (s *Server) SignUp(c *gin.Context)
- func (s *Server) Status(c *gin.Context)
- func (s *Server) URL() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func APIKeyCreate ¶ added in v0.1.1
func APIKeyDelete ¶ added in v0.1.1
func APIKeyDetail ¶ added in v0.1.1
func APIKeyList ¶ added in v0.1.1
func APIKeyUpdate ¶ added in v0.1.1
func MemberCreate ¶ added in v0.1.1
func MemberDelete ¶ added in v0.1.1
func MemberDetail ¶ added in v0.1.1
func MemberList ¶ added in v0.1.1
func MemberUpdate ¶ added in v0.1.1
func ProjectCreate ¶ added in v0.1.1
func ProjectDelete ¶ added in v0.1.1
func ProjectDetail ¶ added in v0.1.1
func ProjectList ¶ added in v0.1.1
func ProjectUpdate ¶ added in v0.1.1
func TenantCreate ¶ added in v0.1.1
func TenantDelete ¶ added in v0.1.1
func TenantDetail ¶ added in v0.1.1
func TenantList ¶ added in v0.1.1
func TenantUpdate ¶ added in v0.1.1
func TopicCreate ¶ added in v0.1.1
func TopicDelete ¶ added in v0.1.1
func TopicDetail ¶ added in v0.1.1
func TopicUpdate ¶ added in v0.1.1
Types ¶
type Server ¶
Server implements the API router and handlers.
func (*Server) Available ¶
func (s *Server) Available() gin.HandlerFunc
Available is middleware that uses healthy boolean to return a service unavailable http status code if the server is shutting down or in maintenance mode. This middleware must be fairly early on in the chain to ensure that complex handling does not slow the shutdown of the server.
func (*Server) SignUp ¶
Signs up a contact to receive notifications from SendGrid by making a request to the SendGrid add contacts marketing API. The SendGrid API is asynchronous, which means that it doesn't return success if the user is registered. Instead a job ID is returned and the endpoint has to check if the registration was actually successful or not. To not block this endpoint, sign up doesn't check success but returns ok if the registration was correctly submitted.
TODO: check for when the user is successfully signed up then send a welcome email. TODO: move all sendgrid-specific functionality into its own helper package. TODO: search for ensign list ID rather than configuring it externally.