pretty

package
v0.0.3-rc2 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2018 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	StackType   = SchemaType("stack")
	ServiceType = SchemaType("service")
	VolumeType  = SchemaType("volume")
)
View Source
var (
	Version = types.APIVersion{
		Version: "v1beta1",
		Group:   "export.cattle.io",
		Path:    "/v1beta1-export",
	}

	Schemas = newSchemas().
			Init(health).
			Init(storage).
			Init(services).
			Init(config).
			Init(volume).
			Init(route).
			Init(kubernetes).
			AddMapperForType(&Version, Stack{},
			pm.RouteSet{Field: "routes"},
		).
		MustImport(&Version, Stack{})
)

Functions

func NormalizeData

func NormalizeData(schemaType SchemaType, data map[string]interface{}) (map[string]interface{}, error)

func ToInternalStack

func ToInternalStack(data map[string]interface{}) (*v1beta1.InternalStack, error)

func ToPretty

func ToPretty(schemaType SchemaType, data map[string]interface{}) (map[string]interface{}, error)

Types

type SchemaType

type SchemaType string

type Stack

type Stack struct {
	Meta       TemplateMeta               `json:"meta,omitempty"`
	Services   map[string]client.Service  `json:"services,omitempty"`
	Configs    map[string]client.Config   `json:"configs,omitempty"`
	Volumes    map[string]client.Volume   `json:"volumes,omitempty"`
	Routes     map[string]client.RouteSet `json:"routes,omitempty"`
	Questions  []v3.Question              `json:"questions,omitempty"`
	Kubernetes client.Kubernetes          `json:"kubernetes,omitempty"`
}

func ToNormalizedStack

func ToNormalizedStack(data map[string]interface{}) (*Stack, error)

type TemplateMeta

type TemplateMeta struct {
	Name       string `json:"name,omitempty"`
	Version    string `json:"version,omitempty"`
	IconURL    string `json:"iconUrl,omitempty"`
	RioVersion string `json:"rioVersion,omitempty"`
	Readme     string `json:"readme,omitempty"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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