manifestparser

package
v7.0.0-beta.27+incompa... Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2019 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppNotInManifestError

type AppNotInManifestError struct {
	Name string
}

func (AppNotInManifestError) Error

func (e AppNotInManifestError) Error() string

type Application

type Application struct {
	ApplicationModel
	FullUnmarshalledApplication map[string]interface{}
}

func (Application) MarshalYAML

func (application Application) MarshalYAML() (interface{}, error)

func (*Application) UnmarshalYAML

func (application *Application) UnmarshalYAML(unmarshal func(v interface{}) error) error

type ApplicationModel

type ApplicationModel struct {
	Name        string  `yaml:"name"`
	Docker      *Docker `yaml:"docker"`
	Path        string  `yaml:"path"`
	NoRoute     bool    `yaml:"no-route"`
	RandomRoute bool    `yaml:"random-route"`
}

ApplicationModel can be accessed through the top level Application struct To add a field for the CLI to extract from the manifest, just add it to this struct.

type Docker

type Docker struct {
	Image    string `yaml:"image"`
	Username string `yaml:"username"`
}

type InterpolationError

type InterpolationError struct {
	Err error
}

func (InterpolationError) Error

func (e InterpolationError) Error() string

type InvalidManifestApplicationPathError

type InvalidManifestApplicationPathError struct {
	Path string
}

func (InvalidManifestApplicationPathError) Error

type InvalidYAMLError

type InvalidYAMLError struct {
	Err error
}

func (InvalidYAMLError) Error

func (e InvalidYAMLError) Error() string

type Locator

type Locator struct {
	FilesToCheckFor []string
}

func NewLocator

func NewLocator() *Locator

func (Locator) Path

func (loc Locator) Path(filepathOrDirectory string) (string, bool, error)

type Parser

type Parser struct {
	Applications []Application
	// contains filtered or unexported fields
}

func NewParser

func NewParser() *Parser

func (Parser) AppNames

func (parser Parser) AppNames() []string

func (Parser) Apps

func (parser Parser) Apps() []Application

func (Parser) ContainsManifest

func (parser Parser) ContainsManifest() bool

func (Parser) ContainsMultipleApps

func (parser Parser) ContainsMultipleApps() bool

func (Parser) ContainsPrivateDockerImages

func (parser Parser) ContainsPrivateDockerImages() bool

func (Parser) FullRawManifest

func (parser Parser) FullRawManifest() []byte

func (Parser) GetPathToManifest

func (parser Parser) GetPathToManifest() string

func (*Parser) InterpolateAndParse

func (parser *Parser) InterpolateAndParse(pathToManifest string, pathsToVarsFiles []string, vars []template.VarKV, appName string) error

InterpolateAndParse reads the manifest at the provided paths, interpolates variables if a vars file is provided, and sets the current manifest to the resulting manifest. For manifests with only 1 application, appName will override the name of the single app defined. For manifests with multiple applications, appName will filter the applications and leave only a single application in the resulting parsed manifest structure.

func (Parser) RawAppManifest

func (parser Parser) RawAppManifest(appName string) ([]byte, error)

func (Parser) Validate

func (parser Parser) Validate() error

Jump to

Keyboard shortcuts

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