Add the MatterLock strategy.
This commit is contained in:
@ -1,6 +1,9 @@
|
||||
package result
|
||||
|
||||
import "net/http"
|
||||
import (
|
||||
"fmt"
|
||||
"net/http"
|
||||
)
|
||||
|
||||
type WebResult struct {
|
||||
Code string `json:"code"`
|
||||
@ -89,10 +92,15 @@ func CustomWebResult(codeWrapper *CodeWrapper, description string) *WebResult {
|
||||
return wr
|
||||
}
|
||||
|
||||
//请求参数有问题
|
||||
func BadRequest(format string, v ...interface{}) *WebResult {
|
||||
return CustomWebResult(CODE_WRAPPER_BAD_REQUEST, fmt.Sprintf(format, v...))
|
||||
}
|
||||
|
||||
//所有的数据库错误情况
|
||||
var (
|
||||
DB_ERROR_DUPLICATE_KEY = "Error 1062: Duplicate entry"
|
||||
DB_ERROR_NOT_FOUND = "record not found"
|
||||
DB_TOO_MANY_CONNECTIONS = "Error 1040: Too many connections"
|
||||
DB_BAD_CONNECTION = "driver: bad connection"
|
||||
DB_BAD_CONNECTION = "driver: bad connection"
|
||||
)
|
||||
|
Reference in New Issue
Block a user