()
| 761 | } |
| 762 | |
| 763 | func (s *Server) managementAvailabilityMiddleware() gin.HandlerFunc { |
| 764 | return func(c *gin.Context) { |
| 765 | if !s.managementAvailable(c) { |
| 766 | return |
| 767 | } |
| 768 | c.Next() |
| 769 | } |
| 770 | } |
| 771 | |
| 772 | func (s *Server) managementAvailable(c *gin.Context) bool { |
| 773 | if s == nil || s.cfg == nil { |
no test coverage detected