github.com/opentelekomcloud/gophertelekomcloud@v0.9.3/openstack/common/structs/structs.go (about)

     1  package structs
     2  
     3  type ChargeInfo struct {
     4  	ChargeMode  string `json:"charge_mode" required:"true"`
     5  	PeriodType  string `json:"period_type,omitempty"`
     6  	PeriodNum   int    `json:"period_num,omitempty"`
     7  	IsAutoRenew string `json:"is_auto_renew,omitempty"`
     8  	IsAutoPay   string `json:"is_auto_pay,omitempty"`
     9  }
    10  
    11  type ResourceRef struct {
    12  	ID string `json:"id"`
    13  }
    14  
    15  func ExtractIDs(refs []ResourceRef) []string {
    16  	ids := make([]string, len(refs))
    17  	for i, v := range refs {
    18  		ids[i] = v.ID
    19  	}
    20  	return ids
    21  }