manifestparser

package
v6.44.0+incompatible Latest Latest
Warning

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

Go to latest
Published: May 1, 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"`
}

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 {
	PathToManifest string

	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(appName string) ([]Application, error)

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) 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.

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