package lastditch

import "k8s.io/kubernetes/Godeps/_workspace/src/github.com/appc/spec/schema/lastditch"

Package lastditch provides fallback redefinitions of parts of schemas provided by schema package.

Almost no validation of schemas is done (besides checking if data really is `JSON`-encoded and kind is either `ImageManifest` or `PodManifest`. This is to get as much data as possible from an invalid manifest. The main aim of the package is to be used for the better error reporting. The another aim might be to force some operation (like removing a pod), which would otherwise fail because of an invalid manifest.

To avoid validation during deserialization, types provided by this package use plain strings.

Index

Types

type AppList

type AppList []RuntimeApp

type ImageManifest

type ImageManifest struct {
	ACVersion string `json:"acVersion"`
	ACKind    string `json:"acKind"`
	Name      string `json:"name"`
	Labels    Labels `json:"labels,omitempty"`
}

func (*ImageManifest) UnmarshalJSON

func (im *ImageManifest) UnmarshalJSON(data []byte) error

type Label

type Label struct {
	Name  string `json:"name"`
	Value string `json:"value"`
}

type Labels

type Labels []Label

func (*Labels) UnmarshalJSON

func (l *Labels) UnmarshalJSON(data []byte) error

type PodManifest

type PodManifest struct {
	ACVersion string  `json:"acVersion"`
	ACKind    string  `json:"acKind"`
	Apps      AppList `json:"apps"`
}

func (*PodManifest) UnmarshalJSON

func (pm *PodManifest) UnmarshalJSON(data []byte) error

type RuntimeApp

type RuntimeApp struct {
	Name  string       `json:"name"`
	Image RuntimeImage `json:"image"`
}

type RuntimeImage

type RuntimeImage struct {
	Name   string `json:"name"`
	ID     string `json:"id"`
	Labels Labels `json:"labels,omitempty"`
}

Source Files

doc.go image.go labels.go pod.go

Version
v1.2.0-alpha.3
Published
Nov 3, 2015
Platform
js/wasm
Imports
3 packages
Last checked
2 minutes ago

Tools for package owners.