services

package
v2.1.8 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2020 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Credentials

type Credentials = services.Credentials

Credentials is the collection of credential keys.

In order to encourage good design, this does not include the values even though they exist. Buildpacks should only extract values at startup/runtime and not embed them in image.

type Service

type Service = services.Service

Service represents a service bound to the application.

type Services

type Services struct {
	services.Services
}

Services is a collection of services bound to the application.

func (Services) FindServiceCredentials

func (s Services) FindServiceCredentials(filter string, credentials ...string) (Credentials, bool)

FindServiceCredentials returns the credentials payload for given service. The selected service is one who's BindingName, InstanceName, Label, or Tags contain the filter and has the required credentials. Returns the credentials and true if exactly one service is matched, otherwise false.

NOTE: This function should ONLY be used to extract values that are CONSTANT throughout the lifecycle of a staged application. Typically this means you should only use this function to get agent download information from Service Brokers and SHOULD NOT EVER retrieve and use connection credentials.

func (Services) HasService

func (s Services) HasService(filter string, credentials ...string) bool

HasService determines whether a single service, who's BindingName, InstanceName, Label, or Tags contain the filter and has the required credentials, exists. Returns true if exactly one service is matched, false otherwise.

Jump to

Keyboard shortcuts

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