package schema
import "k8s.io/kubernetes/Godeps/_workspace/src/github.com/appc/spec/schema"
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`
- `PodManifest`
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
- Variables
- type AppList
- func (al AppList) Get(name types.ACName) *RuntimeApp
- func (al AppList) MarshalJSON() ([]byte, error)
- func (al *AppList) UnmarshalJSON(data []byte) error
- type ImageManifest
- func BlankImageManifest() *ImageManifest
- func (im *ImageManifest) GetAnnotation(name string) (val string, ok bool)
- func (im *ImageManifest) GetLabel(name string) (val string, ok bool)
- func (im ImageManifest) MarshalJSON() ([]byte, error)
- func (im *ImageManifest) UnmarshalJSON(data []byte) error
- type Kind
- type Mount
- type PodManifest
- func BlankPodManifest() *PodManifest
- func (pm PodManifest) MarshalJSON() ([]byte, error)
- func (pm *PodManifest) UnmarshalJSON(data []byte) error
- type RuntimeApp
- type RuntimeImage
Constants ¶
Variables ¶
var ( // AppContainerVersion is the SemVer representation of version AppContainerVersion types.SemVer )
Types ¶
type AppList ¶
type AppList []RuntimeApp
func (AppList) Get ¶
func (al AppList) Get(name types.ACName) *RuntimeApp
Get retrieves an app by the specified name from the AppList; if there is no such app, nil is returned. The returned *RuntimeApp MUST be considered read-only.
func (AppList) MarshalJSON ¶
func (*AppList) UnmarshalJSON ¶
type ImageManifest ¶
type ImageManifest struct { ACKind types.ACKind `json:"acKind"` ACVersion types.SemVer `json:"acVersion"` Name types.ACIdentifier `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 ¶
func BlankImageManifest() *ImageManifest
func (*ImageManifest) GetAnnotation ¶
func (im *ImageManifest) GetAnnotation(name string) (val string, ok bool)
func (*ImageManifest) GetLabel ¶
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 Kind ¶
func (Kind) MarshalJSON ¶
func (*Kind) UnmarshalJSON ¶
type Mount ¶
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 PodManifest ¶
type PodManifest struct { ACVersion types.SemVer `json:"acVersion"` ACKind types.ACKind `json:"acKind"` Apps AppList `json:"apps"` Volumes []types.Volume `json:"volumes"` Isolators []types.Isolator `json:"isolators"` Annotations types.Annotations `json:"annotations"` Ports []types.ExposedPort `json:"ports"` }
func BlankPodManifest ¶
func BlankPodManifest() *PodManifest
func (PodManifest) MarshalJSON ¶
func (pm PodManifest) MarshalJSON() ([]byte, error)
func (*PodManifest) UnmarshalJSON ¶
func (pm *PodManifest) UnmarshalJSON(data []byte) error
type RuntimeApp ¶
type RuntimeApp struct { Name types.ACName `json:"name"` Image RuntimeImage `json:"image"` App *types.App `json:"app,omitempty"` Mounts []Mount `json:"mounts,omitempty"` Annotations types.Annotations `json:"annotations,omitempty"` }
RuntimeApp describes an application referenced in a PodManifest
type RuntimeImage ¶
type RuntimeImage struct { Name *types.ACIdentifier `json:"name,omitempty"` ID types.Hash `json:"id"` Labels types.Labels `json:"labels,omitempty"` }
RuntimeImage describes an image referenced in a RuntimeApp
Source Files ¶
doc.go image.go kind.go pod.go version.go
Directories ¶
Path | Synopsis |
---|---|
Godeps/_workspace/src/github.com/appc/spec/schema/types | Package types contains structs representing the various types in the app container specification. |
- Version
- v1.1.4-beta.0
- Published
- Dec 7, 2015
- Platform
- js/wasm
- Imports
- 4 packages
- Last checked
- 4 minutes ago –
Tools for package owners.