github.com/gophercloud/gophercloud@v1.11.0/openstack/containerinfra/v1/certificates/results.go (about) 1 package certificates 2 3 import ( 4 "github.com/gophercloud/gophercloud" 5 ) 6 7 type commonResult struct { 8 gophercloud.Result 9 } 10 11 // GetResult is the response of a Get operations. 12 type GetResult struct { 13 commonResult 14 } 15 16 // CreateResult is the response of a Create operations. 17 type CreateResult struct { 18 commonResult 19 } 20 21 // UpdateResult is the response of an Update operations. 22 type UpdateResult struct { 23 gophercloud.ErrResult 24 } 25 26 // Extract is a function that accepts a result and extracts a certificate resource. 27 func (r commonResult) Extract() (*Certificate, error) { 28 var s *Certificate 29 err := r.ExtractInto(&s) 30 return s, err 31 } 32 33 // Represents a Certificate 34 type Certificate struct { 35 ClusterUUID string `json:"cluster_uuid"` 36 BayUUID string `json:"bay_uuid"` 37 Links []gophercloud.Link `json:"links"` 38 PEM string `json:"pem"` 39 CSR string `json:"csr"` 40 }