Versions in this module Expand all Collapse all v2 v2.0.0 Apr 23, 2023 Changes in this version + var ErrBadRequest = ErrNS.NewType("bad_request") + var ErrInternalServer = ErrNS.NewType("internal_server_error") + var ErrNS = errorx.NewNamespace("error.api") + var ErrNoClusterPrivilege = ErrNS.NewType("no_cluster_privilege") + var ErrNoNamespacePrivilege = ErrNS.NewType("no_namespace_privilege") + var ErrNotFound = ErrNS.NewType("resource_not_found") + var ErrUnknown = ErrNS.NewType("unknown") + var Log = ctrl.Log.WithName("apiserver") + var ResponseSuccess = Response + func AuthMiddleware(c *gin.Context, config *config.ChaosDashboardConfig) + func SetAPIError(c *gin.Context, err *errorx.Error) + func SetAPImachineryError(c *gin.Context, err error) + func ShouldBindBodyWithJSON(c *gin.Context, obj interface{}) (err error) + type APIError struct + Code int + FullText string + Message string + Type string + type MapStringSliceResponse map[string][]string + type Response struct + Status string