lastditch

package
v0.8.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 24, 2016 License: Apache-2.0 Imports: 3 Imported by: 11

Documentation

Overview

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

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

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 added in v0.7.1

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

type Labels added in v0.7.1

type Labels []Label

func (*Labels) UnmarshalJSON added in v0.7.1

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 added in v0.7.1

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL