github.com/kyma-project/kyma-environment-broker@v0.0.1/internal/broker/bind_create.go (about) 1 package broker 2 3 import ( 4 "context" 5 "fmt" 6 7 "github.com/pivotal-cf/brokerapi/v8/domain" 8 "github.com/sirupsen/logrus" 9 ) 10 11 type BindEndpoint struct { 12 log logrus.FieldLogger 13 } 14 15 func NewBind(log logrus.FieldLogger) *BindEndpoint { 16 return &BindEndpoint{log: log.WithField("service", "BindEndpoint")} 17 } 18 19 // Bind creates a new service binding 20 // 21 // PUT /v2/service_instances/{instance_id}/service_bindings/{binding_id} 22 func (b *BindEndpoint) Bind(ctx context.Context, instanceID, bindingID string, details domain.BindDetails, asyncAllowed bool) (domain.Binding, error) { 23 b.log.Infof("Bind instanceID:", instanceID) 24 b.log.Infof("Bind parameters: %s", string(details.RawParameters)) 25 b.log.Infof("Bind context: %s", string(details.RawContext)) 26 b.log.Infof("Bind asyncAllowed:", asyncAllowed) 27 28 return domain.Binding{}, fmt.Errorf("not supported") 29 }