Documentation ¶
Index ¶
- Variables
- func Decode(payloadObject keyedPayload, values url.Values) error
- func ParseArrayParam(arrayParam string) []string
- type AppCreate
- type AppList
- type AppPatch
- type AppPatchEnvVars
- type AppRelationships
- type AppResource
- type AppSetCurrentDroplet
- type BuildCreate
- type BuildMetadata
- type BuildpackList
- type Data
- type Destination
- type DestinationAppProcess
- type DestinationListCreate
- type DomainCreate
- type DomainList
- type DomainUpdate
- type DropletUpdate
- type HealthCheck
- type Lifecycle
- type LifecycleData
- type LogRead
- type Manifest
- type ManifestApplication
- type ManifestApplicationProcess
- type ManifestRoute
- type Metadata
- type MetadataPatch
- type OrgCreate
- type OrgPatch
- type PackageCreate
- type PackageListDropletsQueryParameters
- type PackageListQueryParameters
- type PackageRelationships
- type PackageUpdate
- type ProcessList
- type ProcessPatch
- type ProcessScale
- type Relationship
- type RelationshipData
- type RoleCreate
- type RoleListFilter
- type RoleRelationships
- type RouteCreate
- type RouteList
- type RoutePatch
- type RouteRelationships
- type ServiceBindingCreate
- type ServiceBindingList
- type ServiceBindingRelationships
- type ServiceBindingUpdate
- type ServiceInstanceCreate
- type ServiceInstanceList
- type ServiceInstancePatch
- type ServiceInstanceRelationships
- type SpaceCreate
- type SpacePatch
- type SpaceRelationships
- type TaskCreate
- type TaskList
- type TaskUpdate
- type UserRelationship
- type UserRelationshipData
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 ¶
func ParseArrayParam ¶
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) ToAppCreateMessage ¶
func (p AppCreate) ToAppCreateMessage() repositories.CreateAppMessage
type AppList ¶
func (*AppList) DecodeFromURLValues ¶ added in v0.6.0
func (*AppList) SupportedKeys ¶ added in v0.2.0
func (*AppList) ToMessage ¶
func (a *AppList) ToMessage() repositories.ListAppsMessage
type AppPatch ¶ added in v0.3.0
type AppPatch struct {
Metadata MetadataPatch `json:"metadata"`
}
func (*AppPatch) ToMessage ¶ added in v0.3.0
func (a *AppPatch) ToMessage(appGUID, spaceGUID string) repositories.PatchAppMetadataMessage
type AppPatchEnvVars ¶
type AppPatchEnvVars struct {
Var map[string]interface{} `json:"var" validate:"required,dive,keys,startsnotwith=VCAP_,startsnotwith=VMC_,ne=PORT,endkeys"`
}
func (*AppPatchEnvVars) ToMessage ¶
func (a *AppPatchEnvVars) ToMessage(appGUID, spaceGUID string) repositories.PatchAppEnvVarsMessage
type AppRelationships ¶
type AppRelationships struct {
Space Relationship `json:"space" validate:"required"`
}
type AppResource ¶
type AppResource struct { GUID string `json:"guid" validate:"required"` Process *DestinationAppProcess `json:"process"` }
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 BuildMetadata `json:"metadata"` }
func (*BuildCreate) ToMessage ¶
func (c *BuildCreate) ToMessage(appRecord repositories.AppRecord) repositories.CreateBuildMessage
type BuildMetadata ¶ added in v0.7.0
type BuildpackList ¶
type BuildpackList struct{}
func (*BuildpackList) DecodeFromURLValues ¶ added in v0.6.0
func (d *BuildpackList) DecodeFromURLValues(values url.Values) error
func (*BuildpackList) SupportedKeys ¶ added in v0.2.0
func (d *BuildpackList) SupportedKeys() []string
type Destination ¶
type Destination struct { App *AppResource `json:"app" validate:"required"` Port *int `json:"port"` Protocol *string `json:"protocol" validate:"omitempty,oneof=http1"` }
type DestinationAppProcess ¶
type DestinationAppProcess struct {
Type string `json:"type" validate:"required"`
}
type DestinationListCreate ¶
type DestinationListCreate struct {
Destinations []Destination `json:"destinations" validate:"required,dive"`
}
func (DestinationListCreate) ToMessage ¶
func (dc DestinationListCreate) ToMessage(routeRecord repositories.RouteRecord) repositories.AddDestinationsToRouteMessage
type DomainCreate ¶ added in v0.5.0
type DomainCreate struct { Name string `json:"name" validate:"required"` Internal bool `json:"internal"` Metadata Metadata `json:"metadata"` Relationships map[string]Relationship `json:"relationships"` }
func (*DomainCreate) ToMessage ¶ added in v0.5.0
func (c *DomainCreate) ToMessage() (repositories.CreateDomainMessage, error)
type DomainList ¶
type DomainList struct {
Names string
}
func (*DomainList) DecodeFromURLValues ¶ added in v0.6.0
func (d *DomainList) DecodeFromURLValues(values url.Values) error
func (*DomainList) SupportedKeys ¶ added in v0.2.0
func (d *DomainList) SupportedKeys() []string
func (*DomainList) ToMessage ¶
func (d *DomainList) ToMessage() repositories.ListDomainsMessage
type DomainUpdate ¶ added in v0.5.0
type DomainUpdate struct {
Metadata MetadataPatch `json:"metadata"`
}
func (*DomainUpdate) ToMessage ¶ added in v0.5.0
func (c *DomainUpdate) ToMessage(domainGUID string) repositories.UpdateDomainMessage
type DropletUpdate ¶ added in v0.7.0
type DropletUpdate struct {
Metadata MetadataPatch `json:"metadata"`
}
func (*DropletUpdate) ToMessage ¶ added in v0.7.0
func (c *DropletUpdate) ToMessage(dropletGUID string) repositories.UpdateDropletMessage
type HealthCheck ¶
type Lifecycle ¶
type Lifecycle struct { Type string `json:"type" validate:"required"` Data LifecycleData `json:"data" validate:"required"` }
type LifecycleData ¶
type LogRead ¶
type LogRead struct { StartTime int64 EnvelopeTypes []string `validate:"dive,eq=LOG|eq=COUNTER|eq=GAUGE|eq=TIMER|eq=EVENT"` Limit int64 Descending bool }
func (*LogRead) DecodeFromURLValues ¶ added in v0.6.0
func (*LogRead) SupportedKeys ¶ added in v0.2.0
type Manifest ¶
type Manifest struct { Version int `yaml:"version"` Applications []ManifestApplication `json:"applications" yaml:"applications"` }
type ManifestApplication ¶
type ManifestApplication struct { Name string `json:"name" yaml:"name"` Env map[string]string `yaml:"env"` DefaultRoute bool `json:"default-route" yaml:"default-route"` RandomRoute bool `yaml:"random-route"` NoRoute bool `yaml:"no-route"` Command *string `yaml:"command"` Instances *int `json:"instances" yaml:"instances"` Memory *string `json:"memory" yaml:"memory"` DiskQuota *string `json:"disk_quota" yaml:"disk_quota"` // AltDiskQuota supports `disk-quota` with a hyphen for backwards compatibility. // Do not set both DiskQuota and AltDiskQuota. // // Deprecated: Use DiskQuota instead AltDiskQuota *string `json:"disk-quota" yaml:"disk-quota"` HealthCheckHTTPEndpoint *string `yaml:"health-check-http-endpoint"` HealthCheckInvocationTimeout *int64 `json:"health-check-invocation-timeout" yaml:"health-check-invocation-timeout"` HealthCheckType *string `json:"health-check-type" yaml:"health-check-type"` Timeout *int64 `json:"timeout" yaml:"timeout"` Processes []ManifestApplicationProcess `json:"processes" yaml:"processes"` Routes []ManifestRoute `json:"routes" yaml:"routes"` Buildpacks []string `yaml:"buildpacks"` // Deprecated: Use Buildpacks instead Buildpack string `yaml:"buildpack"` Metadata MetadataPatch `yaml:"metadata"` }
func (ManifestApplication) ToAppCreateMessage ¶
func (a ManifestApplication) ToAppCreateMessage(spaceGUID string) repositories.CreateAppMessage
func (ManifestApplication) ToAppPatchMessage ¶ added in v0.4.0
func (a ManifestApplication) ToAppPatchMessage(appGUID, spaceGUID string) repositories.PatchAppMessage
func (ManifestApplication) Validate ¶ added in v0.7.0
func (a ManifestApplication) Validate() error
type ManifestApplicationProcess ¶
type ManifestApplicationProcess struct { Type string `json:"type" yaml:"type"` Command *string `yaml:"command"` DiskQuota *string `json:"disk_quota" yaml:"disk_quota"` // AltDiskQuota supports `disk-quota` with a hyphen for backwards compatibility. // Do not set both DiskQuota and AltDiskQuota. // // Deprecated: Use DiskQuota instead AltDiskQuota *string `json:"disk-quota" yaml:"disk-quota"` HealthCheckHTTPEndpoint *string `yaml:"health-check-http-endpoint"` HealthCheckInvocationTimeout *int64 `json:"health-check-invocation-timeout" yaml:"health-check-invocation-timeout"` HealthCheckType *string `json:"health-check-type" yaml:"health-check-type"` Instances *int `json:"instances" yaml:"instances"` Memory *string `json:"memory" yaml:"memory"` Timeout *int64 `json:"timeout" yaml:"timeout"` }
TODO: Why is kebab-case used everywhere anyway and we have a deprecated field that claims to use it for backwards compatibility?
func (ManifestApplicationProcess) ToProcessCreateMessage ¶
func (p ManifestApplicationProcess) ToProcessCreateMessage(appGUID, spaceGUID string) repositories.CreateProcessMessage
func (ManifestApplicationProcess) ToProcessPatchMessage ¶
func (p ManifestApplicationProcess) ToProcessPatchMessage(processGUID, spaceGUID string) repositories.PatchProcessMessage
func (ManifestApplicationProcess) Validate ¶ added in v0.7.0
func (p ManifestApplicationProcess) Validate() error
type ManifestRoute ¶
type ManifestRoute struct {
Route *string `json:"route" yaml:"route"`
}
func (ManifestRoute) Validate ¶ added in v0.7.0
func (m ManifestRoute) Validate() error
type MetadataPatch ¶ added in v0.3.0
type OrgCreate ¶
type OrgCreate struct { Name string `json:"name" validate:"required"` Suspended bool `json:"suspended"` Metadata Metadata `json:"metadata"` }
func (OrgCreate) ToMessage ¶
func (p OrgCreate) ToMessage() repositories.CreateOrgMessage
type OrgPatch ¶ added in v0.3.0
type OrgPatch struct {
Metadata MetadataPatch `json:"metadata"`
}
func (OrgPatch) ToMessage ¶ added in v0.3.0
func (p OrgPatch) ToMessage(orgGUID string) repositories.PatchOrgMetadataMessage
type PackageCreate ¶
type PackageCreate struct { Type string `json:"type" validate:"required,oneof='bits'"` Relationships *PackageRelationships `json:"relationships" validate:"required"` Metadata Metadata `json:"metadata"` }
func (PackageCreate) ToMessage ¶
func (m PackageCreate) ToMessage(record repositories.AppRecord) repositories.CreatePackageMessage
type PackageListDropletsQueryParameters ¶
type PackageListDropletsQueryParameters struct{}
func (*PackageListDropletsQueryParameters) DecodeFromURLValues ¶ added in v0.6.0
func (p *PackageListDropletsQueryParameters) DecodeFromURLValues(values url.Values) error
func (*PackageListDropletsQueryParameters) SupportedKeys ¶ added in v0.2.0
func (p *PackageListDropletsQueryParameters) SupportedKeys() []string
func (*PackageListDropletsQueryParameters) ToMessage ¶
func (p *PackageListDropletsQueryParameters) ToMessage(packageGUIDs []string) repositories.ListDropletsMessage
type PackageListQueryParameters ¶
func (*PackageListQueryParameters) DecodeFromURLValues ¶ added in v0.6.0
func (p *PackageListQueryParameters) DecodeFromURLValues(values url.Values) error
func (*PackageListQueryParameters) SupportedKeys ¶ added in v0.2.0
func (p *PackageListQueryParameters) SupportedKeys() []string
func (*PackageListQueryParameters) ToMessage ¶
func (p *PackageListQueryParameters) ToMessage() repositories.ListPackagesMessage
type PackageRelationships ¶
type PackageRelationships struct {
App *Relationship `json:"app" validate:"required"`
}
type PackageUpdate ¶ added in v0.5.0
type PackageUpdate struct {
Metadata MetadataPatch `json:"metadata"`
}
func (*PackageUpdate) ToMessage ¶ added in v0.5.0
func (u *PackageUpdate) ToMessage(packageGUID string) repositories.UpdatePackageMessage
type ProcessList ¶
type ProcessList struct {
AppGUIDs string
}
func (*ProcessList) DecodeFromURLValues ¶ added in v0.6.0
func (p *ProcessList) DecodeFromURLValues(values url.Values) error
func (*ProcessList) SupportedKeys ¶ added in v0.2.0
func (p *ProcessList) SupportedKeys() []string
func (*ProcessList) ToMessage ¶
func (p *ProcessList) ToMessage() repositories.ListProcessesMessage
type ProcessPatch ¶
type ProcessPatch struct { Metadata *MetadataPatch `json:"metadata"` Command *string `json:"command"` HealthCheck *HealthCheck `json:"health_check"` }
func (ProcessPatch) ToProcessPatchMessage ¶
func (p ProcessPatch) ToProcessPatchMessage(processGUID, spaceGUID string) repositories.PatchProcessMessage
type ProcessScale ¶
type ProcessScale struct { Instances *int `json:"instances" validate:"omitempty,gte=0"` MemoryMB *int64 `json:"memory_in_mb" validate:"omitempty,gt=0"` DiskMB *int64 `json:"disk_in_mb" validate:"omitempty,gt=0"` }
func (ProcessScale) ToRecord ¶
func (p ProcessScale) ToRecord() repositories.ProcessScaleValues
type Relationship ¶
type Relationship struct {
Data *RelationshipData `json:"data" validate:"required"`
}
type RelationshipData ¶
type RelationshipData struct {
GUID string `json:"guid" validate:"required"`
}
type RoleCreate ¶
type RoleCreate struct { Type string `json:"type" validate:"required"` Relationships RoleRelationships `json:"relationships" validate:"required"` }
func (RoleCreate) ToMessage ¶
func (p RoleCreate) ToMessage() repositories.CreateRoleMessage
type RoleListFilter ¶ added in v0.7.0
type RoleListFilter struct { GUIDs map[string]bool Types map[string]bool SpaceGUIDs map[string]bool OrgGUIDs map[string]bool UserGUIDs map[string]bool }
func (*RoleListFilter) DecodeFromURLValues ¶ added in v0.7.0
func (r *RoleListFilter) DecodeFromURLValues(values url.Values) error
func (*RoleListFilter) SupportedKeys ¶ added in v0.7.0
func (r *RoleListFilter) SupportedKeys() []string
type RoleRelationships ¶
type RoleRelationships struct { User *UserRelationship `json:"user" validate:"required"` Space *Relationship `json:"space"` Organization *Relationship `json:"organization"` }
type RouteCreate ¶
type RouteCreate struct { Host string `json:"host" validate:"required"` // TODO: Not required when we support private domains Path string `json:"path"` Relationships RouteRelationships `json:"relationships" validate:"required"` Metadata Metadata `json:"metadata"` }
func (RouteCreate) ToMessage ¶
func (p RouteCreate) ToMessage(domainNamespace, domainName string) repositories.CreateRouteMessage
type RouteList ¶
type RouteList struct { AppGUIDs string SpaceGUIDs string DomainGUIDs string Hosts string Paths string }
func (*RouteList) DecodeFromURLValues ¶ added in v0.6.0
func (*RouteList) SupportedKeys ¶ added in v0.2.0
func (*RouteList) ToMessage ¶
func (p *RouteList) ToMessage() repositories.ListRoutesMessage
type RoutePatch ¶ added in v0.5.0
type RoutePatch struct {
Metadata MetadataPatch `json:"metadata"`
}
func (*RoutePatch) ToMessage ¶ added in v0.5.0
func (a *RoutePatch) ToMessage(routeGUID, spaceGUID string) repositories.PatchRouteMetadataMessage
type RouteRelationships ¶
type RouteRelationships struct { Domain Relationship `json:"domain" validate:"required"` Space Relationship `json:"space" validate:"required"` }
type ServiceBindingCreate ¶
type ServiceBindingCreate struct { Relationships *ServiceBindingRelationships `json:"relationships" validate:"required"` Type string `json:"type" validate:"oneof=app"` Name *string `json:"name"` }
func (ServiceBindingCreate) ToMessage ¶
func (p ServiceBindingCreate) ToMessage(spaceGUID string) repositories.CreateServiceBindingMessage
type ServiceBindingList ¶
func (*ServiceBindingList) DecodeFromURLValues ¶ added in v0.6.0
func (l *ServiceBindingList) DecodeFromURLValues(values url.Values) error
func (*ServiceBindingList) SupportedKeys ¶ added in v0.2.0
func (l *ServiceBindingList) SupportedKeys() []string
func (*ServiceBindingList) ToMessage ¶
func (l *ServiceBindingList) ToMessage() repositories.ListServiceBindingsMessage
type ServiceBindingRelationships ¶
type ServiceBindingRelationships struct { App *Relationship `json:"app" validate:"required"` ServiceInstance *Relationship `json:"service_instance" validate:"required"` }
type ServiceBindingUpdate ¶ added in v0.7.0
type ServiceBindingUpdate struct {
Metadata MetadataPatch `json:"metadata"`
}
func (*ServiceBindingUpdate) ToMessage ¶ added in v0.7.0
func (c *ServiceBindingUpdate) ToMessage(serviceBindingGUID string) repositories.UpdateServiceBindingMessage
type ServiceInstanceCreate ¶
type ServiceInstanceCreate struct { Name string `json:"name" validate:"required"` Type string `json:"type" validate:"required,oneof=user-provided"` Tags []string `json:"tags" validate:"serviceinstancetaglength"` Credentials map[string]string `json:"credentials"` Relationships ServiceInstanceRelationships `json:"relationships" validate:"required"` Metadata Metadata `json:"metadata"` }
func (ServiceInstanceCreate) ToServiceInstanceCreateMessage ¶
func (p ServiceInstanceCreate) ToServiceInstanceCreateMessage() repositories.CreateServiceInstanceMessage
type ServiceInstanceList ¶
func (*ServiceInstanceList) DecodeFromURLValues ¶ added in v0.6.0
func (l *ServiceInstanceList) DecodeFromURLValues(values url.Values) error
func (*ServiceInstanceList) SupportedKeys ¶ added in v0.2.0
func (l *ServiceInstanceList) SupportedKeys() []string
func (*ServiceInstanceList) ToMessage ¶
func (l *ServiceInstanceList) ToMessage() repositories.ListServiceInstanceMessage
type ServiceInstancePatch ¶ added in v0.7.0
type ServiceInstancePatch struct { Name *string `json:"name,omitempty"` Tags *[]string `json:"tags,omitempty"` Credentials *map[string]string `json:"credentials,omitempty"` Metadata MetadataPatch `json:"metadata"` }
func (ServiceInstancePatch) ToServiceInstancePatchMessage ¶ added in v0.7.0
func (p ServiceInstancePatch) ToServiceInstancePatchMessage(spaceGUID, appGUID string) repositories.PatchServiceInstanceMessage
func (*ServiceInstancePatch) UnmarshalJSON ¶ added in v0.7.0
func (p *ServiceInstancePatch) UnmarshalJSON(data []byte) error
type ServiceInstanceRelationships ¶
type ServiceInstanceRelationships struct {
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) ToMessage ¶
func (p SpaceCreate) ToMessage() repositories.CreateSpaceMessage
type SpacePatch ¶ added in v0.3.0
type SpacePatch struct {
Metadata MetadataPatch `json:"metadata"`
}
func (SpacePatch) ToMessage ¶ added in v0.3.0
func (p SpacePatch) ToMessage(spaceGUID, orgGUID string) repositories.PatchSpaceMetadataMessage
type SpaceRelationships ¶
type SpaceRelationships struct {
Org Relationship `json:"organization" validate:"required"`
}
type TaskCreate ¶ added in v0.2.0
type TaskCreate struct { Command string `json:"command" validate:"required"` Metadata Metadata `json:"metadata"` }
func (TaskCreate) ToMessage ¶ added in v0.2.0
func (p TaskCreate) ToMessage(appRecord repositories.AppRecord) repositories.CreateTaskMessage
type TaskList ¶ added in v0.2.0
type TaskList struct {
SequenceIDs []int64
}
func (*TaskList) DecodeFromURLValues ¶ added in v0.6.0
func (*TaskList) SupportedKeys ¶ added in v0.2.0
func (*TaskList) ToMessage ¶ added in v0.2.0
func (t *TaskList) ToMessage() repositories.ListTaskMessage
type TaskUpdate ¶ added in v0.7.0
type TaskUpdate struct {
Metadata MetadataPatch `json:"metadata"`
}
func (*TaskUpdate) ToMessage ¶ added in v0.7.0
func (u *TaskUpdate) ToMessage(taskGUID, spaceGUID string) repositories.PatchTaskMetadataMessage
type UserRelationship ¶
type UserRelationship struct {
Data UserRelationshipData `json:"data" validate:"required"`
}
type UserRelationshipData ¶
Click to show internal directories.
Click to hide internal directories.