github.com/huaweicloud/golangsdk@v0.0.0-20210831081626-d823fe11ceba/openstack/geminidb/v3/configurations/results.go (about)

     1  package configurations
     2  
     3  import (
     4  	"github.com/huaweicloud/golangsdk"
     5  )
     6  
     7  type ApplyResponse struct {
     8  	JobId   string `json:"job_id"`
     9  	Success bool   `json:"success"`
    10  }
    11  
    12  type Parameter struct {
    13  	Name     string `json:"name"`
    14  	Value    string `json:"value"`
    15  	ReadOnly bool   `json:"readonly"`
    16  }
    17  
    18  type GetResponse struct {
    19  	Parameters []Parameter `json:"configuration_parameters"`
    20  }
    21  
    22  type commonResult struct {
    23  	golangsdk.Result
    24  }
    25  
    26  type ApplyResult struct {
    27  	commonResult
    28  }
    29  
    30  type GetResult struct {
    31  	commonResult
    32  }
    33  
    34  func (r ApplyResult) Extract() (*ApplyResponse, error) {
    35  	var response ApplyResponse
    36  	err := r.ExtractInto(&response)
    37  	return &response, err
    38  }
    39  
    40  func (r GetResult) Extract() (*GetResponse, error) {
    41  	var response GetResponse
    42  	err := r.ExtractInto(&response)
    43  	return &response, err
    44  }