github.com/chnsz/golangsdk@v0.0.0-20240506093406-85a3fbfa605b/openstack/dws/v1/cluster/results.go (about)

     1  package cluster
     2  
     3  import (
     4  	"github.com/chnsz/golangsdk"
     5  	"github.com/chnsz/golangsdk/openstack/common/tags"
     6  )
     7  
     8  type Cluster struct {
     9  	Status              string             `json:"status"`
    10  	SubStatus           string             `json:"sub_status"`
    11  	Updated             string             `json:"updated"` //ISO8601:YYYY-MM-DDThh:mm:ssZ
    12  	Endpoints           []Endpoints        `json:"endPoints"`
    13  	Name                string             `json:"name"`
    14  	NumberOfNode        int                `json:"number_of_node"`
    15  	AvailabilityZone    string             `json:"availability_zone"`
    16  	SubnetID            string             `json:"subnet_id"`
    17  	PublicEndpoints     []PublicEndpoints  `json:"public_endpoints"`
    18  	Created             string             `json:"created"` //ISO8601:YYYY-MM-DDThh:mm:ssZ
    19  	SecurityGroupID     string             `json:"security_group_id"`
    20  	Port                int                `json:"port"`
    21  	NodeType            string             `json:"node_type"`
    22  	Version             string             `json:"version"`
    23  	PublicIp            *PublicIp          `json:"public_ip"`
    24  	FailedReasons       *FailInfo          `json:"failed_reasons"`
    25  	VpcID               string             `json:"vpc_id"`
    26  	TaskStatus          string             `json:"task_status"`
    27  	UserName            string             `json:"user_name"`
    28  	ID                  string             `json:"id"`
    29  	ActionProgress      map[string]string  `json:"action_progress"`
    30  	RecentEvent         int                `json:"recent_event"`
    31  	Tags                []tags.ResourceTag `json:"tags"`
    32  	EnterpriseProjectId string             `json:"enterprise_project_id"`
    33  }
    34  
    35  type ClusterDetail struct {
    36  	Cluster
    37  	PrivateIp      []string        `json:"private_ip"`
    38  	ParameterGroup *ParameterGroup `json:"parameter_group"`
    39  	NodeTypeId     string          `json:"node_type_id"`
    40  	NodeDetail     *NodeDetail     `json:"node_detail"`
    41  	MaintainWindow *MaintainWindow `json:"maintain_window"`
    42  	ResizeInfo     *ResizeInfo     `json:"resize_info"`
    43  }
    44  
    45  type ClusterDetailsRst struct {
    46  	Cluster ClusterDetail `json:"cluster"`
    47  }
    48  
    49  type CreateClusterRst struct {
    50  	Cluster IdObject `json:"cluster"`
    51  }
    52  
    53  type IdObject struct {
    54  	Id string `json:"id"`
    55  }
    56  
    57  type ListClustersRst struct {
    58  	Clusters []Cluster `json:"clusters"`
    59  }
    60  
    61  type FailInfo struct {
    62  	ErrorCode string `json:"error_code"`
    63  	ErrorMsg  string `json:"error_msg"`
    64  }
    65  
    66  type PublicIp struct {
    67  	EipID          string `json:"eip_id"`
    68  	PublicBindType string `json:"public_bind_type"`
    69  }
    70  
    71  type FailedReasons struct {
    72  	FailInfo FailInfo `json:"fail_info"`
    73  }
    74  
    75  type Endpoints struct {
    76  	ConnectInfo string `json:"connect_info"`
    77  	JdbcUrl     string `json:"jdbc_url"`
    78  }
    79  
    80  type PublicEndpoints struct {
    81  	PublicConnectInfo string `json:"public_connect_info"`
    82  	JdbcUrl           string `json:"jdbc_url"`
    83  }
    84  
    85  type ParameterGroup struct {
    86  	Name   string `json:"name"`
    87  	Id     string `json:"id"`
    88  	Status string `json:"status"` // In-Sync,Applying.Pending-Reboot,Sync-Failure
    89  }
    90  
    91  type NodeDetail struct {
    92  	Name  string `json:"name"`
    93  	Value string `json:"value"`
    94  }
    95  
    96  type MaintainWindow struct {
    97  	StartTime string `json:"start_time"` // HH:mm,timezoue:GMT+0。
    98  	EndTime   string `json:"end_time"`
    99  	Day       string `json:"day"`
   100  }
   101  
   102  type ResizeInfo struct {
   103  	ResizeStatus  string `json:"resize_status"` //GROWING,RESIZE_FAILURE
   104  	StartTime     string `json:"start_time"`    //ISO8601:YYYY-MM-DDThh:mm:ss
   105  	TargetNodeNum int    `json:"target_node_num"`
   106  	OriginNodeNum int    `json:"origin_node_num"`
   107  }
   108  
   109  type GetResult struct {
   110  	golangsdk.Result
   111  }
   112  
   113  type CreateRsp struct {
   114  	ID string `json:"id"`
   115  }
   116  
   117  type CreateResult struct {
   118  	golangsdk.Result
   119  }
   120  
   121  type DeleteResult struct {
   122  	golangsdk.ErrResult
   123  }