github.com/chnsz/golangsdk@v0.0.0-20240506093406-85a3fbfa605b/openstack/kms/v3/keypairs/results.go (about) 1 package keypairs 2 3 import ( 4 "github.com/chnsz/golangsdk" 5 ) 6 7 // TaskResp is the response body of Associate or Disassociate 8 type TaskResp struct { 9 // the task ID 10 ID string `json:"task_id"` 11 } 12 13 // Task contains all the information about a keypair task 14 type Task struct { 15 // the task ID 16 ID string `json:"task_id"` 17 // the ECS instance ID 18 ServerID string `json:"server_id"` 19 // the keypair processing state 20 Status string `json:"task_status"` 21 } 22 23 // GetResult contains the response body and error from a GetTask request. 24 type GetResult struct { 25 golangsdk.Result 26 } 27 28 // Extract the Task from result 29 func (r GetResult) Extract() (Task, error) { 30 var s Task 31 err := r.ExtractInto(&s) 32 return s, err 33 }