Documentation ¶
Index ¶
- Variables
- func BadRequestResponse(c *gin.Context, optStatus string, description string)
- func CheckClusterID(clusterID string) bool
- func CheckJSONParam(jsonString string, v interface{}) error
- func ForwardMasterController(c *gin.Context, masterControllerName string, port int)
- func GetAllKeys(jsonString string) (map[string]bool, error)
- func GetContextOrgDB(ctx *gin.Context) (*mysql.DB, error)
- func GetContextOrgID(ctx *gin.Context) (int, error)
- func GetJsonTags(v interface{}) map[string]bool
- func HttpResponse(c *gin.Context, httpCode int, data interface{}, optStatus string, ...)
- func InternalErrorResponse(c *gin.Context, data interface{}, optStatus string, description string)
- func JsonResponse(c *gin.Context, data interface{}, err error)
- func ServiceUnavailableResponse(c *gin.Context, data interface{}, optStatus string, description string)
- func StatusForbiddenResponse(c *gin.Context, description string)
- func StatusPartialContentResponse(c *gin.Context, data interface{}, optStatus string, description string)
- type Response
Constants ¶
This section is empty.
Variables ¶
View Source
var ClusterIDRegex = regexp.MustCompile("^[0-9a-zA-Z][-0-9a-zA-Z]{0,31}$")
Functions ¶
func BadRequestResponse ¶
func CheckClusterID ¶
func CheckJSONParam ¶
CheckJSONParam check json parameters for redundancy. Does not support map[string]interface type in struct.
func ForwardMasterController ¶
func GetAllKeys ¶
GetAllKeys gets all json keys. Does not support map[string]interface type in struct.
func GetJsonTags ¶
GetJsonTags get all json tags of struct. Does not support map[string]interface type in struct.
func HttpResponse ¶
func InternalErrorResponse ¶
func JsonResponse ¶
func StatusForbiddenResponse ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.