// RetrieveBindingsByInstance gets all child bindings for an instance.
RetrieveBindingsByInstance gets all child bindings for an instance.
// RetrieveBindingsByInstance gets all child bindings for an instance .
func (sdk *SDK) RetrieveBindingsByInstance(instance *v1beta1.ServiceInstance,
) ([]v1beta1.ServiceBinding, error) {
	results, err := sdk.ServiceCatalog().ServiceBindings(instance.Namespace).List(v1.ListOptions{})
	if err != nil {
		return nil, errors.Wrap(err, "unable to search bindings")
	}
	var bindings []v1beta1.ServiceBinding
	for _, binding := range results.Items {
		if binding.Spec.ServiceInstanceRef.Name == instance.Name {
			bindings = append(bindings, binding)
		}
	}
	return bindings, nil
}
func ( sdk * SDK ) RetrieveBindingsByInstance ( instance * v1beta1 . ServiceInstance , ) ( [ ] v1beta1 . ServiceBinding , error ) { results , err := sdk . ServiceCatalog ( ) . ServiceBindings ( instance . Namespace ) . List ( v1 . ListOptions { } ) if err != nil { return nil , errors . Wrap ( err , " " ) } var bindings [ ] v1beta1 . ServiceBinding for _ , binding := range results . Items { if binding . Spec . ServiceInstanceRef . Name == instance . Name { bindings = append ( bindings , binding ) } } return bindings , nil }
RetrieveBindingsByInstance gets all child bindings for an instance.
RetrieveBindingsByInstance gets all child bindings for an instance .
// Not using a filtered list operation because it's not supported yet.