github.com/huaweicloud/golangsdk@v0.0.0-20210831081626-d823fe11ceba/openstack/networking/v2/extensions/elb/loadbalancers/results.go (about)

     1  package loadbalancers
     2  
     3  import (
     4  	"github.com/huaweicloud/golangsdk"
     5  )
     6  
     7  type LoadBalancer struct {
     8  	VipAddress      string `json:"vip_address"`
     9  	UpdateTime      string `json:"update_time"`
    10  	CreateTime      string `json:"create_time"`
    11  	ID              string `json:"id"`
    12  	Status          string `json:"status"`
    13  	BandWidth       int    `json:"bandwidth"`
    14  	VpcID           string `json:"vpc_id"`
    15  	AdminStateUp    int    `json:"admin_state_up"`
    16  	VipSubnetID     string `json:"vip_subnet_id"`
    17  	Type            string `json:"type"`
    18  	Name            string `json:"name"`
    19  	Description     string `json:"description"`
    20  	SecurityGroupID string `json:"security_group_id"`
    21  }
    22  
    23  type GetResult struct {
    24  	golangsdk.Result
    25  }
    26  
    27  // Extract is a function that accepts a result and extracts a router.
    28  func (r GetResult) Extract() (*LoadBalancer, error) {
    29  	s := &LoadBalancer{}
    30  	return s, r.ExtractInto(s)
    31  }