github.com/opentelekomcloud/gophertelekomcloud@v0.9.3/openstack/dds/v3/instances/job.go (about)

     1  package instances
     2  
     3  import (
     4  	"net/http"
     5  
     6  	"github.com/opentelekomcloud/gophertelekomcloud/internal/extract"
     7  )
     8  
     9  type JobId struct {
    10  	JobId string `json:"job_id"`
    11  }
    12  
    13  func extractJob(err error, raw *http.Response) (*string, error) {
    14  	if err != nil {
    15  		return nil, err
    16  	}
    17  
    18  	var res JobId
    19  	err = extract.Into(raw.Body, &res)
    20  	return &res.JobId, err
    21  }