Move mem/pg activate/live/meta/plan/token/seed paths into ≤800-line siblings without behavior change; short tests green.
21 lines
507 B
Go
21 lines
507 B
Go
package projectinstance
|
|
|
|
import (
|
|
"fmt"
|
|
)
|
|
|
|
// SeedProjectMeta 供测试注入项目元数据。
|
|
func SeedProjectMeta(store Store, projectID int64, lifecycle, activeKey string, selectionVer, planRev int) error {
|
|
ms, ok := store.(*memStore)
|
|
if !ok {
|
|
return fmt.Errorf("SeedProjectMeta only supported on memStore")
|
|
}
|
|
ms.mu.Lock()
|
|
defer ms.mu.Unlock()
|
|
ms.meta[projectID] = projectMeta{
|
|
lifecycle: lifecycle, activeKey: activeKey,
|
|
selectionVer: selectionVer, planRevision: planRev,
|
|
}
|
|
return nil
|
|
}
|