Documentation
¶
Index ¶
- func ErrorHandlerMiddleware() gin.HandlerFunc
- func LoggerMiddleware() gin.HandlerFunc
- func RequireAuth(db database.Service, oidc *auth.OIDCConfig, sessionSecret string, ...) gin.HandlerFunc
- type AuthHandler
- func (h *AuthHandler) CheckRegistrationStatus(c *gin.Context)
- func (h *AuthHandler) GetUserInfo(c *gin.Context)
- func (h *AuthHandler) InitOIDCRoutes(r *gin.RouterGroup)
- func (h *AuthHandler) Login(c *gin.Context)
- func (h *AuthHandler) Logout(c *gin.Context)
- func (h *AuthHandler) Register(c *gin.Context)
- func (h *AuthHandler) Verify(c *gin.Context)
- type ErrorResponse
- type Server
- func (s *Server) BroadcastMonitorUpdate(update types.MonitorUpdate)
- func (s *Server) BroadcastPacketLossUpdate(update types.PacketLossUpdate)
- func (s *Server) BroadcastTracerouteUpdate(update types.TracerouteUpdate)
- func (s *Server) BroadcastUpdate(update types.SpeedUpdate)
- func (s *Server) Initialize()
- func (s *Server) RegisterRoutes()
- func (s *Server) SetMonitorService(service *monitor.Service)
- func (s *Server) SetPacketLossService(service *speedtest.PacketLossService)
- func (s *Server) StartScheduler(ctx context.Context)
- type SessionClaims
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ErrorHandlerMiddleware ¶ added in v0.3.0
func ErrorHandlerMiddleware() gin.HandlerFunc
ErrorHandlerMiddleware handles errors set by handlers and returns proper JSON responses
func LoggerMiddleware ¶
func LoggerMiddleware() gin.HandlerFunc
func RequireAuth ¶ added in v0.1.0
func RequireAuth(db database.Service, oidc *auth.OIDCConfig, sessionSecret string, handler *AuthHandler, whitelist []string) gin.HandlerFunc
Types ¶
type AuthHandler ¶
type AuthHandler struct {
// contains filtered or unexported fields
}
func NewAuthHandler ¶
func NewAuthHandler(db database.Service, oidc *auth.OIDCConfig, sessionSecret string, whitelist []string) *AuthHandler
func (*AuthHandler) CheckRegistrationStatus ¶
func (h *AuthHandler) CheckRegistrationStatus(c *gin.Context)
func (*AuthHandler) GetUserInfo ¶
func (h *AuthHandler) GetUserInfo(c *gin.Context)
func (*AuthHandler) InitOIDCRoutes ¶ added in v0.1.0
func (h *AuthHandler) InitOIDCRoutes(r *gin.RouterGroup)
func (*AuthHandler) Login ¶
func (h *AuthHandler) Login(c *gin.Context)
func (*AuthHandler) Logout ¶
func (h *AuthHandler) Logout(c *gin.Context)
func (*AuthHandler) Register ¶
func (h *AuthHandler) Register(c *gin.Context)
func (*AuthHandler) Verify ¶
func (h *AuthHandler) Verify(c *gin.Context)
type ErrorResponse ¶ added in v0.3.0
ErrorResponse represents the structure of error responses
type Server ¶
func (*Server) BroadcastMonitorUpdate ¶ added in v0.4.0
func (s *Server) BroadcastMonitorUpdate(update types.MonitorUpdate)
func (*Server) BroadcastPacketLossUpdate ¶ added in v0.4.0
func (s *Server) BroadcastPacketLossUpdate(update types.PacketLossUpdate)
func (*Server) BroadcastTracerouteUpdate ¶ added in v0.3.0
func (s *Server) BroadcastTracerouteUpdate(update types.TracerouteUpdate)
func (*Server) BroadcastUpdate ¶
func (s *Server) BroadcastUpdate(update types.SpeedUpdate)
func (*Server) Initialize ¶ added in v0.4.0
func (s *Server) Initialize()
func (*Server) RegisterRoutes ¶
func (s *Server) RegisterRoutes()
func (*Server) SetMonitorService ¶ added in v0.4.0
func (*Server) SetPacketLossService ¶ added in v0.4.0
func (s *Server) SetPacketLossService(service *speedtest.PacketLossService)
func (*Server) StartScheduler ¶ added in v0.1.0
type SessionClaims ¶ added in v0.10.0
Click to show internal directories.
Click to hide internal directories.