MCPcopy Index your code
hub / github.com/CovenantSQL/CovenantSQL / sendResponse

Function sendResponse

sqlchain/observer/api.go:45–56  ·  view source on GitHub ↗
(code int, success bool, msg interface{}, data interface{}, rw http.ResponseWriter)

Source from the content-addressed store, hash-verified

43)
44
45func sendResponse(code int, success bool, msg interface{}, data interface{}, rw http.ResponseWriter) {
46 msgStr := "ok"
47 if msg != nil {
48 msgStr = fmt.Sprint(msg)
49 }
50 rw.WriteHeader(code)
51 json.NewEncoder(rw).Encode(map[string]interface{}{
52 "status": msgStr,
53 "success": success,
54 "data": data,
55 })
56}
57
58type explorerAPI struct {
59 service *Service

Callers 14

GetAllSubscriptionsMethod · 0.70
GetAckMethod · 0.70
GetRequestMethod · 0.70
GetResponseMethod · 0.70
GetBlockMethod · 0.70
GetBlockV3Method · 0.70
GetBlockByCountMethod · 0.70
GetBlockByCountV3Method · 0.70
GetBlockByHeightMethod · 0.70
GetBlockByHeightV3Method · 0.70
GetHighestBlockMethod · 0.70
GetHighestBlockV2Method · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected