MCPcopy
hub / github.com/syncthing/syncthing / Map

Method Map

lib/model/model.go:865–876  ·  view source on GitHub ↗

Map returns the members as a map, e.g. used in api to serialize as JSON.

()

Source from the content-addressed store, hash-verified

863
864// Map returns the members as a map, e.g. used in api to serialize as JSON.
865func (comp *FolderCompletion) Map() map[string]interface{} {
866 return map[string]interface{}{
867 "completion": comp.CompletionPct,
868 "globalBytes": comp.GlobalBytes,
869 "needBytes": comp.NeedBytes,
870 "globalItems": comp.GlobalItems,
871 "needItems": comp.NeedItems,
872 "needDeletes": comp.NeedDeletes,
873 "sequence": comp.Sequence,
874 "remoteState": comp.RemoteState,
875 }
876}
877
878// Completion returns the completion status, in percent with some counters,
879// for the given device and folder. The device can be any known device ID

Callers 4

infoEventHookFunction · 0.80
folderCompletionMethod · 0.80
sendSummaryMethod · 0.80
getDBCompletionMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected