manifestparser

package
v8.18.1 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2026 License: Apache-2.0 Imports: 9 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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"`
	LogRateLimit            string                    `yaml:"log-rate-limit-per-second,omitempty"`
	Lifecycle               constant.AppLifecycleType `yaml:"lifecycle,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"`
	Version        int           `yaml:"version,omitempty"`
	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) InterpolateManifest

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

func (ManifestParser) ParseManifest

func (m ManifestParser) ParseManifest(pathToManifest string, rawManifest []byte) (Manifest, 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"`
	LogRateLimit            string                   `yaml:"log-rate-limit-per-second,omitempty"`
	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