github.com/kyma-project/kyma-environment-broker@v0.0.1/internal/broker/bind_last_operation.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 LastBindingOperationEndpoint struct { 12 log logrus.FieldLogger 13 } 14 15 func NewLastBindingOperation(log logrus.FieldLogger) *LastBindingOperationEndpoint { 16 return &LastBindingOperationEndpoint{log: log.WithField("service", "LastBindingOperationEndpoint")} 17 } 18 19 // LastBindingOperation fetches last operation state for a service binding 20 // 21 // GET /v2/service_instances/{instance_id}/service_bindings/{binding_id}/last_operation 22 func (b *LastBindingOperationEndpoint) LastBindingOperation(ctx context.Context, instanceID, bindingID string, details domain.PollDetails) (domain.LastOperation, error) { 23 b.log.Infof("LastBindingOperation instanceID: %s", instanceID) 24 b.log.Infof("LastBindingOperation bindingID: %s", bindingID) 25 b.log.Infof("LastBindingOperation details: %+v", details) 26 27 return domain.LastOperation{}, fmt.Errorf("not supported") 28 }