Documentation ¶
Index ¶
- type Server
- func (s *Server) APIKeyCreate(c *gin.Context)
- func (s *Server) APIKeyDelete(c *gin.Context)
- func (s *Server) APIKeyDetail(c *gin.Context)
- func (s *Server) APIKeyList(c *gin.Context)
- func (s *Server) APIKeyUpdate(c *gin.Context)
- func (s *Server) Authenticate(c *gin.Context)
- func (s *Server) Available() gin.HandlerFunc
- func (s *Server) Healthy() bool
- func (s *Server) Login(c *gin.Context)
- func (s *Server) Refresh(c *gin.Context)
- func (s *Server) Register(c *gin.Context)
- 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) Status(c *gin.Context)
- func (s *Server) URL() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Server ¶
Server implements the API router and handlers.
func (*Server) APIKeyCreate ¶
TODO: document TODO: actually implement this resource endpoint HACK: this is just a quick hack to get us going: it creates an api key quickly
func (*Server) APIKeyDelete ¶
func (*Server) APIKeyDetail ¶
func (*Server) APIKeyList ¶
TODO: document TODO: actually implement this resource endpoint TODO: implement pagination HACK: this is just a quick hack to get us going, it should filter api keys based on the authenticated user and organization instead of just returning everyting.
func (*Server) APIKeyUpdate ¶
func (*Server) Authenticate ¶
TODO: add documentation TODO: simplify the code in this handler
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) Register ¶
TODO: add documentation TODO: review and ensure the register methodology is what we want