Documentation
¶
Index ¶
- Variables
- func AcceptConnection(w http.ResponseWriter, r *http.Request)
- func AuthMiddleware(next http.Handler, secretKey interface{}, authConfig AuthConfig) http.Handler
- func ConvertToByteSecretKey(secretKey interface{}) ([]byte, error)
- func NewRouter(...) *mux.Router
- func StartCloudmillWebsocket()
- type AuthConfig
- type JwtClaim
- type Route
- type Routes
- type UserCustomClaim
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ClientPool *models.ClientPool
)
View Source
var CloudmillWebsocketOpenRoutes = Routes{ Route{ Name: "HealthCheck", Method: "GET,OPTIONS", Pattern: "/healthz", HandlerFunc: okHandler, }, Route{ Name: "ReadinessCheck", Method: "GET,OPTIONS", Pattern: "/readyz", HandlerFunc: okHandler, }, Route{ Name: "LivenessCheck", Method: "GET,OPTIONS", Pattern: "/livez", HandlerFunc: okHandler, }, }
View Source
var CloudmillWebsocketProtectedRoutes = Routes{ Route{ Name: "connect", Method: "GET,OPTIONS", Pattern: "/connect", HandlerFunc: AcceptConnection, }, }
Functions ¶
func AcceptConnection ¶
func AcceptConnection(w http.ResponseWriter, r *http.Request)
func AuthMiddleware ¶
func AuthMiddleware( next http.Handler, secretKey interface{}, authConfig AuthConfig, ) http.Handler
func ConvertToByteSecretKey ¶
func StartCloudmillWebsocket ¶
func StartCloudmillWebsocket()
Types ¶
type AuthConfig ¶
type JwtClaim ¶
type JwtClaim struct {
CustomClaims UserCustomClaim
jwt.RegisteredClaims
}
Click to show internal directories.
Click to hide internal directories.