Help us shape the future of Go! Take the 2026 Go Developer Survey

osbutil

package
v2.12.3 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package osbutil provides utilties for interacting with Open Service Brokers.

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

func MapOSBToKfCatalog

func MapOSBToKfCatalog(catalog *osbclient.CatalogResponse) (out []v1alpha1.ServiceOffering)

MapOSBToKfCatalog converts an OSB style catalog to Kf's version with deterministic ordering.

func NewBasicAuthSecret

func NewBasicAuthSecret(name, username, password, url string, broker kmeta.OwnerRefable) *corev1.Secret

NewBasicAuthSecret creates a new secret for connecting to a service broker via HTTP Basic Authentication.

func NewClient

func NewClient(secret *corev1.Secret) (osbclient.Client, error)

NewClient creates a new OSB client from a secret.

Example
// Assume the broker and secret already exist
secret := createFakeBrokerSecret()

// NewClient checks the structural validity of the secret, but doesn't attempt
// to ping the broker on startup.
client, err := NewClient(secret)
if err != nil {
	// XXX: Handle the error correctly for your context.
	panic(err)
}

// XXX: Make a call to the broker here e.g. client.GetCatalog()

fmt.Printf("Client initialized? %t\n", client != nil)
Output:
Client initialized? true
Example (Error)
_, err := NewClient(nil)
fmt.Println(err.Error())
Output:
nil Secret not allowed

func NewConfigFromSecret

func NewConfigFromSecret(secret *corev1.Secret) (*osbclient.ClientConfiguration, error)

NewConfigFromSecret creates a new OSB connection configuration from a secret; in the process it validates the secret for structural correctness.

Types

This section is empty.

Jump to

Keyboard shortcuts

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