// Unbind deletes all bindings associated to an instance.
Unbind deletes all bindings associated to an instance.
// Unbind deletes all bindings associated to an instance .
func (sdk *SDK) Unbind(ns, instanceName string) ([]types.NamespacedName, error) {
	instance, err := sdk.RetrieveInstance(ns, instanceName)
	if err != nil {
		return nil, err
	}
	bindings, err := sdk.RetrieveBindingsByInstance(instance)
	if err != nil {
		return nil, err
	}
	namespacedNames := []types.NamespacedName{}
	for _, b := range bindings {
		namespacedNames = append(namespacedNames, types.NamespacedName{Namespace: b.Namespace, Name: b.Name})
	}
	return sdk.DeleteBindings(namespacedNames)
}
func ( sdk * SDK ) Unbind ( ns , instanceName string ) ( [ ] types . NamespacedName , error ) { instance , err := sdk . RetrieveInstance ( ns , instanceName ) if err != nil { return nil , err } bindings , err := sdk . RetrieveBindingsByInstance ( instance ) if err != nil { return nil , err } namespacedNames := [ ] types . NamespacedName { } for _ , b := range bindings { namespacedNames = append ( namespacedNames , types . NamespacedName { Namespace : b . Namespace , Name : b . Name } ) } return sdk . DeleteBindings ( namespacedNames ) }
Unbind deletes all bindings associated to an instance.
Unbind deletes all bindings associated to an instance .