MCPcopy
hub / github.com/NVIDIA/aistore / UnmarshalJSON

Method UnmarshalJSON

downloader/api.go:107–113  ·  view source on GitHub ↗
(b []byte)

Source from the content-addressed store, hash-verified

105}
106
107func (db *DlBody) UnmarshalJSON(b []byte) error {
108 db.Type = DlType(jsoniter.Get(b, "type").ToString())
109 if db.Type == "" {
110 return errors.New("'type' field is empty")
111 }
112 return db.RawMessage.UnmarshalJSON(b)
113}
114
115func (j DlJobInfo) JobFinished() bool {
116 if cos.IsTimeZero(j.FinishedTime) {

Callers

nothing calls this directly

Calls 3

DlTypeTypeAlias · 0.85
GetMethod · 0.65
NewMethod · 0.65

Tested by

no test coverage detected