manifest

package
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: May 30, 2020 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateNoRouteYml

func GenerateNoRouteYml(originalManifest Manifest) (tempManifestPath string, err error)

GenerateNoRouteYml generate temp manifest without routes to skip route creation

func GenerateTempFile

func GenerateTempFile(fileName string, fileExtension string) (zipFile string)

func WriteYmlFile

func WriteYmlFile(manifestFilePath string, manifest Manifest) (err error)

WriteYmlFile write yml file to specified path and return them parsed

Types

type Application

type Application struct {
	Name                    string              `yaml:"name"`
	Instances               string              `yaml:"instances,omitempty"`
	Memory                  string              `yaml:"memory,omitempty"`
	DiskQuota               string              `yaml:"disk_quota,omitempty"`
	Routes                  []map[string]string `yaml:"routes,omitempty"`
	NoRoute                 bool                `yaml:"no-route,omitempty"`
	Buildpacks              []string            `yaml:"buildpacks,omitempty"`
	Command                 string              `yaml:"command,omitempty"`
	Env                     map[string]string   `yaml:"env,omitempty"`
	Services                []string            `yaml:"services,omitempty"`
	Stack                   string              `yaml:"stack,omitempty"`
	Path                    string              `yaml:"path,omitempty"`
	Timeout                 string              `yaml:"timeout,omitempty"`
	HealthCheckType         string              `yaml:"health-check-type,omitempty"`
	HealthCheckHTTPEndpoint string              `yaml:"health-check-http-endpoint,omitempty"`
}

Application yaml represents the complete yaml structure type is always string because you can use a vars placeholder in all attributes.

type Manifest

type Manifest struct {
	ApplicationManifests []Application `yaml:"applications"`
}

Manifest struct represents the application manifest.

func ParseApplicationManifest

func ParseApplicationManifest(manifestFilePath string, varsFilePath string) (manifest Manifest, noRouteManifestPath string, err error)

ParseAndReplaceWithVars parse a manifest and vars file. get all values from vars file and put them into the manifest file so there will be a returned new manifest without placeholders

type Variables

type Variables map[string]interface{}

VarsFile

Jump to

Keyboard shortcuts

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