Documentation
¶
Index ¶
- Constants
- Variables
- func BadRequestResponse(c *gin.Context, logger *logrus.Entry, code int)
- func BadRequestResponseWithMsg(c *gin.Context, logger *logrus.Entry, code int, msg string)
- func CheckAuth(c *gin.Context)
- func CommonErrorResponse(c *gin.Context, logger *logrus.Entry, msg string)
- func DecodeDes(auth string) (user, password string, err error)
- func DoQuery(c *gin.Context, db string, location *time.Location, reqID int64, ...)
- func EncodeDes(user, password string) (string, error)
- func ErrorResponse(c *gin.Context, logger *logrus.Entry, httpCode, code int, msg string)
- func ForbiddenResponse(c *gin.Context, logger *logrus.Entry, msg string)
- func InternalErrorResponse(c *gin.Context, logger *logrus.Entry, code int, msg string)
- func ServiceUnavailable(c *gin.Context, logger *logrus.Entry, msg string)
- func TaosErrorResponse(c *gin.Context, logger *logrus.Entry, code int, msg string)
- func TooManyRequestResponse(c *gin.Context, logger *logrus.Entry, msg string)
- func UnAuthResponse(c *gin.Context, logger *logrus.Entry, code int)
- type ConfigController
- type Message
- type MessageWithTiming
- type ModifyConfig
- type Restful
- type TDEngineRestfulResp
- type TDEngineRestfulRespDoc
Constants ¶
View Source
const ( UserKey = "user" PasswordKey = "password" )
View Source
const LoggerKey = "logger"
View Source
const MAXSQLLength = 1024 * 1024 * 1
View Source
const RequireTiming = "require_timing"
View Source
const StartTimeKey = "st"
Variables ¶
View Source
var ( ExecHeader = []byte(`{"code":0,"column_meta":[["affected_rows","INT",4]],"data":[[`) ExecEnd = []byte(`]],"rows":1}`) ExecEndWithTiming = []byte(`]],"rows":1,"timing":`) ExecObjHeader = []byte(`{"code":0,"column_meta":[["affected_rows","INT",4]],"data":[{"affected_rows":`) ExecObjEnd = []byte(`}],"rows":1}`) ExecObjEndWithTiming = []byte(`}],"rows":1,"timing":`) Query2 = []byte(`{"code":0,"column_meta":[`) Query3 = []byte(`],"data":[`) Query4 = []byte(`],"rows":`) Timing = []byte(`,"timing":`) )
Functions ¶
func CommonErrorResponse ¶
func ErrorResponse ¶
func InternalErrorResponse ¶
func TaosErrorResponse ¶
func TooManyRequestResponse ¶
Types ¶
type ConfigController ¶
type ConfigController struct { }
func (*ConfigController) Init ¶
func (ctl *ConfigController) Init(r gin.IRouter)
type MessageWithTiming ¶
type ModifyConfig ¶
type ModifyConfig struct {
LogLevel *string `json:"log.level"`
}
type TDEngineRestfulResp ¶
type TDEngineRestfulRespDoc ¶
Click to show internal directories.
Click to hide internal directories.