18 lines
486 B
Go
18 lines
486 B
Go
package bnp
|
|
|
|
import (
|
|
"fmt"
|
|
|
|
abiv1 "git.dev.alexdunmow.com/block/pluginsdk/abi/v1"
|
|
"git.dev.alexdunmow.com/block/pluginsdk/plugin"
|
|
)
|
|
|
|
// ValidateLoadOnceManifest enforces the stable keyed lifecycle contract before
|
|
// an artifact can be packed or accepted by ninja plugin verify.
|
|
func ValidateLoadOnceManifest(manifest *abiv1.PluginManifest) error {
|
|
if err := plugin.ValidateLoadOnceKeys(manifest.GetLoadOnceKeys()); err != nil {
|
|
return fmt.Errorf("bnp: %w", err)
|
|
}
|
|
return nil
|
|
}
|