github.com/chnsz/golangsdk@v0.0.0-20240506093406-85a3fbfa605b/openstack/kms/v1/rotation/results.go (about) 1 package rotation 2 3 import ( 4 "github.com/chnsz/golangsdk" 5 ) 6 7 // GetResult contains the response body and error from a Get request. 8 type GetResult struct { 9 golangsdk.Result 10 } 11 12 // Rotation is the response body of Get method 13 type Rotation struct { 14 // Key rotation status. The default value is false, indicating that key rotation is disabled. 15 Enabled bool `json:"key_rotation_enabled"` 16 // Rotation interval. The value is an integer in the range 30 to 365. 17 Interval int `json:"rotation_interval"` 18 // Last key rotation time. The timestamp indicates the total microseconds past the start of the epoch date (January 1, 1970). 19 LastRotationTime string `json:"last_rotation_time"` 20 // Number of key rotations. 21 NumberOfRotations int `json:"number_of_rotations"` 22 } 23 24 func (r GetResult) Extract() (Rotation, error) { 25 var s Rotation 26 err := r.ExtractInto(&s) 27 return s, err 28 }