Documentation ¶
Index ¶
- Variables
- func ApplicationLayout(app App, c *check.C) []*archive.Item
- func Chart(locator loc.Locator) *chart.Chart
- func CreateApplication(req AppRequest, c *check.C) (app *app.Application)
- func CreateApplicationFromData(apps app.Applications, locator loc.Locator, files []*archive.Item, c *check.C) *app.Application
- func CreateHelmChartApp(c *check.C, apps app.Applications, locator loc.Locator) *app.Application
- func CreatePackage(req PackageRequest, c *check.C) (pkg *pack.PackageEnvelope)
- func CreatePackageData(items []*archive.Item, c *check.C) bytes.Buffer
- func KubernetesResources() *archive.Item
- func NewDependency(pkgLoc string) schema.Dependency
- type App
- func (r App) Build() App
- func (r App) Locator() loc.Locator
- func (r *App) WithAppDependencies(deps ...App) *App
- func (r *App) WithDependencies(deps Dependencies) *App
- func (r *App) WithItems(items ...*archive.Item) *App
- func (r *App) WithPackageDependencies(deps ...Package) *App
- func (r *App) WithSchemaDependencies(deps schema.Dependencies) *App
- func (r *App) WithSchemaPackageDependencies(deps ...loc.Locator) *App
- type AppRequest
- type Dependencies
- type Package
- type PackageRequest
Constants ¶
This section is empty.
Variables ¶
var ( // RuntimeApplicationLoc specifies the default runtime application locator RuntimeApplicationLoc = loc.MustParseLocator("gravitational.io/kubernetes:0.0.1") // RuntimePackageLoc specifies the default runtime package locator RuntimePackageLoc = loc.MustParseLocator("gravitational.io/planet:0.0.1") )
Functions ¶
func ApplicationLayout ¶
ApplicationLayout builds a list of items to place into an application package
func CreateApplication ¶
func CreateApplication(req AppRequest, c *check.C) (app *app.Application)
CreateApplication creates a new test application as described by the given request
func CreateApplicationFromData ¶
func CreateApplicationFromData(apps app.Applications, locator loc.Locator, files []*archive.Item, c *check.C) *app.Application
CreateApplicationFromData creates a new test application in the given application service from the specified files
func CreateHelmChartApp ¶
func CreateHelmChartApp(c *check.C, apps app.Applications, locator loc.Locator) *app.Application
CreateHelmChartApp creates a new test Helm chart application with the specified locator in the provided app service.
func CreatePackage ¶
func CreatePackage(req PackageRequest, c *check.C) (pkg *pack.PackageEnvelope)
CreatePackage creates a new test package as described by the given request
func CreatePackageData ¶
CreatePackageData generates and returns a new tarball with the specified contents
func KubernetesResources ¶
KubernetesResources returns test kubernetes resources
func NewDependency ¶
func NewDependency(pkgLoc string) schema.Dependency
NewDependency is a convenience helper to create a manifest Dependency from a package locator
Types ¶
type App ¶
type App struct { // Manifest describes the application to create Manifest schema.Manifest // Base describes the optional base (runtime) application Base *App // Labels optionally specifies application package labels Labels map[string]string // Items optionally specifies the contents of the application package. Items []*archive.Item // Dependencies optionally specify the application's dependencies. // These override dependencies from the manifest with actual data. Dependencies Dependencies }
App describes a test application package
func ClusterApplication ¶
ClusterApplication creates a new cluster application with the given locator and the runtime application
func DefaultClusterApplication ¶
DefaultClusterApplication creates a new cluster application with defaults
func DefaultRuntimeApplication ¶
func DefaultRuntimeApplication() *App
DefaultRuntimeApplication returns a default test runtime application
func RuntimeApplication ¶
RuntimeApplication returns a test runtime application given the application locator and the locator for the runtime (planet) package
func SystemApplication ¶
SystemApplication creates a new test system application
func (App) Build ¶
Build returns this application value. This is usually the last call in the sequence of build APIs before passing to CreateApplication:
app := CreateApplication(AppRequest{ App: ClusterApplication(...).WithItems(...).WithDependencies(...).Build(), Apps: ..., })
func (*App) WithAppDependencies ¶
WithAppDependencies defines the application dependencies. Dependencies will be also automatically reflected in the manifest.
func (*App) WithDependencies ¶
func (r *App) WithDependencies(deps Dependencies) *App
WithDependencies defines the application package/application dependencies. Dependencies will be also automatically reflected in the manifest.
func (*App) WithPackageDependencies ¶
WithPackageDependencies defines the application package dependencies. Dependencies will be also automatically reflected in the manifest.
func (*App) WithSchemaDependencies ¶
func (r *App) WithSchemaDependencies(deps schema.Dependencies) *App
WithSchemaDependencies defines the application package/application dependencies. These dependencies will only be reflected in the manifest.
type AppRequest ¶
type AppRequest struct { // Packages specifies the package service where packages will be created Packages pack.PackageService // PackageSets optionally specifies a set of package services to create package in. // Each service will receive the same copy of the package contents // Either Packages or PackageSets is expected to be set but not both PackageSets []pack.PackageService // Apps specifies the application service where the package is to be created. Apps app.Applications // AppSets optionally specifies a set of application services to create application in. // Each service will receive the same copy of the application package contents. // Either Apps or AppSets is expected to be set but not both AppSets []app.Applications // App defines the application package to create App App }
AppRequest describes an intent to create a test application package
type Dependencies ¶
type Dependencies struct { // Packages lists package dependencies. Packages []Package // Apps lists application package dependencies. Apps []App }
Dependencies groups package/application dependencies
type Package ¶
type Package struct { // Loc identifies the package to create Loc loc.Locator // Labels optionally specifies package labels Labels map[string]string // Items optionally specifies the contents of the package. Items []*archive.Item }
Package describes a test package
type PackageRequest ¶
type PackageRequest struct { // Packages specifies the package service where the package is to be created Packages pack.PackageService // PackageSets optionally specifies a set of package services to create package in. // Each service will receive the same copy of the package contents PackageSets []pack.PackageService // Package describes the package to create Package Package }
PackageRequest describes an intent to create a test package