Documentation ¶
Index ¶
- Constants
- func GenerateInstanceGroupsWithNoProperties(instanceGroups []InstanceGroup, serviceReleases ServiceReleases, ...) ([]bosh.InstanceGroup, error)
- func HandleCLI(args []string, handler CommandLineHandler)
- func HandleCommandLineInvocation(args []string, manifestGenerator ManifestGenerator, binder Binder, ...)deprecated
- type Action
- type AppGuidNotProvidedError
- type BOSHConfigs
- type Binder
- type Binding
- type BindingAlreadyExistsError
- type BindingNotFoundError
- type CLIHandlerError
- type CommandLineHandler
- type CreateBindingAction
- type CreateBindingJSONParams
- type CreateBindingParams
- type DNSAddresses
- type DashboardUrl
- type DashboardUrlAction
- type DashboardUrlGenerator
- type DashboardUrlJSONParams
- type DashboardUrlParams
- type DeleteBindingAction
- type DeleteBindingJSONParams
- type DeleteBindingParams
- type Errand
- type GenerateManifestAction
- type GenerateManifestJSONParams
- type GenerateManifestOutput
- type GenerateManifestParams
- type GeneratePlanSchemaParams
- type GeneratePlanSchemasAction
- type GeneratePlanSchemasJSONParams
- type InputParams
- type InstanceGroup
- type JSONSchemas
- type LifecycleErrands
- type ManifestGenerator
- type ManifestSecrets
- type MarshalledGenerateManifest
- type Migration
- type MissingArgsError
- type ODBManagedSecrets
- type Plan
- type PlanSchema
- type Properties
- type RequestParameters
- type SchemaGenerator
- type ServiceBindingSchema
- type ServiceDeployment
- type ServiceInstanceSchema
- type ServiceInstanceUAAClient
- type ServiceRelease
- type ServiceReleases
- type Stemcell
- type Update
- type VMExtensions
Constants ¶
View Source
const ( ErrorExitCode = 1 NotImplementedExitCode = 10 BindingNotFoundErrorExitCode = 41 AppGuidNotProvidedErrorExitCode = 42 BindingAlreadyExistsErrorExitCode = 49 ODBSecretPrefix = "odb_secret" )
Variables ¶
This section is empty.
Functions ¶
func GenerateInstanceGroupsWithNoProperties ¶
func GenerateInstanceGroupsWithNoProperties( instanceGroups []InstanceGroup, serviceReleases ServiceReleases, stemcell string, deploymentInstanceGroupsToJobs map[string][]string, ) ([]bosh.InstanceGroup, error)
func HandleCLI ¶ added in v0.21.0
func HandleCLI(args []string, handler CommandLineHandler)
HandleCLI calls the correct Service Adapter handler method based on command line arguments. The first argument at the command line should be one of: generate-manifest, create-binding, delete-binding, dashboard-url.
func HandleCommandLineInvocation
deprecated
func HandleCommandLineInvocation(args []string, manifestGenerator ManifestGenerator, binder Binder, dashboardUrlGenerator DashboardUrlGenerator)
Deprecated: Use HandleCLI method of a CommandLineHandler
HandleCommandLineInvocation constructs a CommandLineHandler based on minimal service adapter interface handlers and runs HandleCLI based on the arguments provided
Types ¶
type Action ¶ added in v0.22.0
type Action interface { IsImplemented() bool ParseArgs(io.Reader, []string) (InputParams, error) Execute(InputParams, io.Writer) error }
type AppGuidNotProvidedError ¶
type AppGuidNotProvidedError struct {
// contains filtered or unexported fields
}
func NewAppGuidNotProvidedError ¶
func NewAppGuidNotProvidedError(err error) AppGuidNotProvidedError
type BOSHConfigs ¶ added in v0.26.0
type Binder ¶
type Binder interface { CreateBinding(params CreateBindingParams) (Binding, error) DeleteBinding(params DeleteBindingParams) error }
type BindingAlreadyExistsError ¶
type BindingAlreadyExistsError struct {
// contains filtered or unexported fields
}
func NewBindingAlreadyExistsError ¶
func NewBindingAlreadyExistsError(err error) BindingAlreadyExistsError
type BindingNotFoundError ¶
type BindingNotFoundError struct {
// contains filtered or unexported fields
}
func NewBindingNotFoundError ¶
func NewBindingNotFoundError(err error) BindingNotFoundError
type CLIHandlerError ¶ added in v0.21.0
func (CLIHandlerError) Error ¶ added in v0.21.0
func (e CLIHandlerError) Error() string
type CommandLineHandler ¶ added in v0.21.0
type CommandLineHandler struct { ManifestGenerator ManifestGenerator Binder Binder DashboardURLGenerator DashboardUrlGenerator SchemaGenerator SchemaGenerator }
CommandLineHandler contains all of the implementers required for the service adapter interface
type CreateBindingAction ¶ added in v0.22.0
type CreateBindingAction struct {
// contains filtered or unexported fields
}
func NewCreateBindingAction ¶ added in v0.22.0
func NewCreateBindingAction(binder Binder) *CreateBindingAction
func (*CreateBindingAction) Execute ¶ added in v0.22.0
func (a *CreateBindingAction) Execute(inputParams InputParams, outputWriter io.Writer) error
func (*CreateBindingAction) IsImplemented ¶ added in v0.22.0
func (a *CreateBindingAction) IsImplemented() bool
func (*CreateBindingAction) ParseArgs ¶ added in v0.22.0
func (a *CreateBindingAction) ParseArgs(reader io.Reader, args []string) (InputParams, error)
type CreateBindingJSONParams ¶ added in v0.26.0
type CreateBindingParams ¶ added in v0.22.0
type CreateBindingParams struct { BindingID string DeploymentTopology bosh.BoshVMs Manifest bosh.BoshManifest RequestParams RequestParameters Secrets ManifestSecrets DNSAddresses DNSAddresses }
type DNSAddresses ¶ added in v0.22.0
type DashboardUrl ¶
type DashboardUrl struct {
DashboardUrl string `json:"dashboard_url"`
}
type DashboardUrlAction ¶ added in v0.22.0
type DashboardUrlAction struct {
// contains filtered or unexported fields
}
func NewDashboardUrlAction ¶ added in v0.22.0
func NewDashboardUrlAction(dashboardUrlGenerator DashboardUrlGenerator) *DashboardUrlAction
func (*DashboardUrlAction) Execute ¶ added in v0.22.0
func (d *DashboardUrlAction) Execute(inputParams InputParams, outputWriter io.Writer) error
func (*DashboardUrlAction) IsImplemented ¶ added in v0.22.0
func (d *DashboardUrlAction) IsImplemented() bool
func (*DashboardUrlAction) ParseArgs ¶ added in v0.22.0
func (d *DashboardUrlAction) ParseArgs(reader io.Reader, args []string) (InputParams, error)
type DashboardUrlGenerator ¶
type DashboardUrlGenerator interface {
DashboardUrl(params DashboardUrlParams) (DashboardUrl, error)
}
type DashboardUrlJSONParams ¶ added in v0.26.0
type DashboardUrlParams ¶ added in v0.22.0
type DashboardUrlParams struct { InstanceID string Plan Plan Manifest bosh.BoshManifest }
type DeleteBindingAction ¶ added in v0.22.0
type DeleteBindingAction struct {
// contains filtered or unexported fields
}
func NewDeleteBindingAction ¶ added in v0.22.0
func NewDeleteBindingAction(unbinder Binder) *DeleteBindingAction
func (*DeleteBindingAction) Execute ¶ added in v0.22.0
func (d *DeleteBindingAction) Execute(inputParams InputParams, outputWriter io.Writer) error
func (*DeleteBindingAction) IsImplemented ¶ added in v0.22.0
func (d *DeleteBindingAction) IsImplemented() bool
func (*DeleteBindingAction) ParseArgs ¶ added in v0.22.0
func (d *DeleteBindingAction) ParseArgs(reader io.Reader, args []string) (InputParams, error)
type DeleteBindingJSONParams ¶ added in v0.26.0
type DeleteBindingParams ¶ added in v0.22.0
type DeleteBindingParams struct { BindingID string DeploymentTopology bosh.BoshVMs Manifest bosh.BoshManifest RequestParams RequestParameters Secrets ManifestSecrets DNSAddresses DNSAddresses }
type GenerateManifestAction ¶ added in v0.22.0
type GenerateManifestAction struct {
// contains filtered or unexported fields
}
func NewGenerateManifestAction ¶ added in v0.22.0
func NewGenerateManifestAction(manifestGenerator ManifestGenerator) *GenerateManifestAction
func (*GenerateManifestAction) Execute ¶ added in v0.22.0
func (g *GenerateManifestAction) Execute(inputParams InputParams, outputWriter io.Writer) (err error)
func (*GenerateManifestAction) IsImplemented ¶ added in v0.22.0
func (g *GenerateManifestAction) IsImplemented() bool
func (*GenerateManifestAction) ParseArgs ¶ added in v0.22.0
func (g *GenerateManifestAction) ParseArgs(reader io.Reader, args []string) (InputParams, error)
type GenerateManifestJSONParams ¶ added in v0.26.0
type GenerateManifestJSONParams struct { ServiceDeployment string `json:"service_deployment"` Plan string `json:"plan"` PreviousPlan string `json:"previous_plan"` PreviousManifest string `json:"previous_manifest"` RequestParameters string `json:"request_parameters"` PreviousSecrets string `json:"previous_secrets"` PreviousConfigs string `json:"previous_configs"` ServiceInstanceUAAClient string `json:"uaa_client"` }
type GenerateManifestOutput ¶ added in v0.22.0
type GenerateManifestOutput struct { Manifest bosh.BoshManifest `json:"manifest"` ODBManagedSecrets ODBManagedSecrets `json:"secrets"` Configs BOSHConfigs `json:"configs"` }
type GenerateManifestParams ¶ added in v0.22.0
type GenerateManifestParams struct { ServiceDeployment ServiceDeployment Plan Plan RequestParams RequestParameters PreviousManifest *bosh.BoshManifest PreviousPlan *Plan PreviousSecrets ManifestSecrets PreviousConfigs BOSHConfigs ServiceInstanceUAAClient *ServiceInstanceUAAClient }
type GeneratePlanSchemaParams ¶ added in v0.26.0
type GeneratePlanSchemaParams struct {
Plan Plan
}
type GeneratePlanSchemasAction ¶ added in v0.22.0
type GeneratePlanSchemasAction struct {
// contains filtered or unexported fields
}
func NewGeneratePlanSchemasAction ¶ added in v0.22.0
func NewGeneratePlanSchemasAction(schemaGenerator SchemaGenerator, errorWriter io.Writer) *GeneratePlanSchemasAction
func (*GeneratePlanSchemasAction) Execute ¶ added in v0.22.0
func (g *GeneratePlanSchemasAction) Execute(inputParams InputParams, outputWriter io.Writer) (err error)
func (*GeneratePlanSchemasAction) IsImplemented ¶ added in v0.22.0
func (g *GeneratePlanSchemasAction) IsImplemented() bool
func (*GeneratePlanSchemasAction) ParseArgs ¶ added in v0.22.0
func (g *GeneratePlanSchemasAction) ParseArgs(reader io.Reader, args []string) (InputParams, error)
type GeneratePlanSchemasJSONParams ¶ added in v0.26.0
type GeneratePlanSchemasJSONParams struct {
Plan string `json:"plan"`
}
type InputParams ¶ added in v0.22.0
type InputParams struct { GenerateManifest GenerateManifestJSONParams `json:"generate_manifest,omitempty"` DashboardUrl DashboardUrlJSONParams `json:"dashboard_url,omitempty"` CreateBinding CreateBindingJSONParams `json:"create_binding,omitempty"` DeleteBinding DeleteBindingJSONParams `json:"delete_binding,omitempty"` GeneratePlanSchemas GeneratePlanSchemasJSONParams `json:"generate_plan_schemas,omitempty"` TextOutput bool `json:"-"` }
type InstanceGroup ¶
type InstanceGroup struct { Name string `json:"name" validate:"required"` VMType string `yaml:"vm_type" json:"vm_type" validate:"required"` VMExtensions VMExtensions `yaml:"vm_extensions,omitempty" json:"vm_extensions,omitempty"` PersistentDiskType string `yaml:"persistent_disk_type,omitempty" json:"persistent_disk_type,omitempty"` Instances int `json:"instances" validate:"min=1"` Networks []string `json:"networks" validate:"required"` AZs []string `json:"azs" validate:"required,min=1"` Lifecycle string `yaml:"lifecycle,omitempty" json:"lifecycle,omitempty"` MigratedFrom []Migration `yaml:"migrated_from,omitempty" json:"migrated_from,omitempty"` }
func (*InstanceGroup) UnmarshalYAML ¶
func (i *InstanceGroup) UnmarshalYAML(unmarshal func(interface{}) error) error
type JSONSchemas ¶ added in v0.21.0
type JSONSchemas struct {
Parameters map[string]interface{} `json:"parameters"`
}
type LifecycleErrands ¶ added in v0.19.0
type ManifestGenerator ¶
type ManifestGenerator interface {
GenerateManifest(params GenerateManifestParams) (GenerateManifestOutput, error)
}
type ManifestSecrets ¶ added in v0.22.0
type MarshalledGenerateManifest ¶ added in v0.22.0
type MarshalledGenerateManifest struct { Manifest string `json:"manifest"` ODBManagedSecrets ODBManagedSecrets `json:"secrets"` Configs BOSHConfigs `json:"configs"` }
type MissingArgsError ¶ added in v0.22.0
type MissingArgsError struct {
// contains filtered or unexported fields
}
func NewMissingArgsError ¶ added in v0.22.0
func NewMissingArgsError(e string) MissingArgsError
type ODBManagedSecrets ¶ added in v0.22.0
type ODBManagedSecrets map[string]interface{}
type Plan ¶
type Plan struct { Properties Properties `json:"properties"` LifecycleErrands LifecycleErrands `json:"lifecycle_errands,omitempty" yaml:"lifecycle_errands"` InstanceGroups []InstanceGroup `json:"instance_groups" validate:"required,dive" yaml:"instance_groups"` Update *Update `json:"update,omitempty"` }
type PlanSchema ¶ added in v0.21.0
type PlanSchema struct { ServiceInstance ServiceInstanceSchema `json:"service_instance"` ServiceBinding ServiceBindingSchema `json:"service_binding"` }
type Properties ¶
type Properties map[string]interface{}
type RequestParameters ¶
type RequestParameters map[string]interface{}
func (RequestParameters) ArbitraryContext ¶ added in v0.20.0
func (s RequestParameters) ArbitraryContext() map[string]interface{}
func (RequestParameters) ArbitraryParams ¶
func (s RequestParameters) ArbitraryParams() map[string]interface{}
func (RequestParameters) BindResource ¶ added in v0.19.0
func (s RequestParameters) BindResource() domain.BindResource
func (RequestParameters) Platform ¶ added in v0.20.0
func (s RequestParameters) Platform() string
type SchemaGenerator ¶ added in v0.21.0
type SchemaGenerator interface {
GeneratePlanSchema(params GeneratePlanSchemaParams) (PlanSchema, error)
}
type ServiceBindingSchema ¶ added in v0.21.0
type ServiceBindingSchema struct {
Create JSONSchemas `json:"create"`
}
type ServiceDeployment ¶
type ServiceDeployment struct { DeploymentName string `json:"deployment_name" validate:"required"` Releases ServiceReleases `json:"releases" validate:"required"` Stemcells []Stemcell `json:"stemcells" validate:"required"` }
func (ServiceDeployment) Validate ¶
func (s ServiceDeployment) Validate() error
type ServiceInstanceSchema ¶ added in v0.21.0
type ServiceInstanceSchema struct { Create JSONSchemas `json:"create"` Update JSONSchemas `json:"update"` }
type ServiceInstanceUAAClient ¶ added in v0.40.0
type ServiceInstanceUAAClient struct { Authorities string `json:"authorities"` AuthorizedGrantTypes string `json:"authorized_grant_types"` ClientID string `json:"client_id"` ClientSecret string `json:"client_secret"` Name string `json:"name"` ResourceIDs string `json:"resource_ids"` Scopes string `json:"scopes"` }
type ServiceRelease ¶
type ServiceRelease struct { Name string `json:"name" validate:"required"` Version string `json:"version" validate:"required"` Jobs []string `json:"jobs" validate:"required,min=1"` }
func FindReleaseForJob ¶ added in v0.17.2
func FindReleaseForJob(jobName string, releases ServiceReleases) (ServiceRelease, error)
type ServiceReleases ¶
type ServiceReleases []ServiceRelease
func (ServiceReleases) Validate ¶
func (r ServiceReleases) Validate() error
type Update ¶
type Update struct { Canaries int `json:"canaries" yaml:"canaries"` CanaryWatchTime string `json:"canary_watch_time" yaml:"canary_watch_time"` UpdateWatchTime string `json:"update_watch_time" yaml:"update_watch_time"` MaxInFlight bosh.MaxInFlightValue `json:"max_in_flight," yaml:"max_in_flight"` Serial *bool `json:"serial,omitempty" yaml:"serial,omitempty"` InitialDeployAZUpdateStrategy bosh.UpdateStrategy `json:"initial_deploy_az_update_strategy,omitempty" yaml:"initial_deploy_az_update_strategy,omitempty"` }
func (*Update) MarshalJSON ¶ added in v0.20.0
func (*Update) MarshalYAML ¶ added in v0.20.0
func (*Update) UnmarshalJSON ¶ added in v0.20.0
func (*Update) UnmarshalYAML ¶ added in v0.20.0
type VMExtensions ¶
type VMExtensions []string
func (*VMExtensions) UnmarshalYAML ¶
func (e *VMExtensions) UnmarshalYAML(unmarshal func(interface{}) error) error
Source Files ¶
Click to show internal directories.
Click to hide internal directories.