Documentation ¶
Index ¶
- Constants
- Variables
- func CheckAuth(c *gin.Context)
- func DecodeDes(auth string) (user, password string, err error)
- func DoQuery(c *gin.Context, db string, timeFunc ctools.FormatTimeFunc)
- func EncodeDes(user, password string) (string, error)
- func ErrorResponse(c *gin.Context, code int)
- func ErrorResponseWithMsg(c *gin.Context, code int, msg string)
- type Message
- type Restful
- type Result
- type TDEngineRestfulResp
- type TDEngineRestfulRespDoc
- type Taos
- type WSAction
- type WSConnectReq
- type WSConnectResp
- type WSErrorResp
- type WSFetchBlockReq
- type WSFetchReq
- type WSFetchResp
- type WSFreeResultReq
- type WSQueryReq
- type WSQueryResult
- type WSVersionResp
- type Writer
Constants ¶
View Source
const ( UserKey = "user" PasswordKey = "password" )
View Source
const ( WSConnect = "conn" WSQuery = "query" WSFetch = "fetch" WSFetchBlock = "fetch_block" WSFreeResult = "free_result" ClientVersion = "version" )
View Source
const LayoutMicroSecond = "2006-01-02 15:04:05.000000"
View Source
const LayoutMillSecond = "2006-01-02 15:04:05.000"
View Source
const LayoutNanoSecond = "2006-01-02 15:04:05.000000000"
View Source
const TaosSessionKey = "taos"
Variables ¶
View Source
var ( ExecHeader = []byte(`{"status":"succ","head":["affected_rows"],"column_meta":[["affected_rows",4,4]],"rows":1,"data":[[`) ExecEnd = []byte(`]]}`) Query1 = []byte(`{"status":"succ","head":[`) Query2 = []byte(`],"column_meta":[`) Query3 = []byte(`],"data":[`) Query4 = []byte(`],"rows":`) )
Functions ¶
func ErrorResponse ¶
Types ¶
type Result ¶
type Result struct { TaosResult unsafe.Pointer FieldsCount int Header *wrapper.RowsHeader Lengths []int Size int Block unsafe.Pointer sync.Mutex // contains filtered or unexported fields }
func (*Result) FreeResult ¶
func (r *Result) FreeResult()
type TDEngineRestfulResp ¶
type TDEngineRestfulRespDoc ¶
type TDEngineRestfulRespDoc struct { Status string `json:"status,omitempty"` Head []string `json:"head,omitempty"` ColumnMeta [][]interface{} `json:"column_meta,omitempty"` Data [][]interface{} `json:"data,omitempty"` Rows int `json:"rows,omitempty"` Code int `json:"code,omitempty"` Desc string `json:"desc,omitempty"` }
type Taos ¶
type Taos struct { Session *melody.Session Conn *commonpool.Conn Results *list.List sync.Mutex // contains filtered or unexported fields }
func (*Taos) FreeResult ¶
type WSAction ¶
type WSAction struct { Action string `json:"action"` Args json.RawMessage `json:"args"` }
type WSConnectReq ¶
type WSConnectResp ¶
type WSErrorResp ¶
type WSFetchBlockReq ¶
type WSFetchReq ¶
type WSFetchResp ¶
type WSFreeResultReq ¶
type WSQueryReq ¶
type WSQueryResult ¶
type WSQueryResult struct { Code int `json:"code"` Message string `json:"message"` Action string `json:"action"` ReqID uint64 `json:"req_id"` ID uint64 `json:"id"` IsUpdate bool `json:"is_update"` AffectedRows int `json:"affected_rows"` FieldsCount int `json:"fields_count"` FieldsNames []string `json:"fields_names"` FieldsTypes []int `json:"fields_types"` FieldsLengths []int `json:"fields_lengths"` Precision int `json:"precision"` }
type WSVersionResp ¶
Click to show internal directories.
Click to hide internal directories.