pushmanifestparser

package
v6.47.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2019 License: Apache-2.0 Imports: 10 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 {
	Name                    string                   `yaml:"name"`
	DiskQuota               string                   `yaml:"disk_quota,omitempty"`
	Docker                  *Docker                  `yaml:"docker,omitempty"`
	HealthCheckType         constant.HealthCheckType `yaml:"health-check-type,omitempty"`
	HealthCheckEndpoint     string                   `yaml:"health-check-http-endpoint,omitempty"`
	HealthCheckTimeout      int64                    `yaml:"timeout,omitempty"`
	Instances               *int                     `yaml:"instances,omitempty"`
	Path                    string                   `yaml:"path,omitempty"`
	Processes               []Process                `yaml:"processes,omitempty"`
	Memory                  string                   `yaml:"memory,omitempty"`
	NoRoute                 bool                     `yaml:"no-route,omitempty"`
	RandomRoute             bool                     `yaml:"random-route,omitempty"`
	DefaultRoute            bool                     `yaml:"default-route,omitempty"`
	Stack                   string                   `yaml:"stack,omitempty"`
	RemainingManifestFields map[string]interface{}   `yaml:"-,inline"`
}

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.

func (Application) HasBuildpacks

func (application Application) HasBuildpacks() bool

func (*Application) SetBuildpacks

func (application *Application) SetBuildpacks(buildpacks []string)

func (*Application) SetStartCommand

func (application *Application) SetStartCommand(command string)

func (*Application) UnmarshalYAML

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

type Docker

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

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 Manifest

type Manifest struct {
	Applications   []Application `yaml:"applications"`
	PathToManifest string        `yaml:"-"`
}

func (Manifest) AppNames

func (m Manifest) AppNames() []string

func (Manifest) ContainsMultipleApps

func (m Manifest) ContainsMultipleApps() bool

func (Manifest) ContainsPrivateDockerImages

func (m Manifest) ContainsPrivateDockerImages() bool

func (Manifest) GetFirstApp

func (m Manifest) GetFirstApp() *Application

func (Manifest) GetFirstAppWebProcess

func (m Manifest) GetFirstAppWebProcess() *Process

func (Manifest) HasAppWithNoName

func (m Manifest) HasAppWithNoName() bool

type ManifestParser

type ManifestParser struct{}

func (ManifestParser) InterpolateAndParse

func (m ManifestParser) InterpolateAndParse(pathToManifest string, pathsToVarsFiles []string, vars []template.VarKV) (Manifest, 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 (ManifestParser) MarshalManifest

func (m ManifestParser) MarshalManifest(manifest Manifest) ([]byte, error)

type Process

type Process struct {
	DiskQuota               string                   `yaml:"disk_quota,omitempty"`
	HealthCheckEndpoint     string                   `yaml:"health-check-http-endpoint,omitempty"`
	HealthCheckType         constant.HealthCheckType `yaml:"health-check-type,omitempty"`
	HealthCheckTimeout      int64                    `yaml:"timeout,omitempty"`
	Instances               *int                     `yaml:"instances,omitempty"`
	Memory                  string                   `yaml:"memory,omitempty"`
	Type                    string                   `yaml:"type"`
	RemainingManifestFields map[string]interface{}   `yaml:"-,inline"`
}

func (*Process) SetStartCommand

func (process *Process) SetStartCommand(command string)

func (*Process) UnmarshalYAML

func (process *Process) UnmarshalYAML(unmarshal func(v interface{}) error) error

Jump to

Keyboard shortcuts

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