MCPcopy
hub / github.com/apache/devlake / NewApiExtractor

Function NewApiExtractor

backend/helpers/pluginhelper/api/api_extractor.go:48–61  ·  view source on GitHub ↗

NewApiExtractor creates a new ApiExtractor, TODO: replaced with NewStatefulApiExtractor

(args ApiExtractorArgs)

Source from the content-addressed store, hash-verified

46
47// NewApiExtractor creates a new ApiExtractor, TODO: replaced with NewStatefulApiExtractor
48func NewApiExtractor(args ApiExtractorArgs) (*ApiExtractor, errors.Error) {
49 // process args
50 rawDataSubTask, err := NewRawDataSubTask(args.RawDataSubTaskArgs)
51 if err != nil {
52 return nil, err
53 }
54 if args.BatchSize == 0 {
55 args.BatchSize = 500
56 }
57 return &ApiExtractor{
58 RawDataSubTask: rawDataSubTask,
59 args: &args,
60 }, nil
61}
62
63func setRawDataOrigin(result interface{}, originValue common.RawDataOrigin) bool {
64 originField := reflectField(result, "RawDataOrigin")

Callers

nothing calls this directly

Calls 1

NewRawDataSubTaskFunction · 0.85

Tested by

no test coverage detected