mirror of
https://github.com/podman-container-tools/podman.git
synced 2026-10-22 22:07:37 +00:00
Need to pull in the latest containers/storage and containers/image to fix lots of issues. Also want to update runtime-tools to take advantage of newer generate code. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com> Closes: #152 Approved by: rhatdan
29 lines
1.2 KiB
Go
29 lines
1.2 KiB
Go
package specerror
|
|
|
|
import (
|
|
"fmt"
|
|
|
|
rfc2119 "github.com/opencontainers/runtime-tools/error"
|
|
)
|
|
|
|
// define error codes
|
|
const (
|
|
// ConfigInRootBundleDir represents "This REQUIRED file MUST reside in the root of the bundle directory"
|
|
ConfigInRootBundleDir = "This REQUIRED file MUST reside in the root of the bundle directory."
|
|
// ConfigConstName represents "This REQUIRED file MUST be named `config.json`."
|
|
ConfigConstName = "This REQUIRED file MUST be named `config.json`."
|
|
// ArtifactsInSingleDir represents "When supplied, while these artifacts MUST all be present in a single directory on the local filesystem, that directory itself is not part of the bundle."
|
|
ArtifactsInSingleDir = "When supplied, while these artifacts MUST all be present in a single directory on the local filesystem, that directory itself is not part of the bundle."
|
|
)
|
|
|
|
var (
|
|
containerFormatRef = func(version string) (reference string, err error) {
|
|
return fmt.Sprintf(referenceTemplate, version, "bundle.md#container-format"), nil
|
|
}
|
|
)
|
|
|
|
func init() {
|
|
register(ConfigInRootBundleDir, rfc2119.Must, containerFormatRef)
|
|
register(ConfigConstName, rfc2119.Must, containerFormatRef)
|
|
register(ArtifactsInSingleDir, rfc2119.Must, containerFormatRef)
|
|
}
|