MCPcopy Index your code
hub / github.com/dearcode/candy / checkFile

Method checkFile

gate/store.go:163–177  ·  view source on GitHub ↗
(userID int64, names []string)

Source from the content-addressed store, hash-verified

161}
162
163func (s *store) checkFile(userID int64, names []string) ([]string, error) {
164 log.Debugf("store checkFile, userID:%v", userID)
165 req := &meta.StoreCheckFileRequest{
166 Header: &meta.RequestHeader{User: userID},
167 Names: names,
168 }
169
170 resp, err := s.api.CheckFile(s.ctx, req)
171 if err != nil {
172 return nil, errors.Trace(err)
173 }
174 log.Debugf("store checkFile finished, userID:%v, err:%v", userID, resp.Header.Error())
175
176 return resp.Names, errors.Trace(resp.Header.Error())
177}
178
179func (s *store) downloadFile(userID int64, names []string) (map[string][]byte, error) {
180 log.Debugf("store downloadFile, userID:%v", userID)

Callers 1

CheckFileMethod · 0.80

Calls 2

CheckFileMethod · 0.65
ErrorMethod · 0.45

Tested by

no test coverage detected