コード例 #1
0
ファイル: pod.go プロジェクト: kinvolk/appc-spec
// limitations under the License.

package schema

import (
	"bytes"
	"encoding/json"
	"errors"
	"fmt"

	"github.com/kinvolk/spec/schema/types"

	"go4.org/errorutil"
)

const PodManifestKind = types.ACKind("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"`
}

// podManifest is a model to facilitate extra validation during the
// unmarshalling of the PodManifest
type podManifest PodManifest
コード例 #2
0
ファイル: image.go プロジェクト: kinvolk/appc-spec
package schema

import (
	"bytes"
	"encoding/json"
	"errors"
	"fmt"

	"github.com/kinvolk/spec/schema/types"

	"go4.org/errorutil"
)

const (
	ACIExtension      = ".aci"
	ImageManifestKind = types.ACKind("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"`
}

// imageManifest is a model to facilitate extra validation during the
// unmarshalling of the ImageManifest