payloads

package
v0.0.0-...-d88c78e Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2021 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultLifecycleConfig = config.DefaultLifecycleConfig{
	Type:            "buildpack",
	Stack:           "cflinuxfs3",
	StagingMemoryMB: 1024,
	StagingDiskMB:   1024,
}

DefaultLifecycleConfig is overwritten by main.go

Functions

This section is empty.

Types

type AppCreate

type AppCreate struct {
	Name                 string            `json:"name" validate:"required"`
	EnvironmentVariables map[string]string `json:"environment_variables"`
	Relationships        AppRelationships  `json:"relationships" validate:"required"`
	Lifecycle            *Lifecycle        `json:"lifecycle"`
	Metadata             Metadata          `json:"metadata"`
}

func (AppCreate) ToRecord

func (p AppCreate) ToRecord() repositories.AppRecord

type AppRelationships

type AppRelationships struct {
	Space Relationship `json:"space" validate:"required"`
}

type AppSetCurrentDroplet

type AppSetCurrentDroplet struct {
	Relationship `json:",inline" validate:"required"`
}

type BuildCreate

type BuildCreate struct {
	Package         *RelationshipData `json:"package" validate:"required"`
	StagingMemoryMB *int              `json:"staging_memory_in_mb"`
	StagingDiskMB   *int              `json:"staging_disk_in_mb"`
	Lifecycle       *Lifecycle        `json:"lifecycle"`
	Metadata        Metadata          `json:"metadata"`
}

func (*BuildCreate) ToMessage

func (c *BuildCreate) ToMessage(appGUID string, spaceGUID string) repositories.BuildCreateMessage

type Lifecycle

type Lifecycle struct {
	Type string        `json:"type" validate:"required"`
	Data LifecycleData `json:"data" validate:"required"`
}

type LifecycleData

type LifecycleData struct {
	Buildpacks []string `json:"buildpacks" validate:"required"`
	Stack      string   `json:"stack" validate:"required"`
}

type Metadata

type Metadata struct {
	Labels      map[string]string `json:"labels"`
	Annotations map[string]string `json:"annotations"`
}

type OrgCreate

type OrgCreate struct {
	Name      string   `json:"name" validate:"required"`
	Suspended bool     `json:"suspended"`
	Metadata  Metadata `json:"metadata"`
}

func (OrgCreate) ToRecord

func (p OrgCreate) ToRecord() repositories.OrgRecord

type PackageCreate

type PackageCreate struct {
	Type          string                `json:"type" validate:"required,oneof='bits'"`
	Relationships *PackageRelationships `json:"relationships" validate:"required"`
}

func (PackageCreate) ToMessage

func (m PackageCreate) ToMessage(spaceGUID string) repositories.PackageCreateMessage

type PackageRelationships

type PackageRelationships struct {
	App *Relationship `json:"app" validate:"required"`
}

type Relationship

type Relationship struct {
	Data *RelationshipData `json:"data" validate:"required"`
}

type RelationshipData

type RelationshipData struct {
	GUID string `json:"guid" validate:"required"`
}

type RouteCreate

type RouteCreate struct {
	Host          string             `json:"host" validate:"hostname_rfc1123,required"` // TODO: Not required when we support private domains
	Path          string             `json:"path" validate:"routepathstartswithslash"`
	Relationships RouteRelationships `json:"relationships" validate:"required"`
	Metadata      Metadata           `json:"metadata"`
}

func (RouteCreate) ToRecord

func (p RouteCreate) ToRecord() repositories.RouteRecord

type RouteRelationships

type RouteRelationships struct {
	Domain Relationship `json:"domain" validate:"required"`
	Space  Relationship `json:"space" validate:"required"`
}

type SpaceCreate

type SpaceCreate struct {
	Name          string             `json:"name" validate:"required"`
	Relationships SpaceRelationships `json:"relationships" validate:"required"`
	Metadata      Metadata           `json:"metadata"`
}

func (SpaceCreate) ToRecord

func (p SpaceCreate) ToRecord() repositories.SpaceRecord

type SpaceRelationships

type SpaceRelationships struct {
	Org Relationship `json:"organization" validate:"required"`
}

Jump to

Keyboard shortcuts

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