spec: github.com/appc/spec/schema/lastditch Index | Files

package lastditch

import "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

Package Files

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

type AppList Uses

type AppList []RuntimeApp

type ImageManifest Uses

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

func (*ImageManifest) UnmarshalJSON Uses

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

type Label Uses

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

type Labels Uses

type Labels []Label

func (*Labels) UnmarshalJSON Uses

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

type PodManifest Uses

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

func (*PodManifest) UnmarshalJSON Uses

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

type RuntimeApp Uses

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

type RuntimeImage Uses

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

Package lastditch imports 3 packages (graph) and is imported by 21 packages. Updated 2018-03-11. Refresh now. Tools for package owners.