github.com/huaweicloud/golangsdk@v0.0.0-20210831081626-d823fe11ceba/openstack/lts/v2/loggroups/results.go (about) 1 package loggroups 2 3 import "github.com/huaweicloud/golangsdk" 4 5 // CreateResponse represents response in Create method 6 type CreateResponse struct { 7 ID string `json:"log_group_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 // LogGroup represents response in Get method 28 type LogGroup struct { 29 ID string `json:"log_group_id"` 30 Name string `json:"log_group_name"` 31 CreationTime int64 `json:"creation_time"` 32 TTLinDays int `json:"ttl_in_days"` 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() (*LogGroup, error) { 42 s := new(LogGroup) 43 err := r.Result.ExtractInto(s) 44 return s, err 45 }