manifestparser

package
v6.43.1-1+incompatible Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidatePaths

func ValidatePaths(manifestParser Parser) error

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"`
}

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 {
	Username string `yaml:"username"`
	Image    string `yaml:"image"`
}

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 ManifestParser

type ManifestParser interface {
	Apps(appName string) ([]Application, error)
	Validate() error
	ContainsMultipleApps() bool
	InterpolateAndParse(pathToManifest string, pathsToVarsFiles []string, vars []template.VarKV) error
	FullRawManifest() []byte
	AppNames() []string
	RawAppManifest(appName string) ([]byte, error)
	GetPathToManifest() string
}

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

func (parser *Parser) Parse(manifestPath string) error

func (Parser) RawAppManifest

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

func (Parser) Validate

func (parser Parser) Validate() error

Directories

Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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