api

package
v0.0.0-...-8452b8d Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2014 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package api defines and registers types for Template objects.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Parameter

type Parameter struct {
	// Required: Name uniquely identifies the Parameter. A TemplateProcessor
	// searches given Template for all occurances of the Parameter name, ie.
	// ${PARAM_NAME}, and replaces it with it's corresponding Parameter value.
	Name string `json:"name" yaml:"name"`

	// Optional: Description describes the Parameter.
	Description string `json:"description" yaml:"description"`

	// Required: Type defines the type of the Parameter value.
	Type string `json:"type" yaml:"type"`

	// Optional: Expression generates new Value data using the
	// GeneratorExpressionValue expression.
	// TODO: Support more Generator types.
	Expression string `json:"expression,omitempty" yaml:"expression,omitempty"`

	// Optional: Value holds the Parameter data. The data replaces all occurances
	// of the Parameter name during the Template to Config transformation.
	// TODO: Change this to runtime.Object and support more types than just string.
	Value string `json:"value,omitempty" yaml:"value,omitempty"`
}

Parameter defines a name/value variable that is to be processed during the Template to Config transformation.

type Template

type Template struct {
	kubeapi.JSONBase `json:",inline" yaml:",inline"`

	// Required: Name identifies the Template.
	Name string `json:"name" yaml:"name"`

	// Optional: Description describes the Template.
	Description string `json:"description" yaml:"description"`

	// Required: Items is an array of Kubernetes resources of Service,
	// Pod and/or ReplicationController kind.
	// TODO: Handle unregistered types. Define custom []runtime.Object
	//       type and its unmarshaller instead of []runtime.Object.
	Items []runtime.EmbeddedObject `json:"items" yaml:"items"`

	// Optional: Parameters is an array of Parameters used during the
	// Template to Config transformation.
	Parameters []Parameter `json:"parameters,omitempty" yaml:"parameters,omitempty"`
}

Template contains the inputs needed to produce a Config.

func (*Template) IsAnAPIObject

func (*Template) IsAnAPIObject()

Directories

Path Synopsis
Package validation has functions for validating the correctness of Template objects and explaining what is wrong with them when they aren't valid.
Package validation has functions for validating the correctness of Template objects and explaining what is wrong with them when they aren't valid.

Jump to

Keyboard shortcuts

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