github.com/opentelekomcloud/gophertelekomcloud@v0.9.3/openstack/cts/v1/tracker/results.go (about) 1 package tracker 2 3 import ( 4 "net/http" 5 6 "github.com/opentelekomcloud/gophertelekomcloud/internal/extract" 7 ) 8 9 type Tracker struct { 10 // Status of a tracker. The value is enabled. 11 Status string `json:"status"` 12 // OBS bucket name. The value contains 3 to 63 characters and must start with a digit or lowercase letter. 13 // Only lowercase letters, digits, hyphens (-), and periods (.) are allowed. 14 BucketName string `json:"bucket_name"` 15 // Prefix of trace files that need to be stored in OBS buckets. 16 FilePrefixName string `json:"file_prefix_name"` 17 // Tracker name. The default value is system. 18 TrackerName string `json:"tracker_name"` 19 // Lts whether trace analysis is enabled. 20 Lts Lts `json:"lts"` 21 } 22 23 type Lts struct { 24 // Whether trace analysis is enabled. 25 IsLtsEnabled bool `json:"is_lts_enabled"` 26 // Name of the Log Tank Service (LTS) log group. 27 LogGroupName string `json:"log_group_name"` 28 // Name of the LTS log stream. 29 LogTopicName string `json:"log_topic_name"` 30 } 31 32 func extra(err error, raw *http.Response) (*Tracker, error) { 33 if err != nil { 34 return nil, err 35 } 36 37 var res Tracker 38 err = extract.Into(raw.Body, &res) 39 return &res, err 40 }