MCPcopy Index your code
hub / github.com/apache/devlake / PutStore

Function PutStore

backend/server/services/store.go:44–56  ·  view source on GitHub ↗

PutOnboard accepts a project instance and insert it to database

(storeKey string, storeValue *models.Store)

Source from the content-addressed store, hash-verified

42
43// PutOnboard accepts a project instance and insert it to database
44func PutStore(storeKey string, storeValue *models.Store) (*models.Store, errors.Error) {
45 // verify input
46 if err := VerifyStruct(storeValue); err != nil {
47 return nil, err
48 }
49
50 err := db.CreateOrUpdate(storeValue, dal.Where("store_key = ?", storeKey))
51 if err != nil {
52 return nil, err
53 }
54
55 return storeValue, nil
56}

Callers

nothing calls this directly

Calls 2

VerifyStructFunction · 0.85
CreateOrUpdateMethod · 0.65

Tested by

no test coverage detected