github.com/huaweicloud/golangsdk@v0.0.0-20210831081626-d823fe11ceba/openstack/lts/v2/logtopics/results.go (about) 1 package logtopics 2 3 import "github.com/huaweicloud/golangsdk" 4 5 // CreateResponse represents response in Create method 6 type CreateResponse struct { 7 ID string `json:"log_topic_id"` 8 } 9 10 // CreateResult is a struct that contains all the return parameters of creation 11 type CreateResult struct { 12 golangsdk.Result 13 } 14 15 // Extract from CreateResult 16 func (r CreateResult) Extract() (*CreateResponse, error) { 17 s := new(CreateResponse) 18 err := r.Result.ExtractInto(s) 19 return s, err 20 } 21 22 // DeleteResult is a struct which contains the result of deletion 23 type DeleteResult struct { 24 golangsdk.ErrResult 25 } 26 27 // LogTopic represents response in Get method 28 type LogTopic struct { 29 ID string `json:"log_topic_id,omitempty"` 30 Name string `json:"log_topic_name"` 31 CreationTime int64 `json:"creation_time"` 32 IndexEnabled bool `json:"index_enabled"` 33 } 34 35 // GetResult contains the body of getting detailed 36 type GetResult struct { 37 golangsdk.Result 38 } 39 40 // Extract from GetResult 41 func (r GetResult) Extract() (*LogTopic, error) { 42 s := new(LogTopic) 43 err := r.Result.ExtractInto(s) 44 return s, err 45 }