MCPcopy
hub / github.com/benbjohnson/litestream / writeJSON

Function writeJSON

server.go:346–350  ·  view source on GitHub ↗
(w http.ResponseWriter, status int, v interface{})

Source from the content-addressed store, hash-verified

344}
345
346func writeJSON(w http.ResponseWriter, status int, v interface{}) {
347 w.Header().Set("Content-Type", "application/json")
348 w.WriteHeader(status)
349 json.NewEncoder(w).Encode(v)
350}
351
352func writeJSONError(w http.ResponseWriter, status int, message string, details interface{}) {
353 w.Header().Set("Content-Type", "application/json")

Callers 9

handleStartMethod · 0.85
handleStopMethod · 0.85
handleTXIDMethod · 0.85
handleSyncStatusMethod · 0.85
handleSyncMethod · 0.85
handleListMethod · 0.85
handleInfoMethod · 0.85
handleRegisterMethod · 0.85
handleUnregisterMethod · 0.85

Calls 1

SetMethod · 0.45

Tested by

no test coverage detected