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

Function sendResponse

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

Source from the content-addressed store, hash-verified

146}
147
148func sendResponse(code int, success bool, msg interface{}, data interface{}, rw http.ResponseWriter) {
149 msgStr := "ok"
150 if msg != nil {
151 msgStr = fmt.Sprint(msg)
152 }
153 rw.WriteHeader(code)
154 json.NewEncoder(rw).Encode(map[string]interface{}{
155 "status": msgStr,
156 "success": success,
157 "data": data,
158 })
159}

Callers 9

QueryMethod · 0.70
WriteMethod · 0.70
StableCoinBalanceMethod · 0.70
CovenantCoinBalanceMethod · 0.70
initFunction · 0.70
getDatabaseIDFunction · 0.70
adminPrivilegeCheckerFunction · 0.70
CreateDatabaseMethod · 0.70
DropDatabaseMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected