Documentation ¶
Overview ¶
Package schema provides definitions for the JSON schema of the different manifests in the App Container Specification. The manifests are canonically represented in their respective structs:
- `ImageManifest`
- `ContainerRuntimeManifest`
Validation is performed through serialization: if a blob of JSON data will unmarshal to one of the *Manifests, it is considered a valid implementation of the standard. Similarly, if a constructed *Manifest struct marshals successfully to JSON, it must be valid.
Index ¶
Constants ¶
View Source
const ( ACIExtension = ".aci" ImageManifestKind = types.ACKind("ImageManifest") )
View Source
const ContainerRuntimeManifestKind = types.ACKind("ContainerRuntimeManifest")
Variables ¶
View Source
var ( // AppContainerVersion is the SemVer representation of version AppContainerVersion types.SemVer )
Functions ¶
This section is empty.
Types ¶
type AppList ¶
type AppList []RuntimeApp
type ContainerRuntimeManifest ¶
type ContainerRuntimeManifest struct { ACVersion types.SemVer `json:"acVersion"` ACKind types.ACKind `json:"acKind"` UUID types.UUID `json:"uuid"` Apps AppList `json:"apps"` Volumes []types.Volume `json:"volumes"` Isolators []types.Isolator `json:"isolators"` Annotations types.Annotations `json:"annotations"` }
func BlankContainerRuntimeManifest ¶ added in v0.4.0
func BlankContainerRuntimeManifest() *ContainerRuntimeManifest
func (ContainerRuntimeManifest) MarshalJSON ¶
func (cm ContainerRuntimeManifest) MarshalJSON() ([]byte, error)
func (*ContainerRuntimeManifest) UnmarshalJSON ¶
func (cm *ContainerRuntimeManifest) UnmarshalJSON(data []byte) error
type ImageManifest ¶
type ImageManifest struct { ACKind types.ACKind `json:"acKind"` ACVersion types.SemVer `json:"acVersion"` Name types.ACName `json:"name"` Labels types.Labels `json:"labels,omitempty"` App *types.App `json:"app,omitempty"` Annotations types.Annotations `json:"annotations,omitempty"` Dependencies types.Dependencies `json:"dependencies,omitempty"` PathWhitelist []string `json:"pathWhitelist,omitempty"` }
func BlankImageManifest ¶ added in v0.4.0
func BlankImageManifest() *ImageManifest
func (*ImageManifest) GetAnnotation ¶ added in v0.2.0
func (im *ImageManifest) GetAnnotation(name string) (val string, ok bool)
func (*ImageManifest) GetLabel ¶ added in v0.2.0
func (im *ImageManifest) GetLabel(name string) (val string, ok bool)
func (ImageManifest) MarshalJSON ¶
func (im ImageManifest) MarshalJSON() ([]byte, error)
func (*ImageManifest) UnmarshalJSON ¶
func (im *ImageManifest) UnmarshalJSON(data []byte) error
type Mount ¶ added in v0.3.0
type Mount struct { Volume types.ACName `json:"volume"` MountPoint types.ACName `json:"mountPoint"` }
Mount describes the mapping between a volume and an apps MountPoint that will be fulfilled at runtime.
type RuntimeApp ¶
type RuntimeApp struct { Name types.ACName `json:"name"` Image RuntimeImage `json:"image"` App *types.App `json:"app,omitempty"` Mounts []Mount `json:"mounts"` Annotations types.Annotations `json:"annotations"` }
RuntimeApp describes an application referenced in a ContainerRuntimeManifest
Click to show internal directories.
Click to hide internal directories.